Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeScript CLI fail when running "tns run ios"

I'm practicing with this new programming framework called NativeScript, which allows creating native apps using JS. However, when I started working on the Hello World tutorial, I got this error:

https://gist.github.com/longpham91/d603c8fe7f6c6b06e86f

The error occurred when I tried running command "tns run ios" on Terminal, which basically allowed NativeScript to run HelloWorld app on my phone.

I also looked at the error log, and it seemed that the error might have something to do with my Xcode device settings, as explained here:

Check dependencies Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.4'

I'm not sure what this means, though.

like image 379
Long Pham Avatar asked Jul 02 '15 22:07

Long Pham


1 Answers

I was able to figure this out after posting a thread on {N} Google group. Here's how:

  1. Generate the Certificate and Provisioning Profile, following this tutorial: http://seventhsoulmountain.blogspot.no/2013/09/ios-code-sign-in-complete-walkthrough.html

  2. Go into the iOS section of your {N} project (under platforms/ios), and run the .xcodeproject file. You can also make a copy of this folder, to be sure that you don't accidentally change something in the source code.

  3. When the Xcode project is opened, go to Xcode > Preferences > Accounts, and click on View Details.

  4. Add the Provisioning Profile by clicking the + button.

That's all. Took me a while to figure this out since I'm not all that familiar with Xcode, but your project should run on your iOS device now.

like image 83
Long Pham Avatar answered Oct 13 '22 02:10

Long Pham