+3 votes

Xcode does this automatically with the Archive and Publish processes. How do you do it when you use Godot 2.1.x?

asked Aug 28, 2017 in Engine by lexum (26 points)
edited Aug 31, 2017 by lexum

yes, but no help. I have the answer now, I'll post it

1 Answer

+2 votes
Best answer

The process is to create the app, sign it, create the installer and upload it using Application Loader (comes with Xcode)

The process I followed is this:

1 - Compile the Engine
I compiled the engine using Xcode. I compiled it with the argument "tools=no target=release_debug bits=64" to reduce the size of the exec, the result was 28.1 MB

2 - Create the App
I created the app by hand (since the template has the icon corrupted or something weird that corrupts the icon and renders noise). I created a folder, named it GameName.app, created its subfolders (Contents, MacOS, Resources) and added the executable, Info.plist, PkgInfo, AppIcon.icns and data.pck files. The Info.plist was created by hand too, since the template uses very old keys that are now obsolete

3 - Sign, Sandbox and Package
3.1 - Open Terminal and find out your signing identity:

security find-identity -v -p codesigning

3.2 - Sign the app with your "3rd Party Mac Developer Application" identity and enable Sandbox (the entitlements key required is "com.apple.security.app-sandbox"):

codesign --entitlements pathToEntitlementsFile/file.entitlements -f -v -s "3rd Party Mac Developer Application: XXX (YYY)" pathToTheApp.app

3.3 - Create the installer package using the "3rd Party Mac Developer Installer" identity:

productbuild --component pathToApp.app /Applications --sign "3rd Party Mac Developer Installer: XXX (YYY)" pathAndNameForTheInsteller.pkg

4 - Upload
Finally open Application Loader and Upload it :)

answered Aug 31, 2017 by lexum (26 points)
edited Mar 19, 2018 by lexum
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.