CFBundleSupportedPlatforms / Invalid Bundle error

Corona SDK v. 2015.2731, Application Loader v.3.2 (845)

Got annoying bug letter from Apple after submission of the new app binary.

Invalid Bundle  - A nested bundle doesn’t have the right platforms listed in CFBundleSupportedPlatforms Info.plist key.

 Actually, it’s not even listed in official doc.

I used the single value i could find - " iPhoneOS".

CFBundleSupportedPlatforms = {

                “iPhoneOS”

            },

Any ideas about the complete list of the values required at CFBundleSupportedPlatform** s** ARRAY?

Are you by any chance outputing the build to the same folder as your source code?

Rob

Hi Rob, I appreciate your tutorials so much, thanks for your help.

No, Corona (v2731 on ElCap) does not allow to output the final binary into the source code folder.

Here’s the proof.

Any more ideas?

Tried to add “iPhoneSimulator” ( found it in apple forum tech talks ) as the second array item, but there’s the review:

Invalid Bundle  - Info.plist should specify CFBundleSupportedPlatforms with an array containing a single platform

So, we need the correct value (Apple approved) of “iPhoneOS”. And that’s the problem.

Are you doing an SDK build or an Enterprise build? Can we also see your build.settings file?

Rob

My subscription is “Enterprise (Native Extentions)”.

Here’s my build.settings file.

settings = { orientation = { default = "portrait", supported = { "portrait" } }, android = { versionCode = "11", usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.VIBRATE", }, }, plugins = { ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone = true, ["iphone-sim"] = true }, }, ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs", }, }, iphone = { plist = { NSAppTransportSecurity = { NSExceptionDomains = { ["xxxxxxxx.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, }, }, CFBundleIconFile = "icons/Icon.png", CFBundleDisplayName = "MyApp", CFBundleShortVersionString = "1.49", CFBundleVersion = "1.49", CFBundleSupportedPlatforms = { "iPhoneOS" }, CFBundleIconFiles = { "icons/Icon.png", "icons/Icon@2x.png", "icons/Icon-60.png", "icons/Icon-60@2x.png", "icons/Icon-72.png", "icons/Icon-72@2x.png", "icons/Icon-76.png", "icons/Icon-76@2x.png", "icons/Icon-Small.png", "icons/Icon-Small@2x.png", "icons/Icon-Small-40.png", "icons/Icon-Small-40@2x.png", "icons/Icon-Small-50.png", "icons/Icon-Small-50@2x.png", }, UIAppFonts = { "fonts/SummerFontLight.otf", "fonts/BloggerSans-Bold.otf", "fonts/BloggerSans.otf", }, UIApplicationExitsOnSuspend = false, FacebookAppID = "xxxxxxxxxxxxx", CFBundleURLTypes = { { CFBundleURLSchemes = { "fbxxxxxxxxxxxxxx", } } } } } }

Thank you,

Max

But my question is are you building from the Corona Simulator (using SDK), or are you building from Xcode (Enterprise)?

Sorry, my bad. I’m building from the Corona SDK, not from Xcode.

I would suggest removing this from build.settings:

CFBundleDisplayName = "MyApp", CFBundleShortVersionString = "1.49", CFBundleVersion = "1.49", CFBundleSupportedPlatforms = {     "iPhoneOS" },

and use the Corona SDK Build dialog to provide those values. We take care of the version number under the hood. You can choose from the build screen if you want to build for iPhone only, iPad only or Universal.

Rob

Thanks Rob, the build passed Apple’s build test successfully.

Thank you for your time, you’re almost save my project.

Hi 

i got the same error-

Invalid Bundle - A nested bundle doesn’t have the right platforms listed in CFBundleSupportedPlatforms Info.plist key.

To the above solution-

I would suggest removing this from build.settings: 
CFBundleDisplayName = “MyApp”, 
CFBundleShortVersionString = “1.49”, 
CFBundleVersion = “1.49”, 
CFBundleSupportedPlatforms = { 
“iPhoneOS” 
},

i would like to ask  which build settings are they talking about in xcode app there is only one Build  Settings  and no enteries amongst

CFBundleDisplayName = “MyApp”, 

CFBundleShortVersionString = “1.49”, 
CFBundleVersion = “1.49”, 
CFBundleSupportedPlatforms = { 
“iPhoneOS” 
},

is present in that

Perhaps they are present in .Plists i removed it from there still my app is not getting uploaded to Tes tFlyte.

In Corona SDK built apps, you provide a file named build.settings and it lives in the same folder with main.lua.  This has nothing (for the most part) to do with Xcode’s “Build Settings”.

Rob

Edited build.settings, still doesn’t work on latest everything, which suggests

a ) Apple are being their usual failbucket selfs. Again.

b ) Corona 2015.2766 bundles an info.plist that “iTunes doesn’t like” for reasons other than CFBundleSupportedPlatforms, or one that still contains the CFBundleSupportedPlatforms key when it shouldn’t.

(Edit: I decompressed the .ipa, and Corona generates the above value “iPhoneOS” for the key. I removed the key manually, but then Application Loader gives me ITMS 90174, missing provisioning profile, even though it’s present in the payload .app.)

I posted here to avoid thread duplication, but it seems the fix that helped Max no longer works. Perhaps it’s best to file a bug. I have the latest version of all software correctly installed, and I’m unable to upload the app to App Store in any way.

I just don’t see how anyone else is able to upload apps either.

You can’t edit your signed app bundles. You would need to re-sign them with something like AirSign.

If 2766 was creating bad builds, we would be hearing about it from many sources. This is the only thread. It’s isolated. Can you post your bulld.settings file?

Rob

There is one more thread. But it seems from this thread that Apple is at fault. https://forums.coronalabs.com/topic/59996-itunes-connect-processing-delays-bitcode-setting/

I suggest that Apple’s system intermittently worked when Max uploaded the modified version, and that the above changes to the build.settings file are not related to the problem.

If my build.settings file is free of errors, it would be an argument in favor of this suggestion.

settings =

{

    plugins =

    {

        [“CoronaProvider.native.popup.social”] =

        {

            publisherId = “com.coronalabs”

        },

    },

orientation =

{

default = “portrait”,

supported =

{

“portrait”

},

},


iphone = {

plist = {

CFBundleIdentifier = “se.avia.shoppingtranas”,

UIStatusBarHidden = true, 

UIPrerenderedIcon = true, – set to false for “shine” overlay

UIApplicationExitsOnSuspend = false, – uncomment to quit app on suspend

NSLocationWhenInUseUsageDescription = “Appen behöver veta din position för att visa kartor och vägbeskrivningar.”,

NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, --allow app to access Internet…

            CFBundleIconFiles = {

                “Icon.png”,

                “Icon@2x.png”,

                “Icon-60.png”,

                “Icon-60@2x.png”,

                “Icon-60@3x.png”,

                “Icon-72.png”,

                “Icon-72@2x.png”,

                “Icon-76.png”,

                “Icon-76@2x.png”,

                “Icon-40.png”,

                “Icon-40@2x.png”,

                “Icon-40@3x.png”,

                “Icon-Small-50.png”,

                “Icon-Small-50@2x.png”,

                “Icon-Small.png”,

                “Icon-Small@2x.png”,

                “Icon-Small@3x.png”

            },

–[[

– iOS app URL schemes:

CFBundleURLTypes =

{

{

CFBundleURLSchemes =

{

“fbXXXXXXXXXXXXXX”, – example scheme for facebook

“coronasdkapp”, – example second scheme

}

}

}

–]]

}

},


        android =

    {

–largeHeap = true, --for image manipulation, enable if camera!

           permissions =

{

{ name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

},

        usesFeatures =

        {

            – If you set permissions “ACCESS_FINE_LOCATION” and “ACCESS_COARSE_LOCATION” above,

            – then you may want to set up your app to not require location services as follows.

            – Otherwise, devices that do not have location sevices (such as a GPS) will be unable

            – to purchase this app in the app store.

            { name = “android.hardware.location”, required = true },

            { name = “android.hardware.location.gps”, required = true },

            { name = “android.hardware.location.network”, required = true },

        },

        usesPermissions =

        {

           “android.permission.INTERNET”,

            --“android.permission.CAMERA”,

            “android.permission.WRITE_EXTERNAL_STORAGE”,

   “android.permission.GET_ACCOUNTS”,

“android.permission.RECEIVE_BOOT_COMPLETED”,

“com.google.android.c2dm.permission.RECEIVE”,

“.permission.C2D_MESSAGE”,

            

            – Optional permission used to display current location via the GPS.

            “android.permission.ACCESS_FINE_LOCATION”,

            – Optional permission used to display current location via WiFi or cellular service.

            “android.permission.ACCESS_COARSE_LOCATION”,

            “android.permission.CALL_PHONE”, 

        },

    }

        

        

}

It could be. Normally I don’t recommend putting CFBundleIdentifier = “se.avia.shoppingtranas”, in the build.settings but let it come from the provisioning profile.

Rob

I’ve filed a bug entitled “Corona reports build and upload to App Store successful, Apple rejects upload citing “Invalid Bundle”” today just in case. (#43948).

The built info.plist contains 
 

<key>CFBundleSupportedPlatforms</key>

<array>

<string>iPhoneOS</string>

</array>

But what Apple wants that to be is still undocumented. 

I can test if the key should be removed altogether in order for Itunes Connect to approve it, if you can describe how I manually re-sign the app after I’ve changed it. As per Abdullah’s answer on StackOverflow.

Are you by any chance outputing the build to the same folder as your source code?

Rob

Hi Rob, I appreciate your tutorials so much, thanks for your help.

No, Corona (v2731 on ElCap) does not allow to output the final binary into the source code folder.

Here’s the proof.

Any more ideas?