- 新建extension target
- 新建一個cocoa touch framework 里面放container(你的App母體) & extension(你的插件)公用代碼
- 修改Podfile如下
link_with 'YourApp', 'YourExtension', 'YourFramework'
pod 'AFNetworking', '2.3.1'
-
修改project編譯設(shè)置
sc001.png -
在Extension target中添加你的公用framework
sc002.png 刪除你的workspace文件, 重新pod install
well done!