Trying to export XCode file so I can upload it to the app store.

Create issue
Issue #366 resolved
Former user created an issue

I use several assets in my game from Codea: A Hero's Quest Game Music One Game Sounds One And after I archive my build and try to export it to upload, I get this error:

Unexpected asset pack at /Applications/ Hero's Quest.assetpack. Asset packs must be in /OnDemandResources.

It stops be from uploading and means that I probably won't be able to upload my app this weekend.

Comments (30)

  1. simeon

    Looking into this. It seems like Apple has adopted the .assetpack extension for on demand resources and we will need to work around that.

  2. Rodolphe Gonzales

    Is there any clue you could give us to try and get around this now (even if it's less than elegant), Simeon? We're kind of stuck here :( Thanks a lot!

  3. simeon

    I will look into the issues with exporting soon. It might mean waiting for an update to Codea (or using the beta so you can test). It seems like there are quite a few changes that need to be handled.

  4. Mark Sumner

    Running into the same issue. Since it came between build 8 and build 9 of an app that's in beta testing by 132 people (with just a few days left before build 8 expires), it has me gnawing my fingernails a bit.

    Xcode upgrades. They always bite you somewhere.

  5. Mr_Ninja

    Hmmm, is there going to be a way to upgrade the runtime without re exporting or will we have to start from scratch as a fresh export?

  6. Mark Sumner

    I suspect we're going to be faced with a fresh export, since it appears that the extension "assetpack" is the issue. That or a fresh runtime followed by hand editing of the file extensions.

  7. simeon

    So it looks like it's an issue with the term "assetpack" appearing in any folders within your app bundle. Very weird.

    I will be allowing the runtime to look for the following structure:


    The current folder structure is:


    When the new runtime is available you will be able to swap it out and rename your asset folders as appropriate (you will need to delete the references from Xcode, rename them in the finder, then drag them back into Xcode as folder references, not groups).

  8. simeon

    Okay, here's the solution for now (I've tested with the "Validate..." option in Xcode and it passes).

    • Find the file named libversion in the root of your exported project. It will contain a version number, most likely 2.3.1. Change it to 2.3.2
    • Delete libcodea.a and libtools.a from your Libs/ folder
    • Delete the "AssetPacks" folder reference from the "Resources" group in your exported Xcode project — if Xcode asks you to move the files to trash say NO.
    • In Finder: rename the "AssetPacks" folder to "Assets"
    • In Finder: Rename every "SomePack.assetpack" folder within it to "SomePack.assets"
    • Drag the root level "Assets" folder back into Xcode, tell Xcode to add this as a "Folder Reference" (not a "Group")
    • Build and test your project
    • Archive your project

    You can now also re-enable the "Enable Bitcode" setting for you Xcode project, as the 2.3.2 version of the Codea runtime library has bitcode embedded. This will let you take advantage of App Thinning when it becomes available.

  9. simeon

    @Yojimbo2000 by deleting the old libraries and updating the libversion file should make Xcode download the new (2.3.2) libraries

  10. Rodolphe Gonzales

    Doesn't work for me (the app can't find images)... I'm pretty sure I followed all the steps, which were pretty straight forward. Is anyone else having trouble? (the build does validate though :))

    Incidently, turning bitcode "on" throughs an error while building as well. I'm wondering if xcode did download the right runtimes (my libversion file does say 2.3.2)... If this is of any indication, the newly downloaded libcodea.a is 59.4mb and libtools.a is 30.7mb, excatly the same size than the ones I deleted.

  11. Rodolphe Gonzales

    Well, this is getting stranger, I'm now getting a new error message:

    "_lua_tointeger", referenced from:
          _reportAchievement in GameCenterAddOn.o
         (maybe you meant: _lua_tointegerx)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
  12. simeon

    @luciens what version of Codea did you initially export your project from? Do you have your own Game Center add on or is that the bundled one? (If it's the bundled one you can fetch the latest from

    Edit: that might explain the issue you had downloading the libraries, the libversion system was added later and your exported project might be using older build scripts.

  13. Mark Sumner

    Went through the steps and validation looks fine. However, attempts to upload the resulting app for testing generates two errors:

    "IPad multitasking support requires launch storyboard in bundle." and "Unexpected CFBundleExecutableKey"

    Digging around for solutions...

  14. Rodolphe Gonzales

    @Simeon Saëns, indeed, I should have thought about it. the export is old. Much older than the previous version of the runtime. And I'm not using the bundled gamecenter addon (didn't exist back then), but one that was made by another Codea user... What do you reckon, using the bundled one instead should fix this or will I run into other problems with my old export? (thanks a lot...)

  15. Mark Sumner

    The bundle ID / storyboard problem seems to be related to multitasking settings. It can be cured by opting out of Slide Over and Split View by adding the UIRequiresFullScreen option on build settings.

  16. simeon

    @Devilstower I wonder whether we should support multitasking by default, or add the UIRequiresFullscreen key by default.

    @luciens the problem is lua_tointeger doesn't exist in the new runtime. What you might need to do is export a dummy project from 2.3.1 and replace the Lua headers with the ones from the newer exported project, then compile and fix any errors (I suspect your Game Center addon is using lua_tointeger which no longer exists).

  17. Mark Sumner

    @simeon_s I'd prefer if you'd support multitasking by default. But then, I may be the only person using Codea to write business apps.

  18. simeon

    @luciens looks like you have an exception. Check the console output to see what it's printing, perhaps paste it here.

    If you want to send me your whole project, zipped up, I can take a look for you.

  19. simeon

    @luciens looks like the crash is related to not having the most up-to-date RuntimeResources.bundle and ToolsResources.bundle in your exported project. To get the latest ones, just export a dummy project from the latest Codea and copy those files into your Libs/ folder.

  20. Log in to comment