将Cocoapods链接为共享的iOS 8库

时间:2022-05-02 07:01:57

iOS 8 introduced a feature to allow for shared frameworks in the application sandbox. This is especially useful when using extensions alongside the main application.

iOS 8引入了一项功能,允许在应用程序沙箱中使用共享框架。在主应用程序旁边使用扩展时,这尤其有用。

Statically linking Cocoapods in both the main application and the extension seems like a non-optimal solution. How do I link Cocoapods as a shared framework to be used by both my Extension(s) and the main application using Xcode?

在主应用程序和扩展中静态链接Cocoapods似乎是一个非最佳解决方案。如何将Cocoapods链接为我的Extension(s)和使用Xcode的主应用程序使用的共享框架?

2 个解决方案

#1


1  

There is a active development branch will support implement Pod in swift. That will also support build pods as new Dynamic Library and link against.

有一个活跃的开发分支将在swift中支持实现Pod。这也将支持构建pod作为新的动态库和链接。

See https://github.com/CocoaPods/CocoaPods/pull/2222

#2


0  

Cocoapods 0.36 now supports frameworks and swift. http://blog.cocoapods.org/CocoaPods-0.36/

Cocoapods 0.36现在支持框架和swift。 http://blog.cocoapods.org/CocoaPods-0.36/

#1


1  

There is a active development branch will support implement Pod in swift. That will also support build pods as new Dynamic Library and link against.

有一个活跃的开发分支将在swift中支持实现Pod。这也将支持构建pod作为新的动态库和链接。

See https://github.com/CocoaPods/CocoaPods/pull/2222

#2


0  

Cocoapods 0.36 now supports frameworks and swift. http://blog.cocoapods.org/CocoaPods-0.36/

Cocoapods 0.36现在支持框架和swift。 http://blog.cocoapods.org/CocoaPods-0.36/