Nativescript-cli: Xcode 8 couldn't find a provisioning matching 'com.companyname.demo'

Created on 1 May 2017  路  7Comments  路  Source: NativeScript/nativescript-cli

Tell us about the problem

My goal here is to run simple nativescript "42 tap" app with iOS with using free provisioning profile.
When i run command "tns run ios" i get error:

No profiles for 'com.companyname.demo' were found: Xcode coundn't find a provisioning profile matching 'com.companyname.demo'.
Code singing is required for product type 'Application' in SDK 'iOS 10.3'

*companyname - has my actual unique name.

  • I have configured my AppleID account properly and created iOS development certificate for it
  • I can run apps created in xcode. So signing works ok.
  • If i open platform/ios/testApp.xcodeproj with xcode ide and run it - it works. Only NS CLI throws the error
  • I have set DEVELOPMENT_TEAM="10 symbols of my team id" in build.xcconfig i still get the same error

Which platform(s) does your issue occur on?

iOS 10.12

Please provide the following version numbers that your issue occurs with:

  • CLI: 2.5.4
  • Cross-platform modules: 2.5.0
  • Runtime(s): 2.5.0
  • Plugin(s): no plugins.
  • Xcode: 8

Please tell us how to recreate the issue in as much detail as possible.

tns create testApp --appid com.companyname.demo
cd testApp
tns build ios
tns run ios

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No. Just simple "42 tap" test app.

bug ios needs more info code signing

Most helpful comment

I've got the same error. New to nativescript-vue just getting started. Posting response from tns run ios --log trace

Loading extensions.
execFile: /usr/local/share/android-sdk/platform-tools/adb "help"
Error while executing '/usr/local/share/android-sdk/platform-tools/adb help'. Error is: spawn /usr/local/share/android-sdk/platform-tools/adb ENOENT
Exec uname -a 
 stdout: Darwin Users-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

 stderr: 
Exec npm -v 
 stdout: 5.5.1

 stderr: 
spawn: java "-version"
Exec node-gyp -v 
 stdout:  
 stderr: /bin/sh: node-gyp: command not found

Error while executing node-gyp -v: Command failed: node-gyp -v
/bin/sh: node-gyp: command not found

Exec xcodebuild -version 
 stdout: Xcode 8.3.3
Build version 8E3004b

 stderr: 
Exec gem which xcodeproj 
 stdout: /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj.rb

 stderr: 
Exec pod --version 
 stdout: 1.1.0.rc.3

 stderr: 
Exec null version 
 stdout:  
 stderr: /bin/sh: null: command not found

Error while executing null version: Command failed: null version
/bin/sh: null: command not found

spawn: /usr/local/share/android-sdk/tools/emulator "-help"
The result of checking is Android Emulator installed is:
- stdout: 
- stderr: spawn /usr/local/share/android-sdk/tools/emulator ENOENT
Exec mono --version 
 stdout:  
 stderr: /bin/sh: mono: command not found

Error while executing mono --version: Command failed: mono --version
/bin/sh: mono: command not found

Exec git --version 
 stdout: git version 2.11.0 (Apple Git-81)

 stderr: 
Exec gradle -v 
 stdout:  
 stderr: /bin/sh: gradle: command not found

Error while executing gradle -v: Command failed: gradle -v
/bin/sh: gradle: command not found

Exec "/Library/Java/Home/bin/javac" -version 
 stdout:  
 stderr: /bin/sh: /Library/Java/Home/bin/javac: No such file or directory

Error while executing "/Library/Java/Home/bin/javac" -version: Command failed: "/Library/Java/Home/bin/javac" -version
/bin/sh: /Library/Java/Home/bin/javac: No such file or directory

System information:
{ procInfo: 'nativescript/3.3.0',
  platform: 'darwin',
  os: 'Darwin Users-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64\n',
  shell: '/bin/bash',
  dotNetVer: null,
  procArch: 'x64',
  nodeVer: 'v7.5.0',
  npmVer: '5.5.1',
  javaVer: null,
  nodeGypVer: null,
  xcodeVer: 'Xcode 8.3.3\nBuild version 8E3004b\n',
  xcodeprojGemLocation: '/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj.rb\n',
  itunesInstalled: true,
  cocoapodVer: '1.1.0.rc.3',
  adbVer: null,
  emulatorInstalled: false,
  monoVer: null,
  gitVer: '2.11.0 (Apple Git-81)',
  gradleVer: null,
  javacVersion: null }
Looking for project in '/Users/User/nativescript/MyApp'
Project directory is '/Users/User/nativescript/MyApp'.
Exec which xcodebuild 
 stdout: /usr/bin/xcodebuild

 stderr: 
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
Validate options for platform: iOS
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
Searching for devices...
startLookingForDevices; platform is iOS
Starting to look for iOS devices.
Found device with identifier '35eede94bb00faeac9060469924d1871212a0265'
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
startLookingForDevices; platform is iOS
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
BeforeHookName for command liveSync is before-liveSync
Changes info in prepare platform: ProjectChangesInfo {
  appFilesChanged: false,
  packageChanged: false,
  appResourcesChanged: false,
  nativeChanged: false,
  configChanged: false,
  nativePlatformStatus: '3' }
Skipping prepare.
Building project...
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
  action: 'Build',
  label: 'iOS_Device_Debug_Incremental',
  customDimensions: { cd2: 'Pure JavaScript' } }
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
Xcode 8 requires a team id to be specified when building for device.
You can specify the team id by setting the DEVELOPMENT_TEAM setting in build.xcconfig file located in App_Resources folder of your app, or by using the --teamId option when calling run, debug or livesync commands.
Found and using the following development team installed on your system: User Lynch (48AY58T44V)
Selected teamId is '48AY58T44V'.
The specified 48AY58T44V is already set in the Xcode.
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
spawn: xcodebuild "-configuration" "Debug" "build" "SHARED_PRECOMPS_DIR=/Users/User/nativescript/MyApp/platforms/ios/build/sharedpch" "-project" "/Users/User/nativescript/MyApp/platforms/ios/MyApp.xcodeproj" "-target" "MyApp" "ARCHS=armv7" "VALID_ARCHS=armv7" "-sdk" "iphoneos" "CONFIGURATION_BUILD_DIR=/Users/User/nativescript/MyApp/platforms/ios/build/device"
Build settings from command line:
    ARCHS = armv7
    CONFIGURATION_BUILD_DIR = /Users/User/nativescript/MyApp/platforms/ios/build/device
    SDKROOT = iphoneos10.3
    SHARED_PRECOMPS_DIR = /Users/User/nativescript/MyApp/platforms/ios/build/sharedpch
    VALID_ARCHS = armv7

=== BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===

Check dependencies
No profiles for 'org.nativescript.MyApp' were found:  Xcode couldn't find a provisioning profile matching 'org.nativescript.MyApp'.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
Code signing is required for product type 'Application' in SDK 'iOS 10.3'

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
Unable to apply changes on device: 35eede94bb00faeac9060469924d1871212a0265. Error is: Command xcodebuild failed with exit code 65.
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
AfterHookName for command watch is after-watch
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
AfterHookName for command liveSync is after-liveSync

All 7 comments

@newgerstas in which build.xcconfig you set your DEVELOPMENT_TEAM?
The one in platform/ios/ or the one in app/App_Resources/iOS?

The one on platform/ios gets overwritten on platform add/remove and some other operations.
So I would like to suggest you add it in app/App_Resources/iOS/build.xcconfig .

Same problem, i've set my DEVELOPMENT_TEAM on app/App_Resources/iOS/build.xcconfig

Hey, @P1T4G0R4S,
Would you execute tns run ios --log trace and paste the output here, so we can investigate?
Thanks!

Closing due to inactivity.

I've got the same error. New to nativescript-vue just getting started. Posting response from tns run ios --log trace

Loading extensions.
execFile: /usr/local/share/android-sdk/platform-tools/adb "help"
Error while executing '/usr/local/share/android-sdk/platform-tools/adb help'. Error is: spawn /usr/local/share/android-sdk/platform-tools/adb ENOENT
Exec uname -a 
 stdout: Darwin Users-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

 stderr: 
Exec npm -v 
 stdout: 5.5.1

 stderr: 
spawn: java "-version"
Exec node-gyp -v 
 stdout:  
 stderr: /bin/sh: node-gyp: command not found

Error while executing node-gyp -v: Command failed: node-gyp -v
/bin/sh: node-gyp: command not found

Exec xcodebuild -version 
 stdout: Xcode 8.3.3
Build version 8E3004b

 stderr: 
Exec gem which xcodeproj 
 stdout: /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj.rb

 stderr: 
Exec pod --version 
 stdout: 1.1.0.rc.3

 stderr: 
Exec null version 
 stdout:  
 stderr: /bin/sh: null: command not found

Error while executing null version: Command failed: null version
/bin/sh: null: command not found

spawn: /usr/local/share/android-sdk/tools/emulator "-help"
The result of checking is Android Emulator installed is:
- stdout: 
- stderr: spawn /usr/local/share/android-sdk/tools/emulator ENOENT
Exec mono --version 
 stdout:  
 stderr: /bin/sh: mono: command not found

Error while executing mono --version: Command failed: mono --version
/bin/sh: mono: command not found

Exec git --version 
 stdout: git version 2.11.0 (Apple Git-81)

 stderr: 
Exec gradle -v 
 stdout:  
 stderr: /bin/sh: gradle: command not found

Error while executing gradle -v: Command failed: gradle -v
/bin/sh: gradle: command not found

Exec "/Library/Java/Home/bin/javac" -version 
 stdout:  
 stderr: /bin/sh: /Library/Java/Home/bin/javac: No such file or directory

Error while executing "/Library/Java/Home/bin/javac" -version: Command failed: "/Library/Java/Home/bin/javac" -version
/bin/sh: /Library/Java/Home/bin/javac: No such file or directory

System information:
{ procInfo: 'nativescript/3.3.0',
  platform: 'darwin',
  os: 'Darwin Users-MacBook-Air.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64\n',
  shell: '/bin/bash',
  dotNetVer: null,
  procArch: 'x64',
  nodeVer: 'v7.5.0',
  npmVer: '5.5.1',
  javaVer: null,
  nodeGypVer: null,
  xcodeVer: 'Xcode 8.3.3\nBuild version 8E3004b\n',
  xcodeprojGemLocation: '/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj.rb\n',
  itunesInstalled: true,
  cocoapodVer: '1.1.0.rc.3',
  adbVer: null,
  emulatorInstalled: false,
  monoVer: null,
  gitVer: '2.11.0 (Apple Git-81)',
  gradleVer: null,
  javacVersion: null }
Looking for project in '/Users/User/nativescript/MyApp'
Project directory is '/Users/User/nativescript/MyApp'.
Exec which xcodebuild 
 stdout: /usr/bin/xcodebuild

 stderr: 
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
Validate options for platform: iOS
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
Searching for devices...
startLookingForDevices; platform is iOS
Starting to look for iOS devices.
Found device with identifier '35eede94bb00faeac9060469924d1871212a0265'
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
startLookingForDevices; platform is iOS
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
Exec ps cax | grep launchd_sim 
 stdout:  
 stderr: 
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
BeforeHookName for command liveSync is before-liveSync
Changes info in prepare platform: ProjectChangesInfo {
  appFilesChanged: false,
  packageChanged: false,
  appResourcesChanged: false,
  nativeChanged: false,
  configChanged: false,
  nativePlatformStatus: '3' }
Skipping prepare.
Building project...
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
  action: 'Build',
  label: 'iOS_Device_Debug_Incremental',
  customDimensions: { cd2: 'Pure JavaScript' } }
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
Xcode 8 requires a team id to be specified when building for device.
You can specify the team id by setting the DEVELOPMENT_TEAM setting in build.xcconfig file located in App_Resources folder of your app, or by using the --teamId option when calling run, debug or livesync commands.
Found and using the following development team installed on your system: User Lynch (48AY58T44V)
Selected teamId is '48AY58T44V'.
The specified 48AY58T44V is already set in the Xcode.
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //' 
 stdout: 8.3.3

 stderr: 
spawn: xcodebuild "-configuration" "Debug" "build" "SHARED_PRECOMPS_DIR=/Users/User/nativescript/MyApp/platforms/ios/build/sharedpch" "-project" "/Users/User/nativescript/MyApp/platforms/ios/MyApp.xcodeproj" "-target" "MyApp" "ARCHS=armv7" "VALID_ARCHS=armv7" "-sdk" "iphoneos" "CONFIGURATION_BUILD_DIR=/Users/User/nativescript/MyApp/platforms/ios/build/device"
Build settings from command line:
    ARCHS = armv7
    CONFIGURATION_BUILD_DIR = /Users/User/nativescript/MyApp/platforms/ios/build/device
    SDKROOT = iphoneos10.3
    SHARED_PRECOMPS_DIR = /Users/User/nativescript/MyApp/platforms/ios/build/sharedpch
    VALID_ARCHS = armv7

=== BUILD TARGET MyApp OF PROJECT MyApp WITH CONFIGURATION Debug ===

Check dependencies
No profiles for 'org.nativescript.MyApp' were found:  Xcode couldn't find a provisioning profile matching 'org.nativescript.MyApp'.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
Code signing is required for product type 'Application' in SDK 'iOS 10.3'

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
Unable to apply changes on device: 35eede94bb00faeac9060469924d1871212a0265. Error is: Command xcodebuild failed with exit code 65.
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
AfterHookName for command watch is after-watch
Project dir from hooksArgs is: /Users/User/nativescript/MyApp.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
  '/usr/local/lib/node_modules/nativescript/lib/common/hooks',
  '/Users/User/nativescript/MyApp/hooks' ]
AfterHookName for command liveSync is after-liveSync

I'm having the exact same issue as xlcrr

@donlawndale @xlcrr

In order to run on real device please ensure you have appropriate certificates and provisioning profiles on your machine.

You can list valid provisioning profiles by running this command:

tns build ios --release --for-device --provision

It will fail because provisioning is not specified, but it will list all available on your machine.

If you don't have valid certificates I hope this can help:
https://docs.nativescript.org/sidekick/user-guide/code-signing/code-signing-for-ios/create-development-provisioning

Was this page helpful?
0 / 5 - 0 ratings