Nativescript iOS Application Profiling on Device

左心房为你撑大大i 提交于 2019-12-23 03:41:55

问题


How to run a Nativescript App without Telerik Platform and Apple Developer Membership. After searching on the Nativescript Documentation the only solution I found is with a Developer Membership of Apple.

So after stucking a time on this I found a solution on how to run the App on Device without telerik appbuilder or Membership of Apple Developer.


回答1:


After searching for a while on how to test a Nativescript App on iOS without Telerik Platform and no Apple Developer Membership, and no luck on any documentation. I have a got a solution which I would like to share if anyone is stuck on it too.

Requirements: MacOSX NativeScript XCode

For this post I will take the Sample-Groceries App of NativeScript.

  1. Part - Compile Nativescript app

Follow the instructions of Nativescript to run the sample app on a Device Emulator, after successfully running the App on the Emulator you know you have a compiled XCode App.

  1. Part - Prepare Provisioning Profile

To obtain a valid provisioning Profile you have to open XCode. Create a new Project (Game per example): File -> New -> Project

Important! After that you have to select your iPhone on the list:

After selecting the device you have to fix a Issue. It says: No matching provisioning profiles found. Click the button "Fix Issue"

Next step is:

Take note of the Bundle identifier, we need to modify the sample app to this Bundle Identifier.

Now you can close the project in XCode. After this you should be able to view the provisioning profile in your account: XCode -> Preferences -> Accounts -> View Details

  1. Part - Open the compiled Nativescript App in XCode

Locate your sample-groceries App in Finder. Inside the folder you should have this structure:

Navigate into Platforms folder -> ios

In the ios folder you should have a XCode project file:

Open this project file with XCode.

What we have to do is to change the Bundle identifier of our app. On the sample App the Bundle Identifier is "com.nativescript.groceries"

we have to change this with our Bandle Identifier created in the 2. Part. in this case "hagele.marc.groceries"

Then click on: Product -> Build For -> Profiling

Building starts

After finishing the Build you should be able to run your NativeScript project on your Device.

The first time its possible that XCode complains about permissions. Follow the instructions of XCode.

After that you will be able to run the App with:

I hope it helps somebody!



来源:https://stackoverflow.com/questions/37362203/nativescript-ios-application-profiling-on-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!