{"id":1201,"date":"2023-07-29T12:33:51","date_gmt":"2023-07-29T04:33:51","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=1201"},"modified":"2023-07-29T12:33:51","modified_gmt":"2023-07-29T04:33:51","slug":"hbuilderx%e6%89%93%e5%8c%85ios%e7%bd%91%e7%bb%9c%e4%b8%8d%e9%80%9a%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/1201\/","title":{"rendered":"hbuilderx\u6253\u5305ios\u7f51\u7edc\u4e0d\u901a\u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"

HBuilderX\u662f\u4e00\u6b3e\u8de8\u5e73\u53f0\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u4e13\u4e3a\u79fb\u52a8\u524d\u7aef\u5f00\u53d1\u800c\u8bbe\u8ba1\u3002\u5b83\u652f\u6301\u591a\u79cd\u5e73\u53f0\u7684\u5e94\u7528\u5f00\u53d1\uff0c\u5305\u62eciOS\u3001Android\u4ee5\u53caWeb\u5e73\u53f0\u7b49\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6709\u65f6\u6211\u4eec\u4f1a\u9047\u5230HBuilderX\u6253\u5305iOS\u5e94\u7528\u65f6\u7f51\u7edc\u4e0d\u901a\u7684\u60c5\u51b5\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecdHBuilderX\u6253\u5305iOS\u5e94\u7528\u65f6\u7f51\u7edc\u4e0d\u901a\u7684\u539f\u7406\uff0c\u5e76\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n

\u5728\u5f00\u59cb\u4e91\u7aefios\u6253\u5305<\/a>\u8ba8\u8bba\u95ee\u9898\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u4e86\u89e3\u4e00\u4e0bHBuilderX\u6253\u5305iOS\u5e94\u7528\u7684\u4e00\u822c\u6d41\u7a0b\u3002HBuilderX\u4f7f\u7528\u4e86Cordova\u6846\u67b6\u4f5c\u4e3a\u5e95\u5c42\uff0c\u901a\u8fc7\u8c03\u7528\u7cfb\u7edf\u63d0\u4f9b\u7684webview\u6765\u5448\u73b0Hybrid App\u3002\u5728\u6253\u5305iO<\/p>\n

<\/figure>\n<\/p>\n

S\u5e94\u7528\u65f6\uff0cHBuilderX\u4f1a\u5c06\u5e94\u7528\u4ee3\u7801\u6253\u5305\u6210\u4e00\u4e2aiOS\u539f\u751f\u7684\u5e94\u7528\u7a0b\u5e8f\uff08.app\u6587\u4ef6\uff09\uff0c\u7136\u540e\u4f7f\u7528Xcode\u63d0\u4f9b\u7684\u5de5\u5177\u5c06\u8fd9\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u5b89\u88c5\u7684.ipa\u6587\u4ef6\u3002<\/p>\n

\u5f53HBuilderX\u6253\u5305iOS\u5e94\u7528\u65f6\uff0c\u9047\u5230\u7f51\u7edc\u4e0d\u901a\u7684\u95ee\u9898\uff0c\u4e3b\u8981\u662f\u7531\u4e8e\u5e94\u7528\u5728iOS\u8bbe\u5907\u4e0a\u8fd0\u884c\u65f6\u65e0\u6cd5\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002\u8fd9\u662f\u7531\u4e8eiOS\u7cfb\u7edf\u7684\u5b89\u5168\u673a\u5236\u6240\u5bfc\u81f4\u7684\u3002\u4e3a\u4e86\u4fdd\u62a4\u7528\u6237\u9690\u79c1\u548c\u6570\u636e\u5b89\u5168\uff0ciOS\u5e94\u7528\u9ed8\u8ba4\u662f\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u7684\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u914d\u7f6e\uff0c\u4ee5\u4f7f\u5e94\u7528\u80fd\u591f\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002<\/p>\n

\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5728\u5e94\u7528\u7684\u914d\u7f6e\u6587\u4ef6config.xml\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n

“` xml<\/p>\n<\/p>\n<\/p>\n

“`<\/p>\n

\u8fd9\u4e9b\u914d\u7f6e\u7684\u4f5c\u7528\u662f\u5141\u8bb8\u5e94\u7528\u8bbf\u95ee\u4efb\u4f55\u57df\u540d\u548c\u8def\u5f84\uff0c\u4ece\u800c\u786e\u4fdd\u5e94\u7528\u80fd\u591f\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002<\/p>\n

\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5728\u5e94\u7528\u7684iOS\u5e73\u53f0\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u4e00\u4e9b\u914d\u7f6e\u3002\u5728HBuilderX\u4e2d\uff0ciOS\u5e73\u53f0\u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u4e3a\/platforms\/ios\/\u5de5\u7a0b\u540d\/\u5de5\u7a0b\u540d-Info.plist\u3002\u5728\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a<\/p>\n

“` xml<\/p>\n

NSAppTransportSecurity<\/p>\n

\n

NSAllowsArbitraryLoads<\/p>\n<\/p>\n

“`<\/p>\n

\u8fd9\u4e2a\u914d\u7f6e\u9879\u7684\u4f5c\u7528\u662f\u5141\u8bb8\u5e94\u7528\u8bbf\u95ee\u4efb\u4f55\u57df\u540d\u548c\u8def\u5f84\uff0c\u4ece\u800c\u786e\u4fdd\u5e94\u7528\u80fd\u591f\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002<\/p>\n

\u5b8c\u6210\u4ee5\u4e0a\u914d\u7f6e\u540e\uff0c\u6211\u4eec\u9700\u8981\u91cd\u65b0\u6253\u5305\u5e94\u7528\uff08Build -> \u4e00\u952e\u8c03\u8bd5\/\u8fd0\u884c\uff09\u3002\u6b64\u65f6\uff0c\u5e94\u7528\u5c06\u600e\u4e48\u5c06\u8f6f\u4ef6\u6253\u5305\u5230ios\u4e2d<\/a>\u80fd\u591f\u5728iOS\u8bbe\u5907\u4e0a\u6b63\u5e38\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002<\/p>\n

\u9664\u4e86\u4ee5\u4e0a\u914d\u7f6e\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u53ef\u80fd\u5bfc\u81f4\u7f51\u7edc\u4e0d\u901a\u7684\u539f\u56e0\u3002\u4f8b\u5982\uff0c\u5e94\u7528\u4e2d\u4f7f\u7528\u4e86\u6709\u9650\u7f51\u9875\u7684\u8d44\u6e90\uff08\u5982\u5b57\u4f53\u3001\u56fe\u7247\u7b49\uff09\uff0c\u4f46\u672a\u6b63\u786e\u914d\u7f6e\u7f51\u7edc\u52a0\u8f7d\u7b56\u7565\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u5728\u5e94\u7528\u4ee3\u7801\u4e2d\u624b\u52a8\u914d\u7f6e\u7f51\u7edc\u52a0\u8f7d\u7b56\u7565\uff0c\u4ee5\u786e\u4fdd\u8d44\u6e90\u80fd\u591f\u6b63\u786e\u52a0\u8f7d\u3002<\/p>\n

\u7efc\u4e0a\u6240\u8ff0\uff0cHBuilderX\u6253\u5305iOS\u5e94\u7528\u65f6\u7f51\u7edc\u4e0d\u901a\u7684\u95ee\u9898\u4e3b\u8981\u662f\u7531\u4e8e\u5e94\u7528\u65e0\u6cd5\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u6240\u5bfc\u81f4\u7684\u3002\u901a\u8fc7\u5728\u5e94\u7528\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u4e00\u4e9b\u914d\u7f6e\uff0c\u6211\u4eec\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u6ce8\u610f\u5e94\u7528\u4e2d\u7684\u8d44\u6e90\u52a0\u8f7d\u7b56\u7565\uff0c\u4ee5\u786e\u4fdd\u8d44\u6e90\u80fd\u591f\u6b63\u786e\u52a0\u8f7d\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u7406\u89e3\u548c\u89e3\u51b3HBuilderX\u6253\u5305iOS\u5e94\u7528\u65f6\u7f51\u7edc\u4e0d\u901a\u7684\u95ee\u9898\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

HBuilderX\u662f\u4e00\u6b3e\u8de8\u5e73\u53f0\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u4e13\u4e3a\u79fb\u52a8\u524d\u7aef\u5f00\u53d1\u800c\u8bbe\u8ba1\u3002\u5b83\u652f\u6301\u591a\u79cd\u5e73\u53f0\u7684\u5e94\u7528\u5f00\u53d1\uff0c\u5305\u62eciOS\u3001Android\u4ee5\u53caWeb\u5e73\u53f0\u7b49\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6709\u65f6\u6211\u4eec\u4f1a\u9047\u5230HBuilderX\u6253<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[2734,160,2733,2211,2735],"topic":[],"class_list":["post-1201","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-flutter-ios-","tag-160","tag-2733","tag-2211","tag-ios"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=1201"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1201\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=1201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=1201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=1201"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=1201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}