How to get a simple app deployed on watchOS 3 with Xamarin? - xamarin

I can't get a simple app to run on watchOS 3 and it's driving me CRAZY!
I'm running with Xcode 8.
Recreate scenario: Create a newiOS app (defaults to deployment target 10), add WatchOS project (3.0). Try to compile.
I get:
Could not AOT the assembly (MT3001)
Changing Build link to "Don't Link" on all three projects and downgrading to target 8.4 and Watch OS 2.2 results:
Error MT1006: Could not install the application on the device: Sent message error( error : 0xe800002d).
Changing to target 10, but keeping Watch OS 2 finally gets compiled and installed on the phone and deployed on device, but debugger either:
A. Never manage to connect over Wifi to the watch (stuck at "waiting for the app to connect on port 10000)
B. Get the following error:
Launched watch application 'com.XXX.testwatch.watchkitapp' on 'Apple Watch' with pid 270
Exception: Xamarin.Hosting.MobileDeviceException: Send Message Error (error: 0xe800002d)
at Xamarin.Hosting.RealDevice.StartSession () <0x118c24dd0 + 0x0009d> in :0
at Xamarin.Hosting.DebugService+c__AnonStorey6.<>m__0 (System.Object v) <0x118c24450 + 0x000cf> in :0
[MVID] 703d5be3b466420882f6cb97c41b6723 0,1
What am I doing wrong here?

I've submitted a bug report To Xamarin. They confirmed. You need to modify the default compilation to disable the incremental build.

Related

Nativescript - cannot run android on device

I used to be able to run on android and all of a sudden I am getting this error (see below).
The only thing I recall changing is downgrading "nativescript-ui-listview" to "^7.1.0" and "nativescript-ui-sidedrawer" to "~7.0.0" because it otherwise breaks on ios 12.
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Installing on device f180a829...
More than one .apk found in /Users/manuelmaestrini/Programming/spiio-development/spiiomobile/platforms/android/app/build/outputs/apk directory. Using the last one produced from build.
Successfully installed on device with identifier 'f180a829'.
Application com.spiio.mobile is not running on device f180a829.
This issue may be caused by:
* crash at startup (try `tns debug android --debug-brk` to check why it crashes)
* different application identifier in your package.json and in your gradle files (check your identifier in `package.json` and in all *.gradle files in your App_Resources directory)
* device is locked
* manual closing of the application
Unable to apply changes on device: f180a829. Error is: Application com.spiio.mobile is not running.
Any idea what might be? I tried to do --clean, remove node_modules, hooks, platforms, uninstall and reinstall webpack etc but no luck...

Provisioning profile not being accepted?

I'm trying to create a IPA from my cordova-ionic project using visual studio 2015. I can run the project on an iOS simulator using remotebuild.
I have followed the steps here and created a provisioning profile (using my free Apple ID). I am in a tricky situation and the iOS device that I would like to run the project on is in a different country.
I'm creating the provisioning profile on my friend's mac with the iOS device attached. I am then logging into an El Capitan VM on my machine and using the provisioning profile generated on my friend's mac to attempt to create an IPA. I am following what is outlined here and running the project on visual studio using debug and remote device or local device.
I get the following error:
Error: Remote build error from the build server Build failed with error Error code 65 for command:
xcodebuild with args: -xcconfig,/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/cordova/build-debug.xcconfig,-project,BookYourTutor.xcodeproj,ARCHS=armv7 arm64,-target,BookYourTutor,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/sharedpch - 1 BookYourTutor 1
Looking at the output from build, towards the end, i see:
Libtool /Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device/libCordova.a normal armv7
cd /Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/CordovaLib
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Users/noyolk/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/noyolk/Downloads/Xcode-beta.app/Contents/Developer/usr/bin:/Users/noyolk/.taco_home/node_modules/taco-remote-lib/2.2.1/node_modules/taco-remote-lib/node_modules/ios-sim/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Users/noyolk/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Users/noyolk/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk -L/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device -filelist /Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/CordovaLib/build/CordovaLib.build/Debug-iphoneos/CordovaLib.build/Objects-normal/armv7/Cordova.LinkFileList -o /Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device/libCordova.a
=== BUILD TARGET BookYourTutor OF PROJECT BookYourTutor WITH CONFIGURATION Debug ===
Check dependencies
Signing for "BookYourTutor" 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'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Failed to build app for buildNumber 708: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/cordova/build-debug.xcconfig,-project,BookYourTutor.xcodeproj,ARCHS=armv7 arm64,-target,BookYourTutor,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/sharedpch
MSBUILD : cordova-build error : Error: Remote build error from the build server Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/cordova/build-debug.xcconfig,-project,BookYourTutor.xcodeproj,ARCHS=armv7 arm64,-target,BookYourTutor,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/sharedpch - 1
Error Remote build error from the build server Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/cordova/build-debug.xcconfig,-project,BookYourTutor.xcodeproj,ARCHS=armv7 arm64,-target,BookYourTutor,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/noyolk/.taco_home/remote-builds/taco-remote/builds/708/cordovaApp/platforms/ios/build/sharedpch - {1}
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
With what I believe to be the most important bit being,
=== BUILD TARGET BookYourTutor OF PROJECT BookYourTutor WITH CONFIGURATION Debug ===
Check dependencies
Signing for "BookYourTutor" 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'
** BUILD FAILED **
I'm having trouble understanding what exactly this means or how I should fix it. For context, I'm using xcode 8 beta 4 on my El Capitan VM.
I've tried searching around for this 'error code 65' and the error message 'Signing for XXX requires a development team. Select a development team in the project editor.' but have not had much luck.
Any help is greatly appreciated.
Downgrading to xcode 7 from xcode 8 beta 4 seems to have resolved this issue.
There is a change due to the release of iOS 10.
Reference https://dpogue.ca/articles/cordova-xcode8.html for a workaround.
I actually had to do some trial and error. The above link helped a lot, but the issues were still with what Apple was needing for XCode 8 to accept the build request. My settings in build.json are similar to this:
"ios": {
"debug": {
"developmentTeam": "[my team id]",
"provisioningProfile: "[my provisioning profile]"
},
"release": {
"developmentTeam": "[my team id]",
"provisioningProfile: "[my provisioning profile]"
}
}
}
To get your developmentTeam, log into developer.apple.com, click on Membership, and you will see your TEAM ID. Put that in as the developmentTeam.
For the provisioningProfile, open XCode --> Preferences, click on your profile, View Details. Click on your provisioning profile, right click, and Show in Finder. Your provisioning profile is the entire file name, minus the .mobileprovision file extension. Save build.json, rebuild your project, and you should be good to go.

No destinations were specified with the -destination flag which were valid for the specified scheme

My integration bot when trying to run the app on the server complains that...
xcodebuild: error: No destinations were specified with the -destination flag which were valid for the specified scheme 'MyScheme'.
Not sure how to approach this error?
Prior to crashing it does a bunch of searches for different devices...
2014-05-21 14:14:22.631 xcodebuild[49977:100b] [MT] DVTDeviceSearch: Searching for device with type 'iOS Simulator', options: {
OS = "7.1";
name = iPad;
}, genericOnly: NO allowMultiple:NO timeout:0.000000
2014-05-21 14:14:23.134 xcodebuild[49977:100b] [MT] DVTDeviceSearch: Search found devices: (
"<DVTiPhoneSimulator: 0x7ff6fdb9a230> {\n\t\tsessionActive: NO\n\t\tlaunchService: (null)\n\t\tlaunchSucceeded: NO\n\t\tcurrentSimulatorSession: (null)\n\t\tdidExitRecursionGuard: NO\n\t\tdeviceInfo: <DeviceInfo iPad>\n\t\tsimulatedSystemRoot: <DTiPhoneSimulatorSystemRoot 0x7ff6fdb8e6f0> path=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk version=7.1 name=Simulator - iOS 7.1\n\t\tsimulatedDeviceFamily: 2\n\t\tsupportedDeviceFamilies: (\n 1,\n 2\n)\n\t\t}"
)
Checking the servers xcode I can see 6.1 and 7.0 simulator installed.
It also runs fine from xcode.
Your log states it is looking for 7.1 simulators, not 7.0. Either install 7.1 simulators to your Xcode server or downgrade your Deployment Target to 7.0.
I had to update my Xcode Version on our build server.
You can also check, which simulators are available, when you go to
Xcode-> Preferences... -> Components
Make sure the given SDK version was available here. In your case it would be iOS 7.1 simulator. If it was not available, hit the download button.

Xcode Instruments gives this error "Could not start script, target application is not frontmost."

I am using Xcode version 5.0 and trying to use instruments,when i am running the script which contains "var target = UIATarget.localTarget();"
the following error appears :" Could not start script, target application is not frontmost."
It's known issue:
The message “Could Not Start Script : Target app is not frontmost” may be displayed when attempting to capture a UI Automation script in Instruments against the iOS 7 Simulator.
If this occurs, close the trace document and create a new one. 15387075
Source: Xcode 5.0.2 Release notes

flex 4.6 mobile project debug error using air 3.4

i've followed this in order to flashbuilder 4.6 to use air sdk 3.4. no problems, or hiccups with the update.
the only problem is when i try to debug a mobile project using this sdk, either for android or ios i get the following error:
Process terminated without establishing connection to debugger.
invalid application descriptor: Unknown namespace:
http://ns.adobe.com/air/application/3.4
Launch command details: "C:\Program Files (x86)\Adobe\Adobe Flash
Builder 4.6\sdks\4.6.1\bin\adl.exe" -runtime "C:\Program Files
(x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.1\runtimes\air\win"
-profile mobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -XversionPlatform IOS "C:\Users\joao\Adobe Flash Builder 4.6\teste34\bin-debug\teste34-app.xml" "C:\Users\joao\Adobe Flash Builder 4.6\teste34\bin-debug"
i've also got this problem.
following is what i've done:
1:create a new empty mobile application and debug it runs
2:open the new app's '{appname}-app.xml' file , find the 'xmlns' property in application root node for example
<application xmlns="http://ns.adobe.com/air/application/3.1">
3:replace the row of your old application
So i think the problem is your air sdk can not support the 3.4 version

Resources