【发布时间】:2017-02-08 22:24:12
【问题描述】:
我尝试在 Podfile 中直接添加目标 'MyExtension' 和一些 pod,但这会抛出 'sharedApplication' 在 iOS 上不可用(应用程序扩展)。
编辑:
我已通过添加以下内容解决了问题:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) GTM_BACKGROUND_UIAPPLICATION=0'
end
end
end
在我的 Podfile 的末尾,但这让我想到了另一个基本问题:在哪里调用 FIRApp.configure(),通常这是在 AppDelegate 中完成的,但自定义键盘扩展没有这样的文件。我认为把它放在 viewDidLoad() 中是个坏主意(它有效,但似乎有问题)?
【问题讨论】:
-
请贴出无效的Podfile内容和代码
-
请编辑帖子,内容格式为代码
-
对不起,刚刚更新了主帖。
标签: ios swift firebase firebase-realtime-database cocoapods