CFBundleSupportedPlatforms / Invalid Bundle error

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

I’m having this same error using the latest version of Corona SDK (Version 2015.2791 (2015.12.17)) and Application Loader (Version 3.4 (902)).

Apple is sending the following email: 

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

My build.settings is the following: 

settings = { plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, }, orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" }, }, android = { permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "android.permission.INTERNET", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "com.google.android.c2dm.permission.RECEIVE", ".permission.C2D\_MESSAGE", }, 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 = false }, { name = "android.hardware.location.gps", required = false }, { name = "android.hardware.location.network", required = false }, }, }, iphone = { plist = { CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", }, NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, }, }, }, }

I haven’t been able to find a solution on this.

Hi. Same problem here.

Corona SDK 2015.2802 (2015.12.31) and Application Loader 3.5 (915)

My build.settings seems ok:

settings = { orientation = { default = "portrait", content = "portrait", supported = { "portrait" } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay CFBundleIconFile = "Icon.png", 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-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, UIAppFonts = { "Roboto Lt.ttf", "Roboto.ttf", "Always In My Heart.ttf" }, }, }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.RECEIVE\_BOOT\_COMPLETED" }, }, plugins = { ["plugin.google.play.services"] = { -- required publisherId = "com.coronalabs", }, ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, }, }, ["plugin.notifications"] = { publisherId = "com.coronalabs" }, }, }

Hi @pablopost90,

In my case, the problem was that I was using accents in Application Name field.

Now everything is okay!

Trick is to set the Bundle Display Name to a name with accents, but set the Application Name to a name without accents. That way, the app name will show correctly under the icon, and the app name doesn’t break iTunes Connect’s app checker robot’s Plist parser.

That’s how the uploading would still work for most apps and Corona “would hear about it” only when someone got a job making a local app (that hasn’t had its name adapted to be globally search-engine-friendly and typing-friendly which is usually the case).

Same problem here! I found out and it works now :) 

DON’T USE ACCENTS IN THE CORONA APP NAME BUILD FIELD!

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.