Nativescript: CFBundleIdentifier Collision publishing ios

Created on 8 Nov 2016  ยท  19Comments  ยท  Source: NativeScript/NativeScript

ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'org.nativescript.TNSWidgets' under the iOS application 'Wos.app'."

ios

All 19 comments

Hey @NNieto

The system error you are receiving suggests that your project has a duplicate identifier with the shown value in your platforms folder. However, the reason for that to happen is unknown without some more information. The best case scenario is if you can provide your application in order to test it locally and research what is causing your application to refer to TNSWidgets twice.
If, that is not a possible solution, you can provide us with your application environment in order to recreate a similar application at our side. For that we will need the following:

  • node.js version
  • xCode version
  • OS version
  • NativeScript CLI version
  • tns-core-modules version
    and your whole package.json (from the root directory) to recreate an app will your exact same dependencies.

Thanks for reply, my information is:
Node JS: 6.5.0
xCode: 8.1
OS version: OSX El Capitan 10.11.6
Nativescript CLI version: 2.3.0
tns-core-modules version: 2.3.0

I include in the podfile the FBSDKShareKit too
package.json:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.highlevel.wos",
    "tns-android": {
      "version": "2.3.0"
    },
    "tns-ios": {
      "version": "2.3.0"
    }
  },
  "dependencies": {
    "nativescript-effects": "^0.3.0",
    "nativescript-image-cache-it": "^1.5.1",
    "nativescript-insomnia": "^1.2.0",
    "nativescript-loading-indicator": "^2.1.0",
    "nativescript-platform-css": "^1.0.1",
    "nativescript-plugin-firebase": "^3.6.2",
    "nativescript-screen-orientation": "^1.0.2",
    "nativescript-slides": "^2.1.4",
    "nativescript-sound": "^1.0.4",
    "nativescript-videoplayer": "^1.0.3",
    "nativescript-web-image-cache": "^2.0.1",
    "tns-core-modules": "^2.3.0"
  },
  "devDependencies": {
    "babel-traverse": "6.14.0",
    "babel-types": "6.14.0",
    "babylon": "6.9.1",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}

ERROR ITMS-90680: "The binary you uploaded was invalid." Also I get this error too, and another related with the architecture but I fixed using a script, maybe this is important to say. Thanks

Hey @NNieto
Are you using tns publishcommand to generate your package?

Usage:

tns publish ios AppleAccount ApplePass

Yes @NickIliev , I am using the two commands and get the same result.

tns publish ios
tns publish ios AppleAccount ApplePass

Hey @NNieto

We've investigated the problem and it seems that the reason to have a duplicate identifier of kind TNSWidgest is caused by the plugin nativescript-slides.
The plugin is referring in its package.json devDependency to tns-core-modules: next and in the same time referring to 2.3.0 for nativeScript so this is the reason both versions are used by the plugin (from where duplicate files are produced in your build files).

I have logged this problem at the plugin repository and the best solution is the author of the plugin to fix it and publish a new version in npm.

Another possible and faster solution is to fix the plugin locally at your side and use it to build your application. To do that follow these steps:

  • Fork the plugin repo.
  • fix the package.json so that this line should be either pointing to 2.3.0 or not exists at all
  • run npm pack to create your local version of the plugin in the tgz file
  • in your application run
tns plugin remove nativescript-slides
tns plugin add path-to-tgz-file
  • run the publish command again (with deleted platforms folder)
tns publish ios AppleUser ApplePass

The third variant for a solution - wait for our next release where similar inconveniences with npm 3.x should be fixed. The next release is expected within few days.

Great!!, Thank you so much @NickIliev, I will try to fix the problem locally.

@NickIliev it works!!! Thanks, I will close the issue

Hi @NickIliev, I seem to be experiencing the same issue.

I've checked all of the plugins that I'm using and the only one that references a next build is tns-core-modules (here).

Have you any idea what might be causing this?

Thanks

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Component        โ”‚ Current version โ”‚ Latest version โ”‚ Information โ”‚
โ”‚ nativescript     โ”‚ 2.4.2           โ”‚ 2.4.2          โ”‚ Up to date  โ”‚
โ”‚ tns-core-modules โ”‚ 2.4.3           โ”‚ 2.4.3          โ”‚ Up to date  โ”‚
โ”‚ tns-android      โ”‚ 2.4.1           โ”‚ 2.4.1          โ”‚ Up to date  โ”‚
โ”‚ tns-ios          โ”‚ 2.4.0           โ”‚ 2.4.0          โ”‚ Up to date  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
{
  "description": "*****",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "*****",
  "repository": {
    "type": "git",
    "url": "*****"
  },
  "nativescript": {
    "id": "*****",
    "tns-android": {
      "version": "2.4.1"
    },
    "tns-ios": {
      "version": "2.4.0"
    }
  },
  "dependencies": {
    "html-entities": "^1.2.0",
    "moment": "^2.14.1",
    "nativescript-background-fetch": "^1.0.3",
    "nativescript-background-geolocation-lt": "^1.3.3",
    "nativescript-background-http": "^2.4.0",
    "nativescript-camera": "0.0.8",
    "nativescript-fonticon": "^1.1.1",
    "nativescript-google-maps-sdk": "^1.4.2",
    "nativescript-iqkeyboardmanager": "^1.0.1",
    "nativescript-pulltorefresh": "^1.1.9",
    "nativescript-statusbar": "^1.0.0",
    "tns-core-modules": "^2.4.3",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
    "babel-traverse": "6.16.0",
    "babel-types": "6.16.0",
    "babylon": "6.11.4",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.0",
    "typescript": "^2.0.3"
  }
}

Hey, @3rror404 I will try to reproduce your issue with the provided package.json but first I've noticed that you have referenced a file that is from the master branch of tns-core-modules and the same file in the release branch is referencing not next but the version as expected.
Here is the link to the same line in the release branch

Are you sure you have published your application with the official latest version of tns-core-modules and not with the _next_

Whoops, yes that was a mistake. I am actually using the release branch. I just linked to the wrong one above.

Thanks for taking a look.

HeyB @3rror404 on second thought which error you are hitting!?
Is it ERROR ITMS-90680 or ERROR ITMS-90685 (as the previous user has mentioned both errors in the issue).
Also, how are you publishing you app (via Xcode or via tns publish command) ?

I'm using xcode. I have been having lots of issue building for release (https://github.com/NativeScript/nativescript-cli/issues/2339#issuecomment-268209258). I've finally got an archive to build but I get both of the errors mentioned as well as some others. I'm in the middle of updating xcode from 8.2 to 8.2.1 ("installing - less than a minute" for 45 minutes!) so I can't check the exact errors at the moment.

OK, here are the errors I receive:

iTunes Store operation failed.
Unable to process app at this time due to a general error
---
iTunes Store operation failed.
The binary you uploaded was invalid.
---
iTunes Store operation failed.
Unsupported Architectures. The executable for *****.app/app/tns_modules/nativescript-background-http/node_modules/tns-core-modules/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework contains unsupported architectures '[x86_64, i386]'.
---
iTunes Store operation failed.
CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'org.nativescript.TNSWidgets' under the iOS application '*****.app'.
---
iTunes Store operation failed.
Invalid Segment Alignment. The app binary at '*****.app/app/tns_modules/nativescript-background-http/node_modules/tns-core-modules/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.
---
iTunes Store operation failed.
The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.

and the same errors when using tns publish ios

1 package(s) were not uploaded because they had problems:
    /var/folders/dt/8knr1n_94vjc58mv0zcfqwbh0000gn/T/itms-1161120-45189-lr21gz.hd6bfq1tt9/mybundle.itmsp - Error Messages:
        ERROR ITMS-90680: "The binary you uploaded was invalid."
        ERROR ITMS-90087: "Unsupported Architectures. The executable for *****.app/app/tns_modules/nativescript-background-http/node_modules/tns-core-modules/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework contains unsupported architectures '[x86_64, i386]'."
        ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'org.nativescript.TNSWidgets' under the iOS application '*****.app'."
        ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at '*****.app/app/tns_modules/nativescript-background-http/node_modules/tns-core-modules/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
        ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."

Does any of this mean anything to you @NickIliev ?

@3rror404 from the list of errors I am guessing that in fact some of your plugins are duplicating the TNSWidgets and you are hitting the same error as NNileto had. It might be the background-http plugin in which I saw a dependency to tns-core-modules: next and at the same time using CLI 2.4.0 but to be sure what exactly is causing the CFBundleIdentifier collision (and most likely the linked errors 90680 and other errors). To do that generate your release build and see if you have doubled _org.nativescript.TNSWidgets_ generated.

As a possible solution for these errors try the following steps:

  • clone the repo of nativescript-background-http plugin (or the plugin that is generating the doubled identifier if it is not this one)
  • open package.json of the plugin
  • change these two lines so they are not requiring next but the latest version
  • remove platforms folder and node_modules
  • run npm install and tsc
  • and finally npm pack

Now you will have generated tgz file for the plugin.
Or alternatively you can try my generated tgz from here

  • In your project reference the file as dependency in your package.json
    "nativescript-background-http": "file:./nativescript-background-http-2.4.0.tgz",

    • remove platforms folder and then run tns publish ios (you will be prompted for your AppleId and Apple pass)

That looks to have worked. Thanks for your help @NickIliev !

Hi @NickIliev i have the same problem ERROR ITMS-90685. I don't know which package cause the collision. My system informations are the same of NNieto.
My package.json is this:

{
  "description": "Application",
  "readme": "Application",
  "nativescript": {
    "id": "org.nativescript.application",
    "tns-android": {
      "version": "2.4.1"
    },
    "tns-ios": {
      "version": "2.3.0"
    }
  },
  "dependencies": {
    "nativescript-facebook-login": "^0.2.0",
    "nativescript-geolocation": "0.0.15",
    "nativescript-imagecropper": "0.0.7",
    "nativescript-imagepicker": "^2.4.1",
    "nativescript-loading-indicator": "^2.2.1",
    "nativescript-pulltorefresh": "^1.1.8",
    "nativescript-toast": "^1.4.0",
    "tns-core-modules": "^2.4.2"
  },
  "devDependencies": {
    "babel-traverse": "6.18.0",
    "babel-types": "6.18.0",
    "babylon": "6.13.1",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^2.0.9"
  }
}

Thank you so much for your help.

I want to add this, in the package.json of the nativescript-imagepicker, i found this lines, could be that the problem?

  "dependencies": {
    "tns-core-modules": "*",
    "nativescript-telerik-ui": "*"
  },
  "main": "viewmodel.js",
  "devDependencies": {
    "tns-platform-declarations": "next",
    "typescript": "^2.0.3"
  },

@mounirka the problem is the tns-platform declarations, using next, it duplicates the TNSWidgets, follow the steps posted by @NickIliev the problem is solved, I did it for two libraries that have the same problem.

Now it gives me this exact two problems:

  • CFBundleIdintifier Collision. There is more than one bundle with the CFBundleIdentifier value 'Telerik.TelerikAppFeedback' under the ios application 'Application.app'
  • CFBundleIdintifier Collision. There is more than one bundle with the CFBundleIdentifier value 'Telerik.TelerikUI' under the ios application 'Application.app'

I can't find the telerikAppFeedback in my project, neither the TelerikUI.
Can someone help? Thank you

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rLoka picture rLoka  ยท  3Comments

yclau picture yclau  ยท  3Comments

nirsalon picture nirsalon  ยท  3Comments

NordlingDev picture NordlingDev  ยท  3Comments

NickIliev picture NickIliev  ยท  3Comments