たまーにiOSアプリをバージョンしようと思って
ついでにAdmobSDKもバージョンアップしとこうと思うと、
まずこのSDK入れ替えた時点でエラー出る・・
いつも試行錯誤でエラー文言からググったりしていたけど。
Undefined symbols for architecture
とか
symbol(s) not found for architecture
とか
linker command failed with exit code 1 (use -v to see invocation)
とか
だいたいframeworkを追加してなおることが多い。
でもAdmobのガイド見て必要なframework入れてるじゃん!
と思い釈然としていなかったけど、
なんか全部書いていないようなのね。
ここを見たら良さげというページを見つけたのでメモ。
Release Notes
https://firebase.google.com/docs/admob/release-notes
“〜の依存関係を追加しました。”あたりに注意
SDKのバージョンが
◆7.9.0のとき追加になった
GLKit,
OpenGLES,
CoreMotion
CoreVideo framework
◆7.8.0のとき追加になった
CoreBluetooth
SafariServices
などなど。
これら追加したらスッキリ解消。
お試しください!
〜〜〜〜〜
その他関連メモ
「”○○”, referenced from:」と表示される場合、その関数(○○)を含んでいるライブラリを追加することで解決できます。
| framework名 | 定義されている関数など |
|---|---|
| GLKit.framework | _OBJC_CLASS_$_GLKView |
| _GLKMatrix4Identity | |
| MobileCoreServices.framework | _kUTTagClassMIMEType |
| _UTTypeCreatePreferredIdentifierForTag | |
| CoreVideo.framework | _CVOpenGLESTextureCacheCreateTextureFromImage |
| _CVOpenGLESTextureGetName | |
| _CVOpenGLESTextureCacheCreate | |
| _CVOpenGLESTextureCacheFlush | |
| _CVPixelBufferGetWidth | |
| _CVOpenGLESTextureGetTarget | |
| _kCVPixelBufferPixelFormatTypeKey | |
| _kCVImageBufferYCbCrMatrix_ITU_R_601_4 | |
| _CVPixelBufferGetHeight | |
| _CVBufferGetAttachment | |
| _kCVImageBufferYCbCrMatrixKey | |
| StoreKit.framework | _OBJC_CLASS_$_SKProductsRequest |
| _OBJC_CLASS_$_SKMutablePayment | |
| _OBJC_CLASS_$_SKPaymentQueue | |
| _OBJC_CLASS_$_SKStoreProductViewController | |
| _SKStoreProductParameterITunesItemIdentifier | |
| MediaPlayer.framework | _MPMoviePlayerPlaybackDidFinishNotification |
| _MPMoviePlayerPlaybackStateDidChangeNotification | |
| _OBJC_CLASS_$_MPMoviePlayerController | |
| _OBJC_CLASS_$_MPVolumeView | |
| SafariServices.framework | _OBJC_CLASS_$_SFSafariViewController |
| AdSupport.framework | _OBJC_CLASS_$_ASIdentifierManager |
| CoreMotion.framework | _OBJC_CLASS_$_CMMotionManager |
| CoreTelephony.framework | _CTRadioAccessTechnologyDidChangeNotification |
| _OBJC_CLASS_$_CTTelephonyNetworkInfo | |
| MessageUI.framework | _OBJC_CLASS_$_MFMailComposeViewController |
| _OBJC_CLASS_$_MFMessageComposeViewController | |
| CoreText.framework | _CTFramesetterCreateWithAttributedString |
| _CTFramesetterSuggestFrameSizeWithConstraints | |
| GameKit.framework | _OBJC_CLASS_$_GKAchievement |
| _OBJC_CLASS_$_GKScore | |
| _OBJC_CLASS_$_GKGameCenterViewController | |
| _OBJC_CLASS_$_GKLocalPlayer | |
| SystemConfiguration.framework | _SCNetworkReachabilityCreateWithAddress |
| _SCNetworkReachabilityGetFlags | |
| _SCNetworkReachabilityCreateWithName | |
| _SCNetworkReachabilitySetDispatchQueue | |
| _SCNetworkReachabilitySetCallback | |
| Security.framework | _SecCertificateCreateWithData |
| _SecTrustCopyExceptions | |
| _SecTrustEvaluate | |
| _SecTrustSetAnchorCertificates | |
| _SecTrustSetExceptions | |
| CoreMedia.framework | _CMTimeGetSeconds |
| _CMTimeMakeWithSeconds | |
| _CMTimeMake | |
| _kCMTimeZero | |
| OpenGLES.framework | _OBJC_CLASS_$_EAGLContext |
| _glActiveTexture | |
| CFNetwork.framework | _CFHostCreateWithName |
| _CFHostStartInfoResolution | |
| _CFHostGetAddressing |
〜〜〜〜〜
エラーメモ。
Undefined symbols for architecture x86_64:
“_GLKMatrix4Identity”, referenced from:
l2392 in GoogleMobileAds(flat-x86_64)
l2402 in GoogleMobileAds(flat-x86_64)
“_OBJC_CLASS_$_CMMotionManager”, referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64)
“_OBJC_CLASS_$_GLKView”, referenced from:
objc-class-ref in GoogleMobileAds(flat-x86_64)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)—–


コメント