我正在开发基于信号的消息传递应用程序。我创建了一个共享扩展,我需要在我的共享扩展代码中使用我的一些 pod。当我将这些 pod 添加到我的扩展项目中时,我得到了一些错误。因为在某些 pod 中,它使用了 [UIApplication sharedApplication] 对象,即 NS_EXTENSION_UNAVAILABLE_IOS。我做了一些搜索,但我找不到我想要的东西。这是我的播客文件:
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
abstract_target 'MyApp_pods' do
pod 'Raven', :path => 'Raven'
pod 'TextSecureKit', :path => 'TextSecureKit'
pod 'YapDatabase/SQLCipher', :path => 'YapDatabase'
pod 'OpenSSL', '~> 1.0.207'
pod 'PastelogKit', '~> 1.3'
pod 'FFCircularProgressView', '~> 0.5'
pod 'SCWaveformView', '~> 1.0'
pod 'DJWActionSheet'
pod 'JSQMessagesViewController', :path => 'JSQMessagesViewController'
pod 'CTAssetsPickerController', '~> 3.3.0'
target 'MyApp'
target 'MyAppTests'
target 'MyAppShareExtension'
end
这是我的问题:
有没有办法在我的共享扩展代码中使用这些 Pod?或者有什么方法可以获取 pod 内容的某些部分(例如 TextSecureKit 中的 TSThread.m)?