iOS开发缺少framework对应错误提示

本文详细分析了iOS应用开发过程中遇到的各种链接错误,包括StoreKit、iAd、JavaScriptCore等框架的问题,并提供了针对不同框架中缺失符号的具体示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

StoreKit.framework

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPayment", referenced from:
objc-class-ref in Parse(PFPurchase.o)
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in Parse(PFPurchase.o)
objc-class-ref in Parse(PFPaymentTransactionObserver.o)
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in Parse(PFPurchase.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

iAd.framework

ld: warning: ignoring file /Users/macmini/Desktop/Test/iAd.framework/iAd, missing required architecture i386 in file /Users/macmini/Desktop/Test/iAd.framework/iAd (2 slices)

Undefined symbols for architecture i386:

  "_ADBannerContentSizeIdentifier320x50", referenced from:
      -[ViewController viewDidLoad] in ViewController.o

  "_OBJC_CLASS_$_ADBannerView", referenced from:
      objc-class-ref in ViewController.o

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

JavaScriptCore.framework

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_JSValue", referenced from:
      objc-class-ref in MOBFoundation
  "_OBJC_CLASS_$_JSContext", referenced from:
      objc-class-ref in MOBFoundation
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only

ImageIO.framework

Undefined symbols for architecture armv7:
  "_kCGImageSourceThumbnailMaxPixelSize", referenced from:
      +[UIImage(WBSDKResize) wbsdk_resizeImageToMaxSize:sourcePath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_kCGImageSourceCreateThumbnailWithTransform", referenced from:
      +[UIImage(WBSDKResize) wbsdk_resizeImageToMaxSize:sourcePath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_kCGImageSourceCreateThumbnailFromImageAlways", referenced from:
      +[UIImage(WBSDKResize) wbsdk_resizeImageToMaxSize:sourcePath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_kCGImagePropertyPixelHeight", referenced from:
      +[UIImage(WBSDKResize) wbsdk_imageSizeWithoutLoadingWithPath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_kCGImagePropertyPixelWidth", referenced from:
      +[UIImage(WBSDKResize) wbsdk_imageSizeWithoutLoadingWithPath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_CGImageSourceCopyPropertiesAtIndex", referenced from:
      +[UIImage(WBSDKResize) wbsdk_imageSizeWithoutLoadingWithPath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_CGImageSourceCreateWithURL", referenced from:
      +[UIImage(WBSDKResize) wbsdk_resizeImageToMaxSize:sourcePath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
      +[UIImage(WBSDKResize) wbsdk_imageSizeWithoutLoadingWithPath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
  "_CGImageSourceCreateThumbnailAtIndex", referenced from:
      +[UIImage(WBSDKResize) wbsdk_resizeImageToMaxSize:sourcePath:] in libWeiboSDK.a(UIImage+WBSDKResize.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

SystemConfiguration.framework

Undefined symbols for architecture i386: 
"_SCError", referenced from: 
-[Reachability startNotifier] in Reachability.o 
"_SCErrorString", referenced from: 
-[Reachability startNotifier] in Reachability.o 
"_SCNetworkReachabilityCreateWithAddress", referenced from: 
+[Reachability reachabilityWithAddress:] in Reachability.o 
"_SCNetworkReachabilityCreateWithName", referenced from: 
+[Reachability reachabilityWithHostname:] in Reachability.o 
"_SCNetworkReachabilityGetFlags", referenced from: 
-[Reachability isReachable] in Reachability.o 
-[Reachability isReachableViaWWAN] in Reachability.o 
-[Reachability isReachableViaWiFi] in Reachability.o 
-[Reachability connectionRequired] in Reachability.o 
-[Reachability isConnectionOnDemand] in Reachability.o 
-[Reachability isInterventionRequired] in Reachability.o 
-[Reachability reachabilityFlags] in Reachability.o 
... 
"_SCNetworkReachabilitySetCallback", referenced from: 
-[Reachability startNotifier] in Reachability.o 
-[Reachability stopNotifier] in Reachability.o 
"_SCNetworkReachabilitySetDispatchQueue", referenced from: 
-[Reachability startNotifier] in Reachability.o 
-[Reachability stopNotifier] in Reachability.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture armv7:
  "_GKPlayerAuthenticationDidChangeNotificationName", referenced from:
      -[NSGameCenter init] in NSGameCenter.o
      -[NSGameCenter registerForAuthenticationNotification] in NSGameCenter.o
  "_OBJC_CLASS_$_GKAchievementViewController", referenced from:
      objc-class-ref in NSGameCenter.o
  "_OBJC_CLASS_$_GKScore", referenced from:
      objc-class-ref in NSGameCenter.o
  "_OBJC_CLASS_$_GKLeaderboardViewController", referenced from:
      objc-class-ref in NSGameCenter.o
  "_OBJC_CLASS_$_GKLocalPlayer", referenced from:
      objc-class-ref in NSGameCenter.o
  "_OBJC_CLASS_$_GKAchievement", referenced from:
      objc-class-ref in NSGameCenter.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

MediaPlayer.framework

 "_OBJC_CLASS_$_MPMusicPlayerController", referenced from:
      objc-class-ref in ocCoreSound.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

MediaPlayer.framework EventKitUI.framework EventKit.framework

"_OBJC_CLASS_$_EKEvent", referenced from:       objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
libGoogleAdMobAds.a  not found for architecture armv7

AVFoundation.framework

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_AVAudioSession", referenced from:
  objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
  "_AVAudioSessionPortHeadphones", referenced from:
      -[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)
  "_AVAudioSessionPortBuiltInSpeaker", referenced from:
      -[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o)

Security.framework CoreText.framework

 "_kSecReturnAttributes", referenced from:
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecAttrLabel", referenced from:
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_SecItemUpdate", referenced from:
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecValueData", referenced from:
      +[ShareSDKCoreService(Private) saveWithUDID:] in ShareSDKCoreService
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecReturnData", referenced from:
      +[ShareSDKCoreService(Private) loadUDID] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecMatchLimitOne", referenced from:
      +[ShareSDKCoreService(Private) loadUDID] in ShareSDKCoreService
  "_SecItemCopyMatching", referenced from:
      +[ShareSDKCoreService(Private) loadUDID] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecClass", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecMatchLimit", referenced from:
      +[ShareSDKCoreService(Private) loadUDID] in ShareSDKCoreService
  "_kSecAttrService", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecClassGenericPassword", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_CTFontManagerRegisterFontsForURL", referenced from:
      -[CCLabelTTF getFontName:] in CCLabelTTF.o
  "_kSecAttrAccount", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
      +[SFHFKeychainUtils getPasswordForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_kSecAttrAccessibleAfterFirstUnlock", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
  "_kSecAttrAccessible", referenced from:
      +[ShareSDKCoreService(Private) keychainQuery] in ShareSDKCoreService
  "_SecItemDelete", referenced from:
      +[ShareSDKCoreService(Private) saveWithUDID:] in ShareSDKCoreService
      +[SFHFKeychainUtils deleteItemForUsername:andServiceName:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
  "_SecItemAdd", referenced from:
      +[ShareSDKCoreService(Private) saveWithUDID:] in ShareSDKCoreService
      +[SFHFKeychainUtils storeUsername:andPassword:forServiceName:updateExisting:error:] in libTCWeiboSDK.a(SFHFKeychainUtils.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值