{"id":204,"date":"2015-09-18T17:37:31","date_gmt":"2015-09-18T09:37:31","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=204"},"modified":"2016-07-15T17:36:05","modified_gmt":"2016-07-15T09:36:05","slug":"%e5%8d%87%e7%ba%a7xcode7%e5%90%8e%e6%89%80%e8%a6%81%e6%9b%b4%e6%94%b9%e7%9a%84%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/analysis\/2015\/09\/18\/173731204.html","title":{"rendered":"\u5347\u7ea7Xcode7\u540e\u6240\u8981\u66f4\u6539\u7684\u914d\u7f6e"},"content":{"rendered":"<p>iOS9 \u4e00\u53d1\u5e03\u4fbf\u5347\u7ea7,\u9694\u5929\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u5df2\u7ecf\u4e0d\u80fd\u4f7f\u7528Xcode 6.4,\u679c\u65ad\u5347\u7ea7,\u5347\u7ea7\u4e4b\u540e\u5148\u62a5\u4e86\u4e00\u4e2a\u9519,bitcode,\u4ee5\u4e3a\u8981\u5347\u7ea7\u6240\u7528sdk,\u4f46\u662f\u8fd8\u662f2\u4e2a\u6708\u524d\u7684\u7248\u672c,\u641c\u5230\u8fd9\u7bc7\u6587\u7ae0,\u7ed9\u9700\u8981\u7684\u5c0f\u4f19\u4f34\u4eec,\u4e4b\u6240\u4ee5\u4e0d\u559c\u6b22\u7528\u8f6c\u8f7d,\u4e07\u4e00\u6709\u5929\u539f\u535a\u4e3b\u5220\u9664\u6587\u7ae0,\u6211\u4fbf\u4e5f\u627e\u4e0d\u5230\u539f\u6587,\u8fd8\u8bf7\u8c05\u89e3;\u6b63\u6587\u5982\u4e0b:<\/p>\n<p><strong>1\uff0c\u9ed8\u8ba4\u4f7f\u7528HTTPS\u8bf7\u6c42<\/strong> <\/p>\n<p>\u5982\u679c\u5728Xcode 9\u4e4b\u524d\u4f7f\u7528\u7684\u65f6http\u8bf7\u6c42\uff0c\u90a3\u4e48\u5728XCode 9\u4e0a\u7f16\u8bd1\u7684App\u662f\u4e0d\u80fd\u8054\u7f51\u7684\uff0c\u4f1a\u63d0\u793a\u5982\u4e0b\u9519\u8bef:<\/p>\n<p>App Transport Security has blocked a cleartext HTTP (http:\/\/) resource load since it is insecure. Temporary exceptions can be configured via your app\u2019s Info.plist file.<\/p>\n<p>\u4fee\u6539\u65b9\u6cd5\u662f\u8981\u4e48\u4f7f\u670d\u52a1\u5668\u652f\u6301https\u8bbf\u95ee\uff0c\u8981\u4e48\u5173\u95edhttps\u7684\u4f7f\u7528\u3002\u7b2c\u4e00\u79cd\u65b9\u6cd5\u5bf9\u4e8e\u4e2a\u4eba\u5f00\u53d1\u8005\u6765\u8bf4\u4ee3\u4ef7\u8fd8\u662f\u6bd4\u8f83\u5927\u7684\uff0c\u56e0\u6b64\u63a8\u8350\u4f7f\u7528\u540e\u9762\u4e00\u79cd\u65b9\u6cd5\uff0c\u5177\u4f53\u7684\u505a\u6cd5\u662f:\u5728\u5de5\u7a0b\u7684Info.plist\u6587\u4ef6\u91cc\u6dfb\u52a0NSAppTransportSecurity\u5b57\u5178\u7c7b\u578b\u7684\uff0c\u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\uff1akey\u4e3aNSAllowsArbitraryLoads\uff0c\u503c\u4e3aYES\u3002<!--more--><br \/>\n<strong>2\uff0ciOS 9\u4f7f\u7528URL scheme\u5fc5\u987b\u5c06\u5176\u52a0\u5165\u767d\u540d\u5355\u5426\u5219\u4f1a\u63d0\u793a\u7c7b\u4f3c\u5982\u4e0b\u9519\u8bef:<\/strong><\/p>\n<p>canOpenURL: failed for URL: &#8220;mqqopensdkapiV2:\/\/qqapp&#8221; &#8211; error: &#8220;This app is not allowed to query for scheme mqqopensdkapiV2\u201d<\/p>\n<p>\u4fee\u6b63\u65b9\u6cd5\u662f\uff0cInfo.plist\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e00\u4e2akey\u4e3aLSApplicationQueriesSchemes\u7684\u6570\u7ec4\u503c\uff0c\u91cc\u9762\u5305\u542b\u9700\u8981\u6dfb\u52a0\u767d\u540d\u5355\u7684string\u7c7b\u578b\u7684scheme\u3002\u7279\u9177\u5427\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u4e86qq\uff0c\u5fae\u4fe1\u7b49\u5206\u4eab\u767b\u5f55\u529f\u80fd\uff0c\u9700\u8981\u6dfb\u52a0\u7684\u503c\u4e3a\uff1a<\/p>\n<p>mqqopensdkapiV2<br \/>\nmqqOpensdkSSoLogin<br \/>\nmqq<br \/>\nmqzoneopensdkapiV2<br \/>\nmqzoneopensdkapi19<br \/>\nmqzoneopensdkapi<br \/>\nmqzoneopensdk<br \/>\nmqzone<br \/>\nweixin<br \/>\nwechat<\/p>\n<p>\u66f4\u591a\u5176\u4ed6\u9002\u914d\u70b9\u540e\u7eed\u4e0d\u65ad\u8ddf\u8fdb\u3002<\/p>\n<p><strong>3\uff0cbitcode<\/strong><\/p>\n<p>\u4f7f\u7528Xcode7\u7f16\u8bd1\u63d0\u793a\uff1aXXX does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64<\/p>\n<p>bitcode\u662f\u88ab\u7f16\u8bd1\u7a0b\u5e8f\u7684\u4e00\u79cd\u4e2d\u95f4\u5f62\u5f0f\u7684\u4ee3\u7801\u3002\u5305\u542bbitcode\u914d\u7f6e\u7684\u7a0b\u5e8f\u5c06\u4f1a\u5728App store\u4e0a\u88ab\u7f16\u8bd1\u548c\u94fe\u63a5\u3002bitcode\u5141\u8bb8\u82f9\u679c\u5728\u540e\u671f\u91cd\u65b0\u4f18\u5316\u6211\u4eec\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u800c\u4e0d\u9700\u8981\u6211\u4eec\u91cd\u65b0\u63d0\u4ea4\u4e00\u4e2a\u65b0\u7684\u7248\u672c\u5230App store\u4e0a\u3002<\/p>\n<p>Xcode7 \u9ed8\u8ba4\u5f00\u542f\u4e86bitcode\uff0c\u5982\u679cApp\u4f7f\u7528\u7684\u7b2c\u4e09\u65b9\u7c7b\u5e93\u4e0d\u652f\u6301bitcode\u4f1a\u63d0\u793a\u9519\u8bef\uff0c\u53ea\u9700\u8981\u5728\u201dBuild Settings\u201d->\u201dEnable Bitcode\u201d\u9009\u9879\u4e2d\u770b\u5173\u95edbitcode\u5373\u53ef\u3002<\/p>\n<p>\u5f00\u542fBitcode\u7f16\u8bd1\u540e\uff0c\u7f16\u8bd1\u4ea7\u751f\u7684\u6587\u4ef6\u4f53\u79ef\u4f1a\u53d8\u5927 (\u56e0\u4e3a\u662f\u4e2d\u95f4\u4ee3\u7801\uff0c\u4e0d\u662f\u7528\u6237\u4e0b\u8f7d\u7684\u5305)\uff0c\u4e14dSYM\u6587\u4ef6\u4e0d\u80fd\u7528\u6765\u5d29\u6e83\u65e5\u5fd7\u7684\u7b26\u53f7\u5316 (\u7528\u6237\u4e0b\u8f7d\u7684\u5305\u662fApple\u670d\u52a1\u91cd\u65b0\u7f16\u8bd1\u4ea7\u751f\u7684\uff0c\u6709\u4ea7\u751f\u65b0\u7684\u7b26\u53f7\u6587\u4ef6)\u3002\u901a\u8fc7Archive\u65b9\u5f0f\u4e0a\u4f20AppStore\u7684\u5305\uff0c\u53ef\u4ee5\u5728 Xcode\u7684Organizer\u5de5\u5177\u4e2d\u4e0b\u8f7d\u5bf9\u5e94\u5b89\u88c5\u5305\u7684\u65b0\u7684\u7b26\u53f7\u6587\u4ef6\u3002<\/p>\n<p>\u7ecf\u9a8c\u8bc1\u8fd9\u4e09\u9879\u662f\u5fc5\u987b\u7ecf\u5386\u4e86.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>iOS9 \u4e00\u53d1\u5e03\u4fbf\u5347\u7ea7,\u9694\u5929\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u5df2\u7ecf\u4e0d\u80fd\u4f7f\u7528Xcode 6.4,\u679c\u65ad\u5347\u7ea7,\u5347\u7ea7\u4e4b\u540e\u5148\u62a5\u4e86\u4e00\u4e2a\u9519,bitcode,\u4ee5\u4e3a\u8981\u5347\u7ea7\u6240\u7528sdk,\u4f46\u662f\u8fd8\u662f2\u4e2a\u6708\u524d\u7684\u7248\u672c,\u641c\u5230\u8fd9\u7bc7\u6587\u7ae0,\u7ed9\u9700\u8981\u7684\u5c0f\u4f19\u4f34\u4eec,\u4e4b\u6240\u4ee5\u4e0d\u559c\u6b22\u7528\u8f6c\u8f7d,\u4e07\u4e00\u6709\u5929\u539f\u535a\u4e3b\u5220\u9664\u6587\u7ae0,\u6211\u4fbf\u4e5f\u627e\u4e0d\u5230\u539f\u6587,\u8fd8\u8bf7\u8c05\u89e3;\u6b63\u6587\u5982\u4e0b: 1\uff0c\u9ed8\u8ba4\u4f7f\u7528HTTPS\u8bf7\u6c42 \u5982\u679c\u5728Xcode 9\u4e4b\u524d\u4f7f\u7528\u7684\u65f6http\u8bf7\u6c42\uff0c\u90a3\u4e48\u5728XCode 9\u4e0a\u7f16\u8bd1\u7684App\u662f\u4e0d\u80fd\u8054\u7f51\u7684\uff0c\u4f1a\u63d0\u793a\u5982\u4e0b\u9519\u8bef: App Transport Security has blocked a cleartext HTTP (http:\/\/) resource load since it is insecure. Temporary exceptions can be configured via your app\u2019s Info.plist file. \u4fee\u6539\u65b9\u6cd5\u662f\u8981\u4e48\u4f7f\u670d\u52a1\u5668\u652f\u6301https\u8bbf\u95ee\uff0c\u8981\u4e48\u5173\u95edhttps\u7684\u4f7f\u7528\u3002\u7b2c\u4e00\u79cd\u65b9\u6cd5\u5bf9\u4e8e\u4e2a\u4eba\u5f00\u53d1\u8005\u6765\u8bf4\u4ee3\u4ef7\u8fd8\u662f\u6bd4\u8f83\u5927\u7684\uff0c\u56e0\u6b64\u63a8\u8350\u4f7f\u7528\u540e\u9762\u4e00\u79cd\u65b9\u6cd5\uff0c\u5177\u4f53\u7684\u505a\u6cd5\u662f:\u5728\u5de5\u7a0b\u7684Info.plist\u6587\u4ef6\u91cc\u6dfb\u52a0NSAppTransportSecurity\u5b57\u5178\u7c7b\u578b\u7684\uff0c\u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\uff1akey\u4e3aNSAllowsArbitraryLoads\uff0c\u503c\u4e3aYES\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[20],"class_list":["post-204","post","type-post","status-publish","format-standard","hentry","category-analysis","tag-basics"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=204"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/204\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}