Running an IOS in MAC


#1

Hello !

Could you help me for deploy app to device ?

[18-06-21 18:52:15.645] Error detected during LiveSync on 63265d3393ce8cac7f96f3f5b33fb28bdeec7eea for /Users/dev/Documents/tophr01. Error: Device 63265d3393ce8cac7f96f3f5b33fb28bdeec7eea lost during operation apps for message 5cef638c-db72-4618-9c9a-e145ee42b9fa
[18-06-21 18:52:15.652] Couldn’t enable debugging for 63265d3393ce8cac7f96f3f5b33fb28bdeec7eea, Error: Couldn’t enable debugging for 63265d3393ce8cac7f96f3f5b33fb28bdeec7eea
at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:125:28)
at Errors.failWithoutHelp (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:135:21)
at LiveSyncService. (/usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:225:30)
at Generator.next ()
at /usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:13:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:9:12)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (/usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:222:16)
at LiveSyncService. (/usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:262:25)
at Generator.next ()
at fulfilled (/usr/local/lib/node_modules/nativescript/lib/services/livesync/livesync-service.js:10:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)


#2

you can try to run the project from xcode once, usually I see a message in xcode where it says “Preparing the device for debugging”, then you can try again from terminal.


#3

Result:

MacPro-Gabit:tophr01 dev$ tns run ios

Searching for devices...

Executing before-watch hook from /Users/dev/Documents/tophr01/hooks/before-watch/nativescript-dev-sass.js

Found peer node-sass

Skipping prepare.

Building project...

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: TOO 'CLOUDMAKER' (TY9M2834F9)

Xcode build...

2018-06-22 12:41:11.949 xcodebuild[47579:1962730]  iPhoneConnect: ## Unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=-402652958 "Development cannot be enabled while your device is locked." UserInfo={NSLocalizedDescription=Development cannot be enabled while your device is locked., com.apple.dtdevicekit.stacktrace=(

	0   DTDeviceKitBase                     0x000000011558df4f DTDKCreateNSError + 113

	1   DTDeviceKitBase                     0x000000011558e793 DTDK_AMDErrorToNSError + 1135

	2   DTDeviceKitBase                     0x00000001155cdb1a -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 774

	3   DTDeviceKitBase                     0x00000001155ce3d0 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 479

	4   IDEiOSSupportCore                   0x000000010ff7a6bc __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133

	5   DVTFoundation                       0x000000010924eb8c __DVTDispatchGroupAsync_block_invoke + 806

	6   libdispatch.dylib                   0x00007fff5eb3e5fa _dispatch_call_block_and_release + 12

	7   libdispatch.dylib                   0x00007fff5eb36db8 _dispatch_client_callout + 8

	8   libdispatch.dylib                   0x00007fff5eb49f00 _dispatch_continuation_pop + 599

	9   libdispatch.dylib                   0x00007fff5eb41733 _dispatch_async_redirect_invoke + 703

	10  libdispatch.dylib                   0x00007fff5eb389a9 _dispatch_root_queue_drain + 515

	11  libdispatch.dylib                   0x00007fff5eb38755 _dispatch_worker_thread3 + 101

	12  libsystem_pthread.dylib             0x00007fff5ee88169 _pthread_wqthread + 1387

	13  libsystem_pthread.dylib             0x00007fff5ee87be9 start_wqthread + 13

), NSLocalizedRecoverySuggestion=Please unlock your device and reattach. (0xE80000E2)., NSLocalizedFailureReason=Please unlock your device and reattach. (0xE80000E2).}) {

    NSLocalizedDescription = "Development cannot be enabled while your device is locked.";

    NSLocalizedFailureReason = "Please unlock your device and reattach. (0xE80000E2).";

    NSLocalizedRecoverySuggestion = "Please unlock your device and reattach. (0xE80000E2).";

    "com.apple.dtdevicekit.stacktrace" = (

	0   DTDeviceKitBase                     0x000000011558df4f DTDKCreateNSError + 113

	1   DTDeviceKitBase                     0x000000011558e793 DTDK_AMDErrorToNSError + 1135

	2   DTDeviceKitBase                     0x00000001155cdb1a -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 774

	3   DTDeviceKitBase                     0x00000001155ce3d0 -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 479

	4   IDEiOSSupportCore                   0x000000010ff7a6bc __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133

	5   DVTFoundation                       0x000000010924eb8c __DVTDispatchGroupAsync_block_invoke + 806

	6   libdispatch.dylib                   0x00007fff5eb3e5fa _dispatch_call_block_and_release + 12

	7   libdispatch.dylib                   0x00007fff5eb36db8 _dispatch_client_callout + 8

	8   libdispatch.dylib                   0x00007fff5eb49f00 _dispatch_continuation_pop + 599

	9   libdispatch.dylib                   0x00007fff5eb41733 _dispatch_async_redirect_invoke + 703

	10  libdispatch.dylib                   0x00007fff5eb389a9 _dispatch_root_queue_drain + 515

	11  libdispatch.dylib                   0x00007fff5eb38755 _dispatch_worker_thread3 + 101

	12  libsystem_pthread.dylib             0x00007fff5ee88169 _pthread_wqthread + 1387

	13  libsystem_pthread.dylib             0x00007fff5ee87be9 start_wqthread + 13

);

}

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

Code Signing Error: There are no accounts registered with Xcode. Add your developer account to Xcode

Code Signing Error: No profiles for 'kz.tophr' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching 'kz.tophr'.

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'

Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.4'

** ARCHIVE FAILED **



Unable to apply changes on device: 1207a074ec7d61cf5c040f3e196e070e0c0be15c. Error is: Command xcodebuild failed with exit code 65.

Executing after-watch hook from /Users/dev/Documents/tophr01/hooks/after-watch/nativescript-dev-sass.js

Stopping sass watch




#4

Did you follow this doc?

https://docs.nativescript.org/sidekick/user-guide/code-signing/code-signing-for-ios/create-development-provisioning

you need dev certificate to be able to debug on ios


#5

I have certificate and provision file. They are was used in NativeScript Side Kick.


#6

Can you open the project workspace from platforms/ios in xcode, and run it from there to see if it works?


#7

Open project in Xcode, and run
Build failed