【发布时间】:2018-08-09 01:49:53
【问题描述】:
所以我想做的是从 Firebase 获取当前用户的信息并将其显示在今天的小部件上。为了做到这一点,我必须在guide 之后将 Today 扩展设置为它自己的应用程序。一切都很顺利;但是,当我尝试运行该应用程序时,我从一个完全不同的框架中收到了三个错误消息,该框架与今天的扩展完全无关,它不是框架 IQAudioRecorderController。我在 IQAudioCropperViewController.m 文件中收到此错误:
“sharedApplication' 不可用:在 iOS 上不可用(应用程序扩展) - 在适当的情况下使用基于视图控制器的解决方案。”
我在网上查了这个原因,是因为框架与扩展不兼容,但问题是,这个框架与我的扩展无关,它也可以选择其他任何框架,为什么是这个。我在网上寻找解决方案,但没有什么是我想要的。除了按照这些说明将扩展名添加到 Firebase 并添加 pod 之外,我没有对应用程序做任何事情,就是这样,然后突然间我从同一个文件中收到了 3 条完全相同的错误消息。我试图清理和构建,但没有任何效果。提前非常感谢您!
Pod 文件:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ShareExtension' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ShareExtension!
end
target 'myApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'JSQMessagesViewController', '7.3.3'
pod 'IDMPhotoBrowser'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'MBProgressHUD'
pod 'IQAudioRecorderController'
pod 'SinchRTC'
pod 'OneSignal'
# Pods for myApp
target 'myAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'myAppUITests' do
inherit! :search_paths
# Pods for testing
end
end
target 'SiriIntents' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for SiriIntents
end
target 'SiriIntentsUI' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for SiriIntentsUI
end
target 'TodayExtension' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
# Pods for TodayExtension
end
【问题讨论】:
-
请提供您的 podfile
-
我刚加了
标签: ios swift xcode firebase firebase-authentication