When it came time to submit Flattery to the Apple App Store, I was very surprised at some last minute packaging issues for the app that came up. After all, I had literally done hundreds of build-deploy’s to my phone, it seemed like it should submit to the App Store without any issues – however, submitting to the App Store apparently has some additional build requirements that are not required when deploying directly to your phone.
To be clear, I am working on Unity 2020.1.13f1 and the latest Xcode for MacOS 11.0.1.
There were two main issues:
- Inclusion of an illegal “frameworks” directory
- Inclusion of an empty SwiftSupport directory
No Embedded Frameworks
So your app builds and installs fine from Xcode – you make the Archive and submit it to the App Store and you get this message:
This is basically telling you that the Unity build process is leaving some files in a directory that Apple disagrees with – there’s nothing “wrong with your app” per se, its just got some extra, unnecessary junk floating around in it that Apple wants to see cleaned up before distributing on its App Store.
After much Googling and trial and error, here are the instructions I wish someone were able to hand me:
The script in this case should be:
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/UnityFramework.framework/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
Do another build, archive, and upload to the App Store.
Invalid Swift Support
With the first problem resolved I was able to successfully upload the archive of my app, but after the upload is completed, Apple runs additional checks on the packaging of your app – in my case I got an email that said:
ITMS-90424: Invalid Swift Support – The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Signed, your friends at Apple
The problem was that I was using the latest Xcode and I did everything in Unity and wasn’t writing any Swift code. After Googling around, I found that others have resolved this issue by:
- Create the application Archive as you normally would – this should leave you at the Organizer window (or go Window > Organizer)
- Right click on your recently made Archive and Show in Finder
- Right click on the archive file in Finder and select Show Package Contents
- Delete the SwiftSupport directory
- Return to the Organizer window in Xcode and submit your app
I’m sure someone better versed in Xcode build processes could add another Run Script in the right place and then the manual deletion wouldn’t be needed. In the end, its not like I need to submit builds to the App Store every day, so I can live with this as part of the “build and distribution process”.
I want to be clear – all of the above was not something I figured out on my own – these are issues that many others have been posting about and I would have gotten no where without their help. So thanks out to the community.
Reference URL’s:
https://developer.apple.com/forums/thread/125902