How create iOS archive with compile script

How create iOS archive with compile script
0.0 0



I’d would like release our ipa with compiled javascript code. I tried two ways to upload the ipa:

  • cocos compile + Application Loader: It creates the ipa with jsc within, but when I try to upload I’m reported with several errors like ‘Try rebuilding the app with the latest Xcode version.’ I think this way it’s impossible and XCode is mandatory here.
  • XCode > Product > Archive: If I export the ipa and unzip it, I see it contains my *.js files, non *.jsc.

How could we schedule an pre-task Archive to execute –compile-script and replace js by jsc files on XCode > Product > Archive, please?

Thanks and best!


hey guy! Have you found a solution?


Hi @mailaminh12:

Yes, I did. But it is a manual process:

  1. cocos compile -p ios -m release --compile-script 1

  2. XCode > Product > Archive

  3. Open the generated archive in step 2) with Finder.

  4. Replace script folder by script generated in step 1) (into publish/ios/*.app file)

  5. Save and publish

Good luck!


thanks very very much