Facebook-sdk-for-unity: Unity Cloud Build iOS fails

Created on 27 Jun 2017  ·  7Comments  ·  Source: facebook/facebook-sdk-for-unity

facebook-sdk-for-unity version: 7.10.0
using latest 5.x version of unity

Here are the errors in the cloud build log:

11414: [xcode] Undefined symbols for architecture armv7:
11415: [xcode] "_IOSFBFetchDeferredAppLink", referenced from:
11416: [xcode] _IOSWrapper_FetchDeferredAppLink_m3892819798 in Bulk_Facebook.Unity.IOS_0.o
11417: [xcode] _IOSWrapper_IOSFBFetchDeferredAppLink_m4025468277 in Bulk_Facebook.Unity.IOS_0.o
11418: [xcode] (maybe you meant: _IOSWrapper_IOSFBFetchDeferredAppLink_m4025468277)
11419: [xcode] "_IOSFBSdkVersion", referenced from:
11420: [xcode] _IOSWrapper_FBSdkVersion_m1433820366 in Bulk_Facebook.Unity.IOS_0.o
11421: [xcode] _IOSWrapper_IOSFBSdkVersion_m1954204313 in Bulk_Facebook.Unity.IOS_0.o
11422: [xcode] (maybe you meant: _IOSWrapper_IOSFBSdkVersion_m1954204313)
11423: [xcode] "_IOSFBRefreshCurrentAccessToken", referenced from:
11424: [xcode] _IOSWrapper_RefreshCurrentAccessToken_m2438835001 in Bulk_Facebook.Unity.IOS_0.o
11425: [xcode] _IOSWrapper_IOSFBRefreshCurrentAccessToken_m1240471684 in Bulk_Facebook.Unity.IOS_0.o
11426: [xcode] (maybe you meant: _IOSWrapper_IOSFBRefreshCurrentAccessToken_m1240471684)
11427: [xcode] "_IOSFBGetAppLink", referenced from:
11428: [xcode] _IOSWrapper_GetAppLink_m2773878673 in Bulk_Facebook.Unity.IOS_0.o
11429: [xcode] _IOSWrapper_IOSFBGetAppLink_m459813758 in Bulk_Facebook.Unity.IOS_0.o
11430: [xcode] (maybe you meant: _IOSWrapper_IOSFBGetAppLink_m459813758)
11431: [xcode] "_IOSFBAppEventsLogEvent", referenced from:
11432: [xcode] _IOSWrapper_IOSFBAppEventsLogEvent_m1319076241 in Bulk_Facebook.Unity.IOS_0.o
11433: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsLogEvent_m1319076241)
11434: [xcode] "_IOSFBShareLink", referenced from:
11435: [xcode] _IOSWrapper_IOSFBShareLink_m3128905012 in Bulk_Facebook.Unity.IOS_0.o
11436: [xcode] (maybe you meant: _IOSWrapper_IOSFBShareLink_m3128905012)
11437: [xcode] "_IOSFBAppEventsSetLimitEventUsage", referenced from:
11438: [xcode] _IOSWrapper_FBAppEventsSetLimitEventUsage_m3970473682 in Bulk_Facebook.Unity.IOS_0.o
11439: [xcode] _IOSWrapper_IOSFBAppEventsSetLimitEventUsage_m1765600937 in Bulk_Facebook.Unity.IOS_0.o
11440: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsSetLimitEventUsage_m1765600937)
11441: [xcode] "_IOSFBLogInWithReadPermissions", referenced from:
11442: [xcode] _IOSWrapper_LogInWithReadPermissions_m2416395187 in Bulk_Facebook.Unity.IOS_0.o
11443: [xcode] _IOSWrapper_IOSFBLogInWithReadPermissions_m1929637458 in Bulk_Facebook.Unity.IOS_0.o
11444: [xcode] (maybe you meant: _IOSWrapper_IOSFBLogInWithReadPermissions_m1929637458)
11445: [xcode] "_IOSFBLogInWithPublishPermissions", referenced from:
11446: [xcode] _IOSWrapper_LogInWithPublishPermissions_m1237464384 in Bulk_Facebook.Unity.IOS_0.o
11447: [xcode] _IOSWrapper_IOSFBLogInWithPublishPermissions_m1193287201 in Bulk_Facebook.Unity.IOS_0.o
11448: [xcode] (maybe you meant: _IOSWrapper_IOSFBLogInWithPublishPermissions_m1193287201)
11449: [xcode] "_IOSFBAppInvite", referenced from:
11450: [xcode] _IOSWrapper_IOSFBAppInvite_m1414880447 in Bulk_Facebook.Unity.IOS_0.o
11451: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppInvite_m1414880447)
11452: [xcode] "_IOSFBFeedShare", referenced from:
11453: [xcode] _IOSWrapper_IOSFBFeedShare_m2674999132 in Bulk_Facebook.Unity.IOS_0.o
11454: [xcode] (maybe you meant: _IOSWrapper_IOSFBFeedShare_m2674999132)
11455: [xcode] "_IOSFBAppEventsLogPurchase", referenced from:
11456: [xcode] _IOSWrapper_IOSFBAppEventsLogPurchase_m1964399802 in Bulk_Facebook.Unity.IOS_0.o
11457: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsLogPurchase_m1964399802)
11458: [xcode] "_IOSFBSetShareDialogMode", referenced from:
11459: [xcode] _IOSWrapper_SetShareDialogMode_m4089495540 in Bulk_Facebook.Unity.IOS_0.o
11460: [xcode] _IOSWrapper_IOSFBSetShareDialogMode_m3394844047 in Bulk_Facebook.Unity.IOS_0.o
11461: [xcode] (maybe you meant: _IOSWrapper_IOSFBSetShareDialogMode_m3394844047)
11462: [xcode] "_IOSFBInit", referenced from:
11463: [xcode] _IOSWrapper_IOSFBInit_m902272037 in Bulk_Facebook.Unity.IOS_0.o
11464: [xcode] (maybe you meant: _IOSWrapper_IOSFBInit_m902272037)
11465: [xcode] "_IOSFBSettingsActivateApp", referenced from:
11466: [xcode] _IOSWrapper_FBSettingsActivateApp_m3904596848 in Bulk_Facebook.Unity.IOS_0.o
11467: [xcode] _IOSWrapper_IOSFBSettingsActivateApp_m797401977 in Bulk_Facebook.Unity.IOS_0.o
11468: [xcode] (maybe you meant: _IOSWrapper_IOSFBSettingsActivateApp_m797401977)
11469: [xcode] "_IOSFBAppRequest", referenced from:
11470: [xcode] _IOSWrapper_IOSFBAppRequest_m3493977217 in Bulk_Facebook.Unity.IOS_0.o
11471: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppRequest_m3493977217)
11472: [xcode] "_IOSFBLogOut", referenced from:
11473: [xcode] _IOSWrapper_LogOut_m1708493573 in Bulk_Facebook.Unity.IOS_0.o
11474: [xcode] _IOSWrapper_IOSFBLogOut_m1975029250 in Bulk_Facebook.Unity.IOS_0.o
11475: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires normal arm64
11476: [xcode] cd /BUILD_PATH/cerberus-interactive-inc.towar.ios-test/temp.RmtJeC
11477: [xcode] export IPHONEOS_DEPLOYMENT_TARGET=7.0
11478: [xcode] export PATH="/APPLICATION_PATH/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/APPLICATION_PATH/Xcode.app/Contents/Developer/usr/bin:/APPLICATION_PATH/Android Studio.app/sdk:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/BUILD_PATH/.mason/buildpacks/unity/libs/vendor/jsawk:/BUILD_PATH/.mason/buildpacks/xcode/libs/vendor/jsawk:/BUILD_PATH/.rvm/bin"
11479: [xcode] /APPLICATION_PATH/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /APPLICATION_PATH/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -L/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -L/BUILD_PATH/cerberus-interactive-inc.towar.ios-test/temp.RmtJeC -L/BUILD_PATH/cerberus-interactive-inc.towar.ios-test/temp.RmtJeC/Libraries -F/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -F/BUILD_PATH/cerberus-interactive-inc.towar.ios-test/temp.RmtJeC/Frameworks/Libraries/towar-mobile-library-facebook/Plugins/iOS -filelist /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires.LinkFileList -Xlinker -map -Xlinker /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/atlasempires-LinkMap-normal-arm64.txt -miphoneos-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos -Xlinker -final_output -Xlinker /APPLICATION_PATH/atlasempires.app/atlasempires -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -framework MediaToolbox -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -framework FBSDKCoreKit -framework FBSDKShareKit -framework FBSDKLoginKit -framework Bolts -weak_framework Metal -Xlinker -dependency_info -Xlinker /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires_dependency_info.dat -o /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires
11480: [xcode] Undefined symbols for architecture arm64:
11481: [xcode] "_IOSFBFetchDeferredAppLink", referenced from:
11482: [xcode] _IOSWrapper_FetchDeferredAppLink_m3892819798 in Bulk_Facebook.Unity.IOS_0.o
11483: [xcode] _IOSWrapper_IOSFBFetchDeferredAppLink_m4025468277 in Bulk_Facebook.Unity.IOS_0.o
11484: [xcode] (maybe you meant: _IOSWrapper_IOSFBFetchDeferredAppLink_m4025468277)
11485: [xcode] "_IOSFBSdkVersion", referenced from:
11486: [xcode] _IOSWrapper_FBSdkVersion_m1433820366 in Bulk_Facebook.Unity.IOS_0.o
11487: [xcode] _IOSWrapper_IOSFBSdkVersion_m1954204313 in Bulk_Facebook.Unity.IOS_0.o
11488: [xcode] (maybe you meant: _IOSWrapper_IOSFBSdkVersion_m1954204313)
11489: [xcode] "_IOSFBRefreshCurrentAccessToken", referenced from:
11490: [xcode] _IOSWrapper_RefreshCurrentAccessToken_m2438835001 in Bulk_Facebook.Unity.IOS_0.o
11491: [xcode] _IOSWrapper_IOSFBRefreshCurrentAccessToken_m1240471684 in Bulk_Facebook.Unity.IOS_0.o
11492: [xcode] (maybe you meant: _IOSWrapper_IOSFBRefreshCurrentAccessToken_m1240471684)
11493: [xcode] "_IOSFBGetAppLink", referenced from:
11494: [xcode] _IOSWrapper_GetAppLink_m2773878673 in Bulk_Facebook.Unity.IOS_0.o
11495: [xcode] _IOSWrapper_IOSFBGetAppLink_m459813758 in Bulk_Facebook.Unity.IOS_0.o
11496: [xcode] (maybe you meant: _IOSWrapper_IOSFBGetAppLink_m459813758)
11497: [xcode] "_IOSFBAppEventsLogEvent", referenced from:
11498: [xcode] _IOSWrapper_IOSFBAppEventsLogEvent_m1319076241 in Bulk_Facebook.Unity.IOS_0.o
11499: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsLogEvent_m1319076241)
11500: [xcode] "_IOSFBShareLink", referenced from:
11501: [xcode] _IOSWrapper_IOSFBShareLink_m3128905012 in Bulk_Facebook.Unity.IOS_0.o
11502: [xcode] (maybe you meant: _IOSWrapper_IOSFBShareLink_m3128905012)
11503: [xcode] "_IOSFBAppEventsSetLimitEventUsage", referenced from:
11504: [xcode] _IOSWrapper_FBAppEventsSetLimitEventUsage_m3970473682 in Bulk_Facebook.Unity.IOS_0.o
11505: [xcode] _IOSWrapper_IOSFBAppEventsSetLimitEventUsage_m1765600937 in Bulk_Facebook.Unity.IOS_0.o
11506: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsSetLimitEventUsage_m1765600937)
11507: [xcode] "_IOSFBLogInWithReadPermissions", referenced from:
11508: [xcode] _IOSWrapper_LogInWithReadPermissions_m2416395187 in Bulk_Facebook.Unity.IOS_0.o
11509: [xcode] _IOSWrapper_IOSFBLogInWithReadPermissions_m1929637458 in Bulk_Facebook.Unity.IOS_0.o
11510: [xcode] (maybe you meant: _IOSWrapper_IOSFBLogInWithReadPermissions_m1929637458)
11511: [xcode] "_IOSFBLogInWithPublishPermissions", referenced from:
11512: [xcode] _IOSWrapper_LogInWithPublishPermissions_m1237464384 in Bulk_Facebook.Unity.IOS_0.o
11513: [xcode] _IOSWrapper_IOSFBLogInWithPublishPermissions_m1193287201 in Bulk_Facebook.Unity.IOS_0.o
11514: [xcode] (maybe you meant: _IOSWrapper_IOSFBLogInWithPublishPermissions_m1193287201)
11515: [xcode] "_IOSFBAppInvite", referenced from:
11516: [xcode] _IOSWrapper_IOSFBAppInvite_m1414880447 in Bulk_Facebook.Unity.IOS_0.o
11517: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppInvite_m1414880447)
11518: [xcode] "_IOSFBFeedShare", referenced from:
11519: [xcode] _IOSWrapper_IOSFBFeedShare_m2674999132 in Bulk_Facebook.Unity.IOS_0.o
11520: [xcode] (maybe you meant: _IOSWrapper_IOSFBFeedShare_m2674999132)
11521: [xcode] "_IOSFBAppEventsLogPurchase", referenced from:
11522: [xcode] _IOSWrapper_IOSFBAppEventsLogPurchase_m1964399802 in Bulk_Facebook.Unity.IOS_0.o
11523: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppEventsLogPurchase_m1964399802)
11524: [xcode] "_IOSFBSetShareDialogMode", referenced from:
11525: [xcode] _IOSWrapper_SetShareDialogMode_m4089495540 in Bulk_Facebook.Unity.IOS_0.o
11526: [xcode] _IOSWrapper_IOSFBSetShareDialogMode_m3394844047 in Bulk_Facebook.Unity.IOS_0.o
11527: [xcode] (maybe you meant: _IOSWrapper_IOSFBSetShareDialogMode_m3394844047)
11528: [xcode] "_IOSFBInit", referenced from:
11529: [xcode] _IOSWrapper_IOSFBInit_m902272037 in Bulk_Facebook.Unity.IOS_0.o
11530: [xcode] (maybe you meant: _IOSWrapper_IOSFBInit_m902272037)
11531: [xcode] "_IOSFBSettingsActivateApp", referenced from:
11532: [xcode] _IOSWrapper_FBSettingsActivateApp_m3904596848 in Bulk_Facebook.Unity.IOS_0.o
11533: [xcode] _IOSWrapper_IOSFBSettingsActivateApp_m797401977 in Bulk_Facebook.Unity.IOS_0.o
11534: [xcode] (maybe you meant: _IOSWrapper_IOSFBSettingsActivateApp_m797401977)
11535: [xcode] "_IOSFBAppRequest", referenced from:
11536: [xcode] _IOSWrapper_IOSFBAppRequest_m3493977217 in Bulk_Facebook.Unity.IOS_0.o
11537: [xcode] (maybe you meant: _IOSWrapper_IOSFBAppRequest_m3493977217)
11538: [xcode] "_IOSFBLogOut", referenced from:
11539: [xcode] _IOSWrapper_LogOut_m1708493573 in Bulk_Facebook.Unity.IOS_0.o
11540: [xcode] _IOSWrapper_IOSFBLogOut_m1975029250 in Bulk_Facebook.Unity.IOS_0.o
11541: [xcode] (maybe you meant: _IOSWrapper_IOSFBLogOut_m1975029250)
11542: [xcode] ld: symbol(s) not found for architecture arm64
11543: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
11544: [xcode] * ARCHIVE FAILED *
11545: [xcode] The following build commands failed:
11546: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-epaeakfndqkfzegvgdqfylzgthwf/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/atlasempires normal arm64
11547: [xcode] (1 failure)

Most helpful comment

For those of you may encounter this after, I solved this problem by, under FacebookSDK/SDK/Editor/iOS there are two files FBUnityInterface.mm and FBUnityUtility.mm, checked the iOS checkbox under "Select platforms for plugin", and then rebuild you should have no problem.

All 7 comments

Did it run the set up script beforehand? Looks like all DllImport are failing.

I'm getting exactly the same problem.

What do you mean by setup script? We set this up using the following page:

https://developers.facebook.com/docs/unity/getting-started/ios

We then got a couple of compile errors:

/Users/liam/Desktop/PolyCharge/Libraries/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm:354:96: Cannot initialize a parameter of type 'id' with an lvalue of type 'FBUnitySDKDelegate *__strong'
/Users/liam/Desktop/PolyCharge/Frameworks/FacebookSDK/Plugins/iOS/FBSDKShareKit.framework/Headers/FBSDKAppGroupJoinDialog.h:35:70: Passing argument to parameter 'delegate' here
/Users/liam/Desktop/PolyCharge/Libraries/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm:381:21: Assigning to 'id' from incompatible type 'FBUnitySDKDelegate *'

If I comment these lines out, the build continues, but then xcode complains at version 7 being used due to TwitterKit, and forces the sdk version up to 9.0

At this point the compile finishes but we end up with the above linker errors.

Any advice would be greatly appreciated

Another note, the download for 7.10.0 in the following page:
https://developers.facebook.com/docs/unity/downloads
Actually links to 7.9.4 (we found 7.10.0 somewhere else)

P.s. we just tried going back to 7.9.4 and it all works.

For those of you may encounter this after, I solved this problem by, under FacebookSDK/SDK/Editor/iOS there are two files FBUnityInterface.mm and FBUnityUtility.mm, checked the iOS checkbox under "Select platforms for plugin", and then rebuild you should have no problem.

@jstzwd thanks for that ! It worked for me.

For others who, like me, verify that the boxes referred to by @jstzwd are checked on Windows, I found them to be unchecked when opening the project on Mac . . . I'm not sure how to check the boxes and ensure that the changes stick on Windows, but as a last resort open the project on Mac.

With that being said, I can now build locally but cloud build still fails due to undefined symbols in the SDK.

For those of you may encounter this after, I solved this problem by, under FacebookSDK/SDK/Editor/iOS there are two files FBUnityInterface.mm and FBUnityUtility.mm, checked the iOS checkbox under "Select platforms for plugin", and then rebuild you should have no problem.

thanks!
I resolved.
copy FacebookSDK/SDK/Editor/iOS to Plugins/iOS

Was this page helpful?
0 / 5 - 0 ratings