【发布时间】:2016-08-06 03:42:22
【问题描述】:
我正在使用一些 Pod 开发一个更大的项目(Swift),到目前为止一切都很好...... 但是现在我想添加一个 tvos 目标,现在我的项目搞砸了:(
还有一种简单的方法可以重现:
1.) 创建一个新的 SingleView 应用程序并在 Xcode 中将其命名为“pod-test”
2.) 打开它并运行它
3.) 运行 pod init 来创建 Podfile
4.) 使用以下命令编辑 Podfile: 使用_frameworks! 平台:ios,'8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
5.) 运行 pod 安装
6.) 打开工作区项目文件并运行应用程序
7.) 现在添加两个目标并将其命名为“pod-test-tvos”
8.) 运行 iOS 和 tvos 应用程序。一切都还好
9.) 使用以下命令编辑 Podfile:
source 'https://github.com/CocoaPods/Specs.git'
target 'pod-test' do
use_frameworks!
platform :ios, '8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
end
target 'pod-test-tvos' do
use_frameworks!
platform :tvos, '9.0'
pod 'Fabric'
pod 'Crashlytics'
end
10.) 将 pod-test 和 pod-test-tvos 的配置编辑为无
10.) 关闭 XCode
11.) 再次运行 pod install
12.) 再次打开 Xcode
13.) 再次运行 iOS 和 TVOS 应用程序...仍然一切正常
14.) 为两个目标编辑“AppDelegate”并仅添加此导入:
import Fabric
15.) 再次运行 iOS 和 TVOS 应用程序...然后繁荣... iOS 运行良好 TVOS 说找不到 Fabric :(
这一切都刚刚发生,因为我在添加 TVOS 目标后“更改”了 Podfile...
只需这几个步骤,一切都很好:
1.) 创建一个新的 SingleView 应用程序并在 Xcode 中将其命名为“pod-test”
2.) 现在添加两个目标并将其命名为“pod-test-tkos”
3.) 运行 pod init 来创建 Podfile
4.) 使用以下命令编辑 Podfile:
source 'https://github.com/CocoaPods/Specs.git'
target 'pod-test' do
use_frameworks!
platform :ios, '8.0'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'AlamofireObjectMapper'
pod 'Fabric'
pod 'Crashlytics'
pod 'Nuke'
pod 'MGSwipeTableCell'
pod 'GradientCircularProgress', :git => 'https://github.com/keygx/GradientCircularProgress'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
end
target 'pod-test-tvos' do
use_frameworks!
platform :tvos, '9.0'
pod 'Fabric'
pod 'Crashlytics'
end
5.) 运行 pod 安装
6.) 打开工作区项目文件并运行应用程序
7.) 为两个目标编辑“AppDelegate”并仅添加此导入:
import Fabric
8.) 再次运行 iOS 和 TVOS 应用程序...仍然一切正常
所以,在“旧”项目中更改 Podfile 似乎存在问题...
我希望有人能帮我解决这个问题:)
【问题讨论】:
标签: ios swift xcode cocoapods crashlytics