Search Unity

Xcode Project won't Archive

Discussion in 'macOS' started by falkenbrew, May 20, 2021.

  1. falkenbrew

    falkenbrew

    Joined:
    Apr 21, 2020
    Posts:
    146
    ld: warning: ignoring file /Users/marcgfx/sfare/sfareTV/Build/OSX/sfareTV/Frameworks/UnityPlayer.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
    Undefined symbols for architecture arm64:
    "PlayerMain(int, char const**)", referenced from:
    _main in Main.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I'm using 2019.4.5f1 but also tried building with 2019.4.26f1 with the same result. I can run directly from Unity when "Mac App Store Validation" is turned off. When turned on I get prompted 3 times for my login and then it says the app is damaged.

    I've tried building XCode Project with "Mac App Store Validation" turned on and off.

    -------

    Checking the way OSX should be uploaded to the app store shows me my approach is probably not the intended way. I was hoping to be able to upload my app for OSX the same way it works for iOS and tvOS. Is this something Unity just has not worked on yet, or not possible?
     
  2. sdalex

    sdalex

    Joined:
    Dec 17, 2014
    Posts:
    21
  3. Numa

    Numa

    Joined:
    Oct 7, 2014
    Posts:
    100
    Check which architectures are selected in the xcode project under build settings -> architectures.
    The latest xcode sets it to arm64 by default to support their new M1 processors, but it looks like you want to build for the traditional x86_x64 architecture.

    Try removing the entry in the list and instead add a new one called "x86_64" without the quotes.