gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

Errors submitting macOS build to Mac App Store via Application Loader (i386 architecture and CFBundleIdentifier in Info.plist) #51

Closed CanisLupus closed 5 years ago

CanisLupus commented 5 years ago

After successfully packaging a macOS build of our Unity application into a .pkg file for the Mac App Store, we get the following errors when submitting it to the store via the Application Loader:

ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (in com.ourcompany.ourapplication.pkg/Payload/Our Application.app/Contents/Plugins/StandaloneFileBrowser.bundle/Contents/MacOS/StandaloneFileBrowser)]'. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."

ERROR ITMS-90511: "CFBundleIdentifier Collision. The Info.plist CFBundleIdentifier value 'com.gkngkc.sfb' of 'Our Application.app/Contents/Plugins/StandaloneFileBrowser.bundle' is already in use by another application." (EDIT: This one is probably expected, see further below.)

It seems that it doesn't like StandaloneFileBrowser.bundle being compiled for x86 (although it's also compiled for x64, right? Maybe it can't include both?). Mac builds are always x64 in Unity now, and the Platform settings for the bundle only show x64 for Mac OS X, so it seems correct:

image

Furthermore, the inclusion of multiple Info.plist files (ours and yours) seems to not work with the Application Loader, as seen from the second error message. This is also the case with a few other Mac plugins we have in the project that contain the .plist file. Can we remove it from the .bundle? (EDIT: this forum thread mentions replacing the bundle ID in each Info.plist with the app's own ID. So in theory only the x86 issue remains.)

Have you encountered these problems? None of this is an issue when creating non-app-store Mac builds, but we never tried running it on Macs without x64 support. Is this something that can be fixed? (maybe an x64-only build of StandaloneFileBrowser if it helps?)

I appreciate any help. Your plugin is really useful to us. :)

We're using Unity 2017.4.11f1 currently. Feel free to ask for more info.

Cheers! Daniel Lobo

gkngkc commented 5 years ago

Hi,

I think you have to rebuild StandaloneFileBrowser,bundle without i386 architecture. It's at Build Settings/Valid Architectures.

ss
CanisLupus commented 5 years ago

That makes sense! Sorry, I had no idea there was an Xcode project in this repository. We were using the unitypackage only.

We'll do that. I'll close this. ;)

Thanks a lot! Daniel

CanisLupus commented 5 years ago

Furthermore, it seems the error doesn't even happen with the current .bundle in this repository (in the package). Apparently the package we were using was old enough that it had the i386 architecture. I'm very sorry for bothering you at all!

gkngkc commented 5 years ago

No problem, happy to help :)