在 Xcode 上运行我的统一项目时出现错误。相同的代码在 Android 上运行。我能够成功创建 iOS 构建,但是在尝试运行此代码时遇到此错误。
Undefined symbol: _getUnityPurchasingAppReceipt
Undefined symbol: _unityPurchasingInterceptPromotionalPurchases
Undefined symbol: _unityPurchasingRetrieveProducts
Undefined symbol: _unityPurchasingAddTransactionObserver
Undefined symbol: _unityPurchasingFinishTransaction
d /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Binary/mylifes normal armv7 (in target 'Unity-iPhone' from project 'Unity-iPhone')
cd /Volumes/DATA/MyLifeNew/asd
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target armv7-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -L/Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -L/Volumes/DATA/MyLifeNew/asd -L/Volumes/DATA/MyLifeNew/asd/Libraries -F/Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -F/Volumes/DATA/MyLifeNew/asd/Frameworks/GoogleMapsView/Scripts/Editor/Libs/iOS/Frameworks -filelist /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mylifes.LinkFileList -Xlinker -map -Xlinker /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/mylifes-LinkMap-normal-armv7.txt -dead_strip -Xlinker -object_path_lto -Xlinker /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mylifes_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -Xlinker -final_output -Xlinker /Applications/mylifes.app/mylifes -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -framework MobileCoreServices -framework ImageIO -weak_framework Photos -framework AssetsLibrary -ObjC -framework MobileCoreServices -framework ImageIO -weak_framework Photos -framework AssetsLibrary -framework Security -framework MediaToolbox -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework AVKit -framework CFNetwork -framework CoreGraphics -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lil2cpp -framework GoogleMaps -framework GoogleMapsCore -framework GoogleMapsBase -framework CoreData -framework CoreTelephony -framework Accelerate -framework CoreImage -framework GLKit -framework ImageIO -weak_framework Metal -lc++ -lz -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mylifes_dependency_info.dat -o /Users/apple/Library/Developer/Xcode/DerivedData/Unity-iPhone-cgkdtpvfwzobjogspayyfdcwvpvo/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/Binary/mylifes
Undefined symbols for architecture armv7:
"_getUnityPurchasingAppReceipt", referenced from:
_iOSStoreBindings_getUnityPurchasingAppReceipt_m6A60BAEE03E897FA0A848C6D14E86BDBEBFBCAA8 in Apple.o
_iOSStoreBindings_get_appReceipt_mCD0A2253F585712CF562E13585D8EC21B8EA2A5D in Apple.o
(maybe you meant: _OSXStoreBindings_getUnityPurchasingAppReceipt_m702EC6E592BBF681A0A84538DFEA076459A6D702, _iOSStoreBindings_getUnityPurchasingAppReceipt_m6A60BAEE03E897FA0A848C6D14E86BDBEBFBCAA8 )
"_unityPurchasingInterceptPromotionalPurchases", referenced from:
_OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m01F28E4125E6D167E625F57561DBE34AAB53CCEF in Apple.o
_OSXStoreBindings_InterceptPromotionalPurchases_mFF8D85DEDEF59020697923491B985357D1EE3DFE in Apple.o
_iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m8C670C20CE1B334EE3D60D07FF893511B3EF2D4C in Apple.o
_iOSStoreBindings_InterceptPromotionalPurchases_m4EA28EDA8038AC202207C4D13365A12C62F96A3C in Apple.o
(maybe you meant: _iOSStoreBindings_unityPurchasingInterceptPromotionalPurchases_m8C670C20CE1B334EE3D60D07FF893511B3EF2D4C, _OSXStoreBindings_unityPurchasingInterceptPromotionalPurchases_m01F28E4125E6D167E625F57561DBE34AAB53CCEF )
"_unityPurchasingRetrieveProducts", referenced from:
_iOSStoreBindings_unityPurchasingRetrieveProducts_m2A041EE0C0BC00F62F3A3FFA9F9E8ACFEB958518 in Apple.o
_iOSStoreBindings_RetrieveProducts_m656192EA9DE8CB00AF315BF6E28B051B2AD1345E in Apple.o
(maybe you meant: _iOSStoreBindings_unityPurchasingRetrieveProducts_m2A041EE0C0BC00F62F3A3FFA9F9E8ACFEB958518, _OSXStoreBindings_unityPurchasingRetrieveProducts_m762C673967DF6672FE9D65DEE647142F0601572B )
"_unityPurchasingPurchase", referenced from:
_iOSStoreBindings_unityPurchasingPurchase_mFD22E87273DE76B0601FA15BCEF88912A16DD4B0 in Apple.o
(maybe you meant: _iOSStoreBindings_unityPurchasingPurchase_mFD22E87273DE76B0601FA15BCEF88912A16DD4B0, _OSXStoreBindings_unityPurchasingPurchase_m934CC8567A5B2054950D231AAC29F221E18D7DD8 )
"_unityPurchasingRestoreTransactions", referenced from:
_iOSStoreBindings_unityPurchasingRestoreTransactions_m9225BF72B53FE29D478C2A45308D70308597C405 in Apple.o
_iOSStoreBindings_RestoreTransactions_m86D1878BBA41131670DCCCE4F7675BF8D59D3F10 in Apple.o
(maybe you meant: _iOSStoreBindings_unityPurchasingRestoreTransactions_m9225BF72B53FE29D478C2A45308D70308597C405, _OSXStoreBindings_unityPurchasingRestoreTransactions_m80BB9063E4017D66A850FC9B5DF913D0AD9241C7 )
"_setUnityPurchasingCallback", referenced from:
_iOSStoreBindings_setUnityPurchasingCallback_m5F1BDBED30B03390B64FB05539D41582AF2A549B in Apple.o
_iOSStoreBindings_SetUnityPurchasingCallback_m36A393C71C676A3618C4876D86C6904BD5576F84 in Apple.o
(maybe you meant: _OSXStoreBindings_setUnityPurchasingCallback_mEB07C17BD0B86B2B1CCE9EDEB65EA26FBA4CDCBB, _iOSStoreBindings_setUnityPurchasingCallback_m5F1BDBED30B03390B64FB05539D41582AF2A549B )
"_unityPurchasingAddTransactionObserver", referenced from:
_iOSStoreBindings_unityPurchasingAddTransactionObserver_m8B19DC717DC475661FCC4AADC0B820575AC24074 in Apple.o
_iOSStoreBindings_AddTransactionObserver_m7D55A46F27FDCC9B54367D761B4339CE85A389B6 in Apple.o
(maybe you meant: _OSXStoreBindings_unityPurchasingAddTransactionObserver_mE966496A18B53467C15198051687E4075E74DD3C, _iOSStoreBindings_unityPurchasingAddTransactionObserver_m8B19DC717DC475661FCC4AADC0B820575AC24074 )
"_unityPurchasingFinishTransaction", referenced from:
_iOSStoreBindings_unityPurchasingFinishTransaction_mD9D2C05357EF7ADC5F5343BB87CC13CBD751653F in Apple.o
(maybe you meant: _iOSStoreBindings_unityPurchasingFinishTransaction_mD9D2C05357EF7ADC5F5343BB87CC13CBD751653F, _OSXStoreBindings_unityPurchasingFinishTransaction_m145373244A1B58D5642E452D85C0ED21F9C07946 )
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)