{"id":153918,"date":"2020-09-11T06:16:11","date_gmt":"2020-09-10T22:16:11","guid":{"rendered":"http:\/\/4563.org\/?p=153918"},"modified":"2020-09-11T06:16:11","modified_gmt":"2020-09-10T22:16:11","slug":"%e9%97%ae%e4%b8%80%e4%b8%aa%e5%85%b3%e4%ba%8e-ios-flutter-%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=153918","title":{"rendered":"\u95ee\u4e00\u4e2a\u5173\u4e8e iOS Flutter \u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u95ee\u4e00\u4e2a\u5173\u4e8e iOS Flutter \u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wtdu1992 <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u7531\u4e8e\u9879\u76ee\u9700\u6c42\uff0c\u5728 Flutter iOS \u9879\u76ee\u4e2d\u6dfb\u52a0\u4e86\u4e00\u4e9b\u7cfb\u7edf\u7684 extension App\uff0c\u6bd4\u5982 share extension\uff0cnotification extension\uff0cToday extension\uff0c\u7531\u4e8e\u6ca1\u6709\u627e\u5230\u6bd4\u8f83\u597d\u7684\u63d2\u4ef6\uff0c\u56e0\u6b64\u90fd\u662f flutter native +\u539f\u751f \u5b9e\u73b0\uff0c\u5728\u5b9e\u73b0\u529f\u80fd\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5728 extension app \u4e2d\u4e5f\u662f\u7528\u4e86\u4e00\u4e9b\u5e38\u7528\u7684\u4e09\u65b9\u5e93\uff0c\u8fd9\u91cc\u540c\u6837\u7528 pod \u8fdb\u884c\u7ba1\u7406 \uff0c\u53ea\u9700\u8981\u5728 target \u4e0b\u9009\u62e9 \u57fa\u4e8e Pod workspace \uff08 debug &amp;release \uff09 \u8fdb\u884c\u7f16\u8bd1\u5373\u53ef\uff0c\u4f46\u662f\u73b0\u5728\u53d1\u73b0\u4e00\u4e2a\u95ee\u9898\uff0c\u672c\u6765\u5728 xcode \u73af\u5883\u5df2\u7ecf\u914d\u7f6e\u597d\u7684\uff0c\u4f46\u662f\u5728 AS \uff08 Android studio \uff09 \u4e2d\u8fdb\u884c\u7f16\u8bd1\u7684\u65f6\u5019\uff0c\u6bcf\u4e00\u6b21\u90fd\u4f1a\u88ab\u91cd\u7f6e\uff0c\u5bfc\u81f4\u5728 extension app \u4e2d \u88ab import \u7684 framework \u603b\u63d0\u793a not found \u4e0d\u901a\u8fc7\uff0c\u9879\u76ee\u4e5f\u8dd1\u6b65\u8d77\u6765\uff0c\u5f88\u90c1\u95f7\uff0c\u8fd9\u6837\u4e5f\u5bfc\u81f4\u9879\u76ee \u65e0\u6cd5\u7528 code magic \u6253\u5305\uff0c\u6709\u6ca1\u6709\u8c01\u9047\u5230\u8fc7\u7c7b\u4f3c\u95ee\u9898\u3002      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3230269\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : FaXiaoKe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f04\u4e2a\u5206\u652f\u554a\uff0c\u53ea\u540c\u6b65\u4e1a\u52a1\u4ee3\u7801\uff0c\u4e0d\u8981\u540c\u6b65\u914d\u7f6e\u548c pods \u6587\u4ef6\u3002<\/p>\n<p>\u6211\u8fd9\u91cc android \u548c iOS \u6838\u5fc3\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u540e\u671f\u76f4\u63a5\u5206\u4e24\u4e2a\u4ee3\u7801\u6e90\u7ba1\u7406\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230270\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wtdu1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @FaXiaoKe \u6709\u6dfb\u52a0\u5206\u652f\uff0c\u6bcf\u6b21\u8981\u6dfb\u52a0\u65b0\u3001\u529f\u80fd\u65f6\u5019\uff0c\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\uff0c\u5728\u5206\u652f\u4e0a\u64cd\u4f5c\uff0c\u6d4b\u8bd5\u7a33\u5b9a\u4ee5\u53ca code review \u901a\u8fc7\u540e\uff0c \u624d\u4f1a\u540c\u6b65\u5230 master\uff0c\u73b0\u5728\u7684\u9047\u5230\u7684\u95ee\u9898\u4e0d\u662f\u8fd9\u4e2a\uff0c\u662f\u5728\u96c6\u6210\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6211\u672c\u5730\u7f16\u8bd1\uff0c\u4ee5\u53ca \u65e5\u5e38\u6253\u5305\u6d4b\u8bd5\uff08\u5206\u652f\u4ee3\u7801\uff09\u7684\u65f6\u5019\u9047\u5230\u7684\u95ee\u9898\uff0c\u8fd8\u6ca1\u6709\u5230\u5b8c\u6210\u9636\u6bb5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230271\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0xDatou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u6709\u505a\u8fc7 flutter\uff0c\u4f46\u662f\u542c\u4f60\u7684\u610f\u601d\u662f AS \u8dd1\u5b8c\uff0csdk \u6ca1\u4e86\u662f\u5427\uff1f\u5982\u679c\u53ea\u662f\u8fd9\u6837\u7684\u8bdd\u6bcf\u6b21\u5207\u91cd\u65b0 pod install \u5148\u7528\u7740\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230272\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wtdu1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @0xDatou \u5e76\u4e0d\u662f\u6ca1\u6709\u4e86 \uff0c\u4f60 pod install \u4e4b\u540e\u80af\u5b9a\u662f\u5728\u672c\u5730\u7684\uff0c\u53ea\u9700\u8981\u5728 build Phases &#8212;&gt; link lib \u4e2d \u6dfb\u52a0\u76f8\u5173\u4f60\u9700\u8981\u4f7f\u7528\u7684 framework \u5c31\u53ef\u4ee5\uff0c\u5728 build \u65f6\u5019\u56de\u52a8\u6001\u6839\u636e path \u53bb\u94fe\u63a5\uff0c\u73b0\u5728\u51fa\u73b0\u7684\u95ee\u9898\u662f\u5728 AS \u4e2d build \u5c31\u4f1a\u62a5\u9519\uff0c\u63d0\u793a \u88ab import \u7684 framework not found                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230273\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0xDatou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u6211\u843d\u4f0d\u4e86\u8fd8\u662f\u7406\u89e3\u6709\u95ee\u9898\u3002\u3002 \u6211\u5370\u8c61\u4e2d cocoapods \u9ed8\u8ba4\u53ea\u652f\u6301 Xcode \u7684\u5427\uff1f\u505a flutter \u7528 AS \u7684\u914d\u7f6e\u9879\u4e5f\u80fd cocoapods \u4e5f\u80fd\u7528\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230274\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shily <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728 ios\/Podfile \u7684\u6587\u4ef6\u91cc target &#8216;Runner&#8217; do \u8282\u70b9\u4e0b\u6dfb\u52a0<br \/>pod &#8216;SnapKit&#8217;, &#8216;~&gt; 4.0.0&#8217;<br \/>\u76ee\u524d\u6211\u4eec\u4f7f\u7528\u7684\u8fd9\u7528\u65b9\u5f0f\uff0c\u6ca1\u9047\u89c1\u5565\u95ee\u9898\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230275\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wtdu1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @0xDatou Flutter \u4e5f\u6709\u5305\u7ba1\u7406\u5de5\u5177 \uff0c\u5728 flutter \u73af\u5883 \u6709\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u5f53\u4f60\u914d\u7f6e\u597d\u76f8\u5173 lib \u4fe1\u606f\uff0c\u5728 run \u6216\u8005 build \u65f6\u5019 \u4f1a\u81ea\u52a8\u53bb\u94fe\u63a5\u539f\u751f\u7684\u4e00\u4e9b\u5e93\uff0c\u8fd9\u91cc flutter \u76ee\u524d\u53ea\u652f\u6301 CocoaPods \u8fdb\u884c\u5305\u7ba1\u7406\uff0c\u5177\u4f53\u539f\u7406\uff0c\u611f\u5174\u8da3\u53ef\u4ee5\u53bb\u770b\u770b\u5b9e\u73b0\u65b9\u6848\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3230276\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : wtdu1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shily \u662f\u7684 \uff0c\u9664\u4e86 pubspec.yaml \u6587\u4ef6\u4e2d\u914d\u7f6e\u7684 lib \u4e4b\u5916\uff0c\u6bd4\u5982\u81ea\u5df1\u8981\u505a native \u65b9\u6848\uff0c\u8fd9\u65f6\u5019\u7528\u5230\u4e09\u65b9\u5e93\u65f6\uff0c\u6211\u4e5f\u662f\u8fd9\u4e48\u505a\u5f97 \uff0c\u6ca1\u95ee\u9898\uff0c\u6211\u73b0\u5728\u5b9e\u5728 share extension \u4f7f\u7528 framework\uff0c\u56e0\u6b64 \u6211\u5728 target list \u7684 project \u9009\u9879\u4e2d\uff0c\u4e5f\u5c31\u662f Runner \u4e0b\uff0c\u9009\u62e9\u53f3\u4fa7\u7684 info &#8212;-&gt;configurations ,\u5c06 debug &amp; release \u4e2d extension app \u624b\u52a8\u6539\u4e3a Pod.Runner.Debug\/Release\uff0c\u7136\u540e\u5728 extension app target \u7684 build Phases \u4e2d\u5bfc\u5165 \u5bf9\u5e94\u7684 framework\uff0c\u8fd9\u65f6\u5019\u4f60\u518d\u5230 extension app \u73af\u5883\u53bb\u4f7f\u7528\u5bf9\u5e94\u7684\u5e93\uff0c\u5e94\u8be5\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u4f46\u6211\u8fd9\u91cc\u5f88\u5947\u602a\uff0c\u5728 AS \u548c\u7ec8\u7aef\u547d\u4ee4\u4e2d\u8fd0\u884c\u4f1a\u62a5\u9519 \uff0c\u627e\u4e0d\u5230\u5e93                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u4e00\u4e2a\u5173\u4e8e iOS Flutter&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/153918"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153918"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/153918\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153918"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}