How to test NativeScript app on real iPhone - ios

I am new to NativeScript and I just made my first app. My app requires testing on a real iPhone; however, I don't know how to test it on a real iPhone and not the simulator. I tried looking at the appbuilder docs but I can't figure out how to just test it on an iPhone. I tried to use tns run ios while I had an iPhone plugged in but I get this:
=== BUILD TARGET LOKale OF PROJECT LOKale WITH CONFIGURATION Debug ===
Check dependencies
Signing for "LOKale" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command xcodebuild failed with exit code 65
# run ios
I have no idea why I can't just run it on an iPhone. Can anyone tell me how to test it on a real iPhone or what I am doing wrong? Thanks in advance!

As shown in the link provided in the comments, to test on real device you will need to provide development team id.
Here are the steps to do it in NativeScript application:
Open app/App_Resources/iOS/build.xcconfig
Uncomment (or add) DEVELOPMENT_TEAM = YOUR_TEAM_ID;
Place your team id and rebuild your application
Update: You can also use
tns run ios --provision
to see the available provision profiles and build the app with
tns run ios --provision <my-provision-profile>

Related

Failing to deploy a Flutter app on my attached Ipad

I am developing a personal flutter app on a Mac and trying to deploy to my Ipad attached by USB.
I have created a provisioning profile on my Apple developer account however I don't know how to use it for Flutter.
My error from Android builder is:
Launching lib/aopAppMain.dart on Chris’s iPad in debug mode...
Signing iOS app for device deployment using developer identity: "iPhone Developer: chrisr#instantobjects.com (XXXXXXX)"
Starting Xcode build...
Xcode build done. 1.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Code Signing Error: "Runner" requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Could not build the precompiled application for the device.
Error launching application on Chris’s iPad.
If I load the project in XCode it only has an Info tab and a Build Settings tab.
If I fire up a swift project, the Provisioning Profile assignment seems to happen on the General Tab and at least my Flutter project hasn't got one of those in XCode.
I used flutter create to create a new app and migrated my source across and everything is now ok.

Unable to deploy an Ionic Framework app on ios device

I'm developing an ionic framework app with Ionic 2. I can deploy via my MAC to an android device using 'ionic cordova run android'. But when I execute 'ionic cordova run ios' I get the following error:
Code Signing Error: Signing for "App" requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
All of the online answers for this issue only mention signing provisions in xCode but I'm not sure how that would resolve an Ionic app created in Visual Code. I didn't do any development in xCode and it's only installed in order to use the emulator. The solutions say to open the app in xcode for the signing but you can't even open an Ionic app in xCode.
Could someone please help with this, I've had this issue for weeks with ios.
Open the .xcodeproj in xcode, go to the project settings, and under signing, use the team dropdown menu to select a dev team and remove the error. This error is occurring because to emulate an ios app, it has to be built using xcode.

How to build and deploy an ios api file in real device using MAC

i am new to mac, so for i have installed xcode and successfully added the platform for ios.
When i give adb devices i am not able to detect my device name for iphone but when i connect android and give adb devices i am getting my device .
when i give ionic build ios i'm getting the following errors. i don't know how to enable the developer option in iphone
=== BUILD TARGET myFirst OF PROJECT myFirst WITH CONFIGURATION Debug ===
Check dependencies
Signing for "myFirst" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/subbarao/Desktop/myFirst/platforms/ios/cordova/build-debug.xcconfig,-workspace,myFirst.xcworkspace,-scheme,myFirst,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,myFirst.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/sharedpch
You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.
If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.
cordova run with ios error .. Error code 65 for command: xcodebuild with args:
Same question here by this guy
Try to sign in as ios dev account in Xcode
or try
ionic platform remove ios
ionic platform add ios
i was getting the same error but i tried the above command and its working now
thanks

Cordova iOS - Build App Error 65

I developed an App on a Windows Machine (For Android).
I also want the App for iOS. So I installed Xcode, node.js and cordova.
There are no errors, when I run my App on a Emulator.
When I run the App on Device with the command cordova run ios --device, I get the following Errors:
Check dependencies
Signing for "HelloCordova" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/milkogrieger/Woow2/platforms/ios/cordova/build-
debug.xcconfig,- workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-
configuration,Debug,-
destination,generic/platform=iOS,-
archivePath,HelloCordova.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/milkogri
eger/Woow2/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/milkogrieger/Woow2/platforms/ios/build/sharedpch
I found the following Solutions and tried them:
remove all plugins
add plugins
remove platforms
add platforms
But the error is still there.
I hope someone can help me
Thanks
You need to specify your development team as the message indicates. You can do this easily by configuring build.json, as described in the docs and further clarified here.

Do I need iPhone Developer license to run cordova/phonegap in ios simulator?

I don't have an iPhone developer license.
It was working fine when I execute "cordova run ios"
Then I created a new project using "cordova create test_app"
When I run "cordova run ios", it throws this error.
Then the project that used to work is also failing with the same error?
Check dependencies
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Developer” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: /Users/Anthony/dev/test_app/platforms/ios/cordova/run: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
Be sure to have no device connected to the Mac else phonegap will try to build and deploy your app on it. I had the issue with my iPhone plugged in.
Also in Xcode be sure that you build the debug release with command line tools (in the info tab of project properties)
I would suggest you to go over the solution in this thread - which tells you how to disabling Code Signing. Anyway, no harm in checking this -
Verify that the Code Signing section's Code Signing Identity within the project settings is set to None -
Search for Code Signing in Target of your app, and check if Don't Code Sign is chosen.
Ey
One thing is to play with XCode and Cordova to make a new project and learn how phonegap or another wrapper works and a different thing is to publish an application. Following the apple specifications, you can always create a new application and test it in the simulator. The benefits of becoming an apple developer are you can try your applications in a physical device but it doesnt mean you cant create an application and try it in the simulator.
If you have tried to run the application in a real device, XCode will complain about the required credentials because you are not an apple developer and you dont have your certificate installed in the keychain so the application cant be signed for deployment on a real device.
If you want to test the application in a device "Yes" you need to become an apple developer and pay the fee, if not, dont worry you can run as many applications as you want in the simulator.
Check the settings of your project as well to see if there is something wrong.

Resources