简体   繁体   中英

Building for iOS with Corona SDK: multiple binaries are created, causing “Invalid Bundle Structure” error from Apple

I am building an app called 'ToyBox.

When I build for iOS, I get a ToyBox.app directory which contains a ToyBox executable and the other typical iOS-related files (Info.plist, pkg.info, etc.), in addition to my app icons, assets and source code directories.

However the directory also contains another ToyBox.app sub-directory, which itself contains a ToyBox executable and iOS-related files and my assets directory.

It looks like Corona is recursively compiling my app. This happens whether I build for device or the Xcode iOS simulator. There is no problem running the resulting executable on my device (iPad4) or simulating it in Xcode but when I tried to submit my app to the App Store it was rejected with the following error:

"Invalid Bundle Structure - The binary file 'ToyBox.app/ToyBox.app/ToyBox' is not permitted. Your app may contain only one executable file."

The error is valid - there are two executables!

(At the risk of confusing the issue, I have another, seemingly related, issue: if I build my app (either for device or Xcode simulator) then later build the app with a different name, in the same directory, the second build will include the first build and the build process will take a very long time to complete. If I was to build the app again with a third name, both previous app builds wold be included and the build would take a very (very) long time).

I can probably work around the issue by deleting the extra files, but this seems like a hack and I'd like to know what's going on.

I am using Corona Version 2013.1087 (2013.4.17).

Make sure you are not saving your Built app to the folder with your source code. You cannot put the output from building an app into the same folder with your source or you will get this error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM