【发布时间】:2015-12-17 18:23:48
【问题描述】:
我正在尝试更新项目的 Mixpanel 版本以使用 Cocoapods,因为它之前是手动安装的。我已经在使用 Cocoapods,所以我认为只需将 pod 'Mixpanel', '~> 2.9' 添加到 Podfile 并运行 pod install 将是一个简单的更新。执行此操作后,我收到以下错误:
在导入语句#import "Mixpanel.h"
/Users/timc/ios/app/MyApp/Classes/AnalyticsUtil.h:10:9: 'Mixpanel.h' file not found
还有这个
Failed to import bridging header '/Users/timc/ios/app/MyApp/Classes/MyApp-Free-Bridging-Header.h'
我正在尝试将 Mixpanel 导入到一个 Objective-C 文件中。我的 Podfile 看起来像这样...
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.1'
pod 'AlamofireObjectMapper', '~> 2.1'
target 'MyApp' do
pod 'Mixpanel', '~> 2.9'
end
target 'MyApp Tests' do
end
target 'WatchKit Extension' do
pod "Mixpanel/AppExtension"
end
target 'WatchKit App' do
pod "Mixpanel/AppExtension"
end
target 'MyAppSharedFramework' do
pod 'Alamofire', '~> 3.1'
pod 'AlamofireObjectMapper', '~> 2.1'
end
那么我需要什么才能让我的项目找到 Mixpanel 源文件?我尝试过使用#import,虽然它允许我option-click 导航到正确的文件,但项目仍然无法构建。
我正在运行 Xcode 7.2,项目是 Objective-C 和一些 Swift 的混合体。
很高兴提供任何进一步的信息来帮助诊断此问题!
【问题讨论】:
-
timgcarlson 您在工作区 rm -rf MyProject.xcworkspace pod install 中遇到问题
标签: ios objective-c xcode cocoapods mixpanel