ios - 在 iOS 中为 Today Extension(Widget) 安装 pod
问题描述
如何在我的应用程序中为也称为 Widget 的扩展安装 pod。我已经为我的应用程序目标安装了该 pod。
我在网上查看过,我发现的解决方案让我出现了屏幕截图中的错误。
以下是我的 pods 文件中的代码:
platform :ios, '9.0'
use_frameworks!
target 'myapp' do
pod 'Alamofire', '~> 4.8.0'
end
target 'myapp_extension' do
pod 'Alamofire', '~> 4.8.0'
end
Multiple commands produce '/Users/abc/Library/Developer/Xcode/DerivedData/myapp-hitzznvtnviylfcammkfaxjvlryg/Build/Products/Debug-iphonesimulator/myapp.app/Frameworks/nanopb.framework':
1) That command depends on command in Target 'myapp' (project 'myapp'): script phase “[CP] Embed Pods Frameworks”
2) That command depends on command in Target 'myapp' (project 'myapp'): script phase “[CP] Embed Pods Frameworks”
解决方案
您可以使用inherit! :search_paths
将相同的 pod 添加到您的扩展
platform: ios, '9.0'
target 'myapp' do
use_frameworks!
pod 'Alamofire', '~> 4.8.0'
target 'myapp_extension' do
inherit! :search_paths
end
end
推荐阅读
- c - 内联汇编中的结构偏移
- asp.net-core - 何时使缓存无效 - .net core api
- c# - 在 android 中使用 volley 调用 C# Web 服务的方法
- python - Python如何检测线程连接是否超时
- powershell - 应该使用什么运算符来检测空的 psobject?
- python - 如何使用 Boto3 和 Python 将 lambda 函数订阅到 DynamoDB 流?
- ruby-on-rails - 如何使用 Devise 发出经过身份验证的 ajax 请求?
- c# - 用于 SharePointOnlineCredentials 的 WWF 自定义活动绑定
- java - 如何使用 Java 11 启动 JavaFX 应用程序?
- ios - 具有 2 个目的地的视图控制器