Nativescript iOS Application Profiling on Device

2019-06-05 20:22发布

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条回答
相关推荐>>
2楼-- · 2019-06-05 21:05

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:

Screenshot for selecting Device

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

Fix provisioning Profile issue

Next step is:

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

Take note of the 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

Accounts Provisioning Profiles

  1. Part - Open the compiled Nativescript App in XCode

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

Folder Structure

Navigate into Platforms folder -> ios

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

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

Build Profiling

Building starts

enter image description here

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:

XCode App run

I hope it helps somebody!

查看更多
登录 后发表回答