ios - 从 : "_OBJC_CLASS_$_Mixpanel", o 引用的体系结构 x86_64 : __TMaCSo8Mixpanel in AppDelegate. 找不到符号

标签 ios xcode swift mixpanel

我正在正确安装 Mixpanel(由于更大的问题而不使用 CocoaPods)并且我在尝试构建时遇到了这个问题。显然它在链接过程中:

Ld /Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Products/Debug-iphonesimulator/Skillet.app/Skillet normal x86_64
cd /Users/zheref/Code/skillet/skillet-ios
export IPHONEOS_DEPLOYMENT_TARGET=8.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Products/Debug-iphonesimulator -L/Users/zheref/Code/skillet/skillet-ios/Pods/Brightcove-Player-SDK/Library -L/Users/zheref/Code/skillet/skillet-ios/Pods/Google/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleAppUtilities/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleAuthUtilities/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleNetworkingUtilities/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleSignIn/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleSymbolUtilities/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Pods/GoogleUtilities/Libraries -L/Users/zheref/Code/skillet/skillet-ios/Skillet -F/Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Products/Debug-iphonesimulator -F/Users/zheref/Code/skillet/skillet-ios -F/Users/zheref/Code/vendors/parse-library-1.7.5 -filelist /Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Intermediates/Skillet.build/Debug-iphonesimulator/Skillet.build/Objects-normal/x86_64/Skillet.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lBCOVPlayerSDK -lGGLCore -lGGLSignIn -lGSDK_Overload -lGTMOAuth2_external -lGTMOAuth2_internal -lGTMSessionFetcher_core -lGTMSessionFetcher_full -lGTMStackTrace -lGTM_AddressBook -lGTM_DebugUtils -lGTM_GTMURLBuilder -lGTM_KVO -lGTM_NSDictionary+URLArguments -lGTM_NSScannerJSON -lGTM_NSStringHTML -lGTM_NSStringXML -lGTM_Regex -lGTM_RoundedRectPath -lGTM_StringEncoding -lGTM_SystemVersion -lGTM_UIFont+LineHeight -lGTM_core -lGTM_iPhone -lOpenInChrome -lPods-PaymentKit -lPods-Stripe -lSignIn -framework AVFoundation -framework AddressBook -framework CoreMedia -framework CoreText -framework Foundation -framework MediaPlayer -framework Security -framework StoreKit -framework SystemConfiguration -ObjC -lBCOVPlayerSDK -lGGLCore -lGGLSignIn -lGSDK_Overload -lGTMOAuth2_external -lGTMOAuth2_internal -lGTMSessionFetcher_core -lGTMSessionFetcher_full -lGTMStackTrace -lGTM_AddressBook -lGTM_DebugUtils -lGTM_GTMURLBuilder -lGTM_KVO -lGTM_NSDictionary+URLArguments -lGTM_NSScannerJSON -lGTM_NSStringHTML -lGTM_NSStringXML -lGTM_Regex -lGTM_RoundedRectPath -lGTM_StringEncoding -lGTM_SystemVersion -lGTM_UIFont+LineHeight -lGTM_core -lGTM_iPhone -lOpenInChrome -lPods-PaymentKit -lPods-Stripe -lSignIn -framework AVFoundation -framework AddressBook -framework CoreMedia -framework CoreText -framework Foundation -framework MediaPlayer -framework Security -framework StoreKit -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Intermediates/Skillet.build/Debug-iphonesimulator/Skillet.build/Objects-normal/x86_64/Skillet.swiftmodule -mios-simulator-version-min=8.1 -licucore -framework QuartzCore -framework CoreGraphics -framework Accelerate -framework CoreTelephony -framework SystemConfiguration -framework Foundation -framework UIKit -framework Bolts -framework Social -framework Accounts -framework Crashlytics -framework AVFoundation -framework CoreMedia -framework Parse -framework CoreText -framework MediaAccessibility -framework MediaPlayer -framework CFNetwork -framework Security -framework AudioToolbox -framework CoreLocation -lsqlite3 -lz -framework MobileCoreServices -framework StoreKit -framework FBSDKShareKit -framework Fabric -framework FBSDKCoreKit -framework FBSDKLoginKit -lPods -Xlinker -dependency_info -Xlinker /Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Intermediates/Skillet.build/Debug-iphonesimulator/Skillet.build/Objects-normal/x86_64/Skillet_dependency_info.dat -o /Users/zheref/Library/Developer/Xcode/DerivedData/Skillet-gyrvrgajwggdcmhhtxflcerwovjx/Build/Products/Debug-iphonesimulator/Skillet.app/Skillet

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_Mixpanel", referenced from:
  __TMaCSo8Mixpanel in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我使用的是 Swift 语言(根本不是 Objective-C)。

提前致谢。

更新 1

当我放行时出现问题: Mixpanel.sharedInstanceWithToken(MIXPANEL_TOKEN); 而不是之前。

当我在项目中安装 Mixpanel 代码时没有问题,甚至当我从 Bridging Header 导入它时也没有问题。

最佳答案

我有同样的问题,我只是尝试通过单独拖入我的项目来重新添加框架文件。

Like:

不要直接拖动文件夹,而是只将文件拖到您的项目中。

也不要忘记链接框架

SystemConfiguration, CoreTelephony, Accelerate, Security, CFNetwork, QuartzCore, libicucore.tbd

关于ios - 从 : "_OBJC_CLASS_$_Mixpanel", o 引用的体系结构 x86_64 : __TMaCSo8Mixpanel in AppDelegate. 找不到符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32363208/

相关文章:

ios - 开始循环后由于内存问题而终止

android - (Android、iOS、Windows、Linux)服务器轮询、推送、实现服务器

ios - 用于在 ios 9 方法 ios swift 中登录的 facebook openurl

ios - Xcode UI 测试按钮未点击

iphone - Xcode 断点不显示当前对象

xcode - AutoLayout约束WithVisualFormat垂直居中两个 View

ios - Safari web 检查器只显示源、控制台和审计

objective-c - 为什么 Xcode 说它可能会泄漏?

swift - UITabBarController 始终在 UIViewController 顶部打开页面

ios - 如何在隐藏 UIView 后重置 tableview 内容高度