Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS Build error - Undefined symbols for architecture arm64

Discussion in 'Unity Build Automation' started by Banky, Feb 15, 2017.

  1. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Description of issue: iOS fails to build

    Unity version: 5.5.1p2

    XCode version: 8.0

    Source control: GIT - Bitbucket

    Local build platform: MacOS Sierra

    Build target: iOS

    Relevant plugins being used: Stan Assets Ultimate Mobile

    Project name: Sword01

    Build log (relevant chunk):
    61544: [xcode] Undefined symbols for architecture arm64:
    61545: [xcode] "_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
    61546: [xcode] objc-class-ref in ISN_SocialGate.o
    61547: [xcode] "_OBJC_CLASS_$_GKNotificationBanner", referenced from:
    61548: [xcode] objc-class-ref in ISN_GameCenter.o
    61549: [xcode] "_OBJC_CLASS_$_GKFriendRequestComposeViewController", referenced from:
    61550: [xcode] objc-class-ref in ISN_GameCenter.o
    61551: [xcode] "_OBJC_CLASS_$_GKAchievementViewController", referenced from:
    61552: [xcode] objc-class-ref in ISN_GameCenter.o
    61553: [xcode] "_OBJC_CLASS_$_GKAchievement", referenced from:
    61554: [xcode] objc-class-ref in ISN_GameCenter.o
    61555: [xcode] "_OBJC_CLASS_$_GKLeaderboardSet", referenced from:
    61556: [xcode] objc-class-ref in ISN_GameCenter.o
    61557: [xcode] "_OBJC_CLASS_$_GKLocalPlayer", referenced from:
    61558: [xcode] objc-class-ref in ISN_GameCenter.o
    61559: [xcode] "_OBJC_CLASS_$_GKPlayer", referenced from:
    61560: [xcode] objc-class-ref in ISN_GameCenter.o
    61561: [xcode] "_OBJC_CLASS_$_GKLeaderboard", referenced from:
    61562: [xcode] objc-class-ref in ISN_GameCenter.o
    61563: [xcode] "_OBJC_CLASS_$_GKScore", referenced from:
    61564: [xcode] objc-class-ref in ISN_GameCenter.o
    61565: [xcode] "_OBJC_CLASS_$_GKMatchmaker", referenced from:
    61566: [xcode] objc-class-ref in ISN_GameCenter.o
    61567: [xcode] "_OBJC_CLASS_$_SLRequest", referenced from:
    61568: [xcode] objc-class-ref in ISN_SocialGate.o
    61569: [xcode] "_OBJC_CLASS_$_GKGameCenterViewController", referenced from:
    61570: [xcode] objc-class-ref in ISN_GameCenter.o
    61571: [xcode] "_SLServiceTypeFacebook", referenced from:
    61572: [xcode] -[ISN_SocialGate fbPost:url:media:] in ISN_SocialGate.o
    61573: [xcode] "_ACAccountTypeIdentifierTwitter", referenced from:
    61574: [xcode] -[ISN_SocialGate twitterPostGif:url:] in ISN_SocialGate.o
    61575: [xcode] -[IOSTwitterPlugin authificateUser] in ISN_SocialGate.o
    61576: [xcode] -[IOSTwitterPlugin loadUserData] in ISN_SocialGate.o
    61577: [xcode] -[IOSTwitterPlugin IsTwitterAuthed] in ISN_SocialGate.o
    61578: [xcode] "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
    61579: [xcode] objc-class-ref in ISN_SocialGate.o
    61580: [xcode] "_OBJC_CLASS_$_SLComposeViewController", referenced from:
    61581: [xcode] objc-class-ref in ISN_SocialGate.o
    61582: [xcode] "_OBJC_CLASS_$_GKTurnBasedMatchmakerViewController", referenced from:
    61583: [xcode] objc-class-ref in ISN_GameCenter.o
    61584: [xcode] "_OBJC_CLASS_$_ACAccountStore", referenced from:
    61585: [xcode] objc-class-ref in ISN_SocialGate.o
    61586: [xcode] "_OBJC_CLASS_$_SLComposeServiceViewController", referenced from:
    61587: [xcode] objc-class-ref in ISN_SocialGate.o
    61588: [xcode] "_OBJC_CLASS_$_GKMatchRequest", referenced from:
    61589: [xcode] objc-class-ref in ISN_GameCenter.o
    61590: [xcode] "_OBJC_CLASS_$_GKMatchmakerViewController", referenced from:
    61591: [xcode] objc-class-ref in ISN_GameCenter.o
    61592: [xcode] "_OBJC_CLASS_$_GKTurnBasedMatch", referenced from:
    61593: [xcode] objc-class-ref in ISN_GameCenter.o
    61594: [xcode] "_SLServiceTypeTwitter", referenced from:
    61595: [xcode] -[ISN_SocialGate twitterPost:url:media:] in ISN_SocialGate.o
    61596: [xcode] ___37-[ISN_SocialGate twitterPostGif:url:]_block_invoke in ISN_SocialGate.o
    61597: [xcode] ___32-[IOSTwitterPlugin loadUserData]_block_invoke in ISN_SocialGate.o
    61598: [xcode] -[IOSTwitterPlugin postWithMedia:media:] in ISN_SocialGate.o
    61599: [xcode] -[IOSTwitterPlugin post:] in ISN_SocialGate.o
    61600: [xcode] -[IOSTwitterPlugin IsTwitterAvaliable] in ISN_SocialGate.o
    61601: [xcode] ld: symbol(s) not found for architecture arm64
    61602: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    61603: [xcode] ** ARCHIVE FAILED **
    61604: [xcode] The following build commands failed:
    61605: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-dhpfificbbsfbqdoigvfxtszkhan/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/sword normal arm64
    61606: [xcode] (1 failure)
    61607: ! build of 'default-ios' failed. compile failed
    61608: Publishing build 51 of dac-15733/sword01 for target 'default-ios'...
    61609: Uploading extra_data/artifacts/icon.png ...done
    61610: publishing finished successfully.
    61611: uninstalling iOS credentials for dac-15733/sword01 - default-ios
    61612: MAC verified OK
    61613: Removing certificate...
    61614: removing: /BUILD_PATH/Library/MobileDevice/Provisioning Profiles/5d4b1ec5-1211-4e0a-bb77-5671e15536a0.mobileprovision
    61615: done.
    61616: Build step 'Execute shell' marked build as failure
    61617: postbuildstatus finished successfully.
    61618: Finished: FAILURE
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    You should add GameKit.framework to your build
     
  3. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Hi liortal,

    thanks for the response! The problem here is that previously the build worked without a problem and suddenly it stopped working.

    Anyway, how can I add the GameKit Framework to the cloud build?

    Thanks!
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I am not familiar with the history of your project, so i can't say why it stopped working.

    You have 2 choices i can think of to add this:
    1. If you already have iOS plugins in your project (e.g: a .framework file, or any other iOS native code file), you should be able to set it up through this file's plugin inspector. When you select that file, the inspector will show you different settings for that plugin. In that inspector, you can select additional frameworks that the plugin requires. You can add GameKit (check its checkbox).
    2. Another option is to create a custom editor script that uses the Xcode API to modify the built Xcode project to add GameKit. See this thread for info on how to do it (very simple): https://forum.unity3d.com/threads/ucb-demos.306687/
     
  5. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Hi liortal,

    It is working now, for some reason I had to add all frameworks manually to unity cloud build (following your suggestion on step 2)

    Thank you SO much! :)