{"id":17637,"date":"2023-10-20T12:33:30","date_gmt":"2023-10-20T04:33:30","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=17637"},"modified":"2023-10-20T12:33:30","modified_gmt":"2023-10-20T04:33:30","slug":"ios-%e6%89%93%e5%8c%85framework%e6%80%8e%e4%b9%88%e5%81%9a","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/17637.html","title":{"rendered":"ios \u6253\u5305framework\u600e\u4e48\u505a?"},"content":{"rendered":"<p>iOS \u6253\u5305 Framework \u7684\u539f\u7406\u4ee5\u53ca\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>\u5728 iOS \u5f00\u53d1\u4e2d\uff0cFramework \u662f\u4e00\u79cd\u5c01\u88c5\u4e86\u4ee3\u7801\u3001\u8d44\u6e90\u4ee5<a href=\"https:\/\/www.applebyme.ltd\/ios-dabao-199.html\">hbuilderx ios\u6253\u5305\u6b65\u9aa4<\/a>\u53ca\u5176\u4ed6\u6587\u4ef6\u7684\u8f6f\u4ef6\u5305\u3002\u5b83\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u72ec\u7acb\u6a21\u5757\u6216\u8005\u5e93\u88ab\u5176\u4ed6\u9879\u76ee\u5f15\u7528\u548c\u590d\u7528\uff0c\u662f\u4e00\u79cd\u4ee3\u7801\u7684\u7ec4\u7ec7\u65b9\u5f0f\u3002Framework \u7684\u6253\u5305\u8fc7\u7a0b\u5b9e\u9645\u4e0a\u662f\u5c06\u4ee3\u7801\u548c\u8d44\u6e90\u8fdb\u884c\u7f16\u8bd1\u3001\u94fe\u63a5\u5e76\u6253\u5305\u6210\u4e00\u4e2a\u7edf\u4e00\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u4e0b\u9762\u5c06\u4ecb\u7ecd iOS \u6253\u5305 Framework \u7684\u8be6\u7ec6\u8fc7\u7a0b\u548c\u6b65\u9aa4\u3002<\/p>\n<p>1. \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 iOS \u9879<a href=\"https:\/\/www.applebyme.ltd\/ios-dabao-1964.html\">uniapp ios \u6253\u5305\u53d1\u5e03<\/a>\u76ee\u3002<\/p>\n<p>   \u9996\u5148\uff0c\u6253\u5f00 Xcode \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 iOS \u9879\u76ee\u3002<\/p>\n<p>2. \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Framework Target\u3002<\/p>\n<p>   \u5728 Xcode \u4e2d\uff0c\u9009\u62e9\u4f60\u7684\u9879\u76ee\u5e76\u53f3\u952e\u70b9\u51fb\uff0c\u9009\u62e9 &#8220;New <\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/ag\/100\/ios\/20.jpg\" \/><\/figure>\n<\/p>\n<p>Target&#8221;\u3002\u5728\u5f39\u51fa\u7a97\u53e3\u4e2d\u9009\u62e9 &#8220;Cocoa Touch Framework&#8221;\uff0c\u7136\u540e\u70b9\u51fb &#8220;Next&#8221;\u3002<\/p>\n<p>3. \u547d\u540d\u5e76\u914d\u7f6e Framework Target\u3002<\/p>\n<p>   \u5728\u540d\u79f0\u5b57\u6bb5\u4e2d\u8f93\u5165 Framework \u7684\u540d\u79f0\uff0c\u5e76\u9009\u62e9\u9002\u5f53\u7684\u6587\u4ef6\u5939\u8fdb\u884c\u5b58\u50a8\u3002\u70b9\u51fb &#8220;Finish&#8221;\u3002<\/p>\n<p>4. \u7f16\u5199\u548c\u5bfc\u5165\u4ee3\u7801\u3002<\/p>\n<p>   \u5728\u521b\u5efa\u7684 Framework Target \u4e2d\uff0c\u7f16\u5199\u4f60\u7684\u4ee3\u7801\u5e76\u5bfc\u5165\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u5e93\u6216\u7ec4\u4ef6\u3002\u786e\u4fdd\u4ee3\u7801\u80fd\u591f\u88ab\u6b63\u786e\u5730\u7f16\u8bd1\u548c\u94fe\u63a5\u3002<\/p>\n<p>5. \u914d\u7f6e Framework Target Build Settings\u3002<\/p>\n<p>   \u5728 Framework Target \u7684 Build Settings \u4e2d\uff0c\u8bbe\u7f6e\u6b63\u786e\u7684\u7f16\u8bd1\u9009\u9879\u548c\u76ee\u6807\u7248\u672c\u3002\u786e\u4fdd Framework \u80fd\u591f\u5728\u6240\u9700\u7684 iOS \u7248\u672c\u4e0a\u8fd0\u884c\u3002<\/p>\n<p>6. \u7f16\u8bd1 Framework Target\u3002<\/p>\n<p>   \u5728 Xcode \u4e2d\uff0c\u9009\u62e9 Framework Target\uff0c\u5e76\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684 &#8220;Product&#8221; -&gt; &#8220;Build&#8221;\u3002Xcode \u5c06\u4f1a\u7f16\u8bd1\u548c\u6784\u5efa Framework\u3002<\/p>\n<p>7. \u5bfc\u51fa Framework\u3002<\/p>\n<p>   \u5728 Framework \u7f16\u8bd1\u6210\u529f\u540e\uff0c\u4f60\u53ef\u4ee5\u5728 Xcode \u7684 &#8220;Products&#8221; \u76ee\u5f55\u4e2d\u627e\u5230\u751f\u6210\u7684 Framework\u3002\u53f3\u952e\u70b9\u51fb Framework\uff0c\u9009\u62e9 &#8220;Show in Finder&#8221;\uff0c\u7136\u540e\u5c06\u5b83\u5bfc\u51fa\u5230\u4f60\u60f3\u8981\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>8. \u4f7f\u7528 Framework\u3002<\/p>\n<p>   \u5728\u5176\u4ed6 iOS \u9879\u76ee\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5f15\u7528\u521a\u521a\u6253\u5305\u7684 Framework\u3002\u5c06 Framework \u6587\u4ef6\u62d6\u62fd\u5230\u65b0\u9879\u76ee\u7684\u5de5\u7a0b\u76ee\u5f55\u4e0b\uff0c\u5e76\u52fe\u9009 &#8220;Copy items if needed&#8221; \u9009\u9879\u3002\u7136\u540e\uff0c\u5728\u4f60\u7684\u4ee3\u7801\u4e2d\u5bfc\u5165 Framework\uff0c\u5e76\u4f7f\u7528\u5176\u4e2d\u7684\u529f\u80fd\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6253\u5305 Framework \u53ef\u80fd\u8fd8\u4f1a\u6d89\u53ca\u5230\u5176\u4ed6\u7684\u4e00\u4e9b\u7ec6\u8282\uff0c\u6bd4\u5982\u7248\u672c\u7ba1\u7406\u3001\u4f9d\u8d56\u7ba1\u7406\u7b49\u3002\u6b64\u5916\uff0c\u5982\u679c\u4f60\u9700\u8981\u6253\u5305\u4e00\u4e2a Universal Framework\uff0c\u5373\u9002\u7528\u4e8e\u591a\u79cd\u67b6\u6784\uff08\u6bd4\u5982 arm64\u3001x86_64\uff09\u7684 Framework\uff0c\u8fd8\u9700\u8981\u8fdb\u884c\u989d\u5916\u7684\u914d\u7f6e\u548c\u8bbe\u7f6e\u3002<\/p>\n<p>\u603b\u7ed3\u8d77\u6765\uff0ciOS \u6253\u5305 Framework \u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u521b\u5efa\u9879\u76ee\u3001\u521b\u5efa Framework Target\u3001\u7f16\u5199\u4ee3\u7801\u3001\u7f16\u8bd1\u5e76\u5bfc\u51fa Framework\u3001\u5728\u5176\u4ed6\u9879\u76ee\u4e2d\u4f7f\u7528 Framework\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5c06\u81ea\u5df1\u7684\u4ee3\u7801\u548c\u8d44\u6e90\u5c01\u88c5\u6210 Framework\uff0c\u5e76\u4f9b\u5176\u4ed6\u9879\u76ee\u91cd\u590d\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>iOS \u6253\u5305 Framework \u7684\u539f\u7406\u4ee5\u53ca\u8be6\u7ec6\u4ecb\u7ecd\u5728 iOS \u5f00\u53d1\u4e2d\uff0cFramework \u662f\u4e00\u79cd\u5c01\u88c5\u4e86\u4ee3\u7801\u3001\u8d44\u6e90\u4ee5\u53ca\u5176\u4ed6\u6587\u4ef6\u7684\u8f6f\u4ef6\u5305\u3002\u5b83\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u72ec\u7acb\u6a21\u5757\u6216\u8005\u5e93\u88ab\u5176\u4ed6\u9879\u76ee\u5f15\u7528\u548c\u590d\u7528\uff0c\u662f\u4e00\u79cd\u4ee3\u7801\u7684<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[24646,980,2183,24647,1220],"class_list":["post-17637","post","type-post","status-publish","format-standard","hentry","category-appshangjia","tag-ios","tag-980","tag-2183","tag-macios","tag-1220"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/17637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=17637"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/17637\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=17637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=17637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=17637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}