Bug 43693 - Unable to launch Watch app with notification interface
Summary: Unable to launch Watch app with notification interface
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.WatchOS.dll ()
Version: XI 9.99 (iOS 10 previews)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-08-24 07:43 UTC by Christer Nordvik
Modified: 2016-09-23 16:36 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Christer Nordvik 2016-08-24 07:43:45 UTC
I am trying to launch the notification interface with latest Alpha but following the instructions here: https://developer.xamarin.com/guides/ios/watch/notifications/ and launching the watch app doesn't do anything. The Apple watch app is deployed and simulator is started but nothing happens. 

I then tried running the app from commandline but I cannot get it to start. It complains about a missing Info.plist file but it seems to search in the wrong directory? The Info.plist is located at: 
/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2/bin/iPhoneSimulator/Debug/FotMobFotMobWatchAppV2.app/Info.plist


/Library/Frameworks/Xamarin.iOS.framework/Versions/9.99.3.8/bin/mtouch --sdkroot=/Applications/Xcode-Beta.app/Contents/Developer/ --device=:v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-10-0,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-6 --launchsimwatch=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2/bin/iPhoneSimulator/Debug/FotMobFotMobWatchAppV2.app --watchlaunchmode=Notification --watchnotificationpayload=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2Extension/PushNotificationPayload.json
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.FileNotFoundException: Could not find required file '/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2/bin/iPhoneSimulator/Info.plist'.


I tried pointing it to the root of the project instead: 

/Library/Frameworks/Xamarin.iOS.framework/Versions/9.99.3.8/bin/mtouch --sdkroot=/Applications/Xcode-Beta.app/Contents/Developer/ --device=:v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-10-0,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-6 --launchsimwatch=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2  --watchlaunchmode=Notification --watchnotificationpayload=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2Extension/PushNotificationPayload.json     
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Hosting.PList.get_UIDeviceFamily () <0x1108d9f30 + 0x00099> in <filename unknown>:0 
  at Xamarin.Hosting.AppBundle.IsFamily (Xamarin.MacDev.AppleDeviceFamily family) <0x1108d9eb0 + 0x00026> in <filename unknown>:0 
  at Xamarin.Hosting.AppBundle.get_IsWatchOSApp () <0x1108d9e80 + 0x00019> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.LaunchWatchSimulator () <0x109865550 + 0x000b3> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.Main2 (System.String[] args) <0x109827000 + 0x02646> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.Main (System.String[] args) <0x1060c0c10 + 0x0009a> in <filename unknown>:0 

I then added UIDeviceFamily 4 to the Info.plist but crashed again so I gave up. Am I doing something wrong here? 

/Library/Frameworks/Xamarin.iOS.framework/Versions/9.99.3.8/bin/mtouch --sdkroot=/Applications/Xcode-Beta.app/Contents/Developer/ --device=:v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-10-0,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-6 --launchsimwatch=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2  --watchlaunchmode=Notification --watchnotificationpayload=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2Extension/PushNotificationPayload.json
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Utils.NSRunLoopExtensions.RunUntilTaskCompletion (Foundation.NSRunLoop this, System.Threading.Tasks.Task task) <0x1128b5460 + 0x0015b> in <filename unknown>:0 
  at Xamarin.Hosting.Services.LaunchWatchApplicationInSimulator (Xamarin.Hosting.SimulatorLaunchConfig config) <0x1128afaf0 + 0x004a5> in <filename unknown>:0 
  at Xamarin.Launcher.SimController.LaunchWatchApp (Xamarin.Hosting.SimulatorLaunchConfig config) <0x1128ae840 + 0x00224> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.LaunchWatchSimulator () <0x10b932550 + 0x0011f> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.Main2 (System.String[] args) <0x10b7f3000 + 0x02646> in <filename unknown>:0 
  at Xamarin.Launcher.Driver.Main (System.String[] args) <0x106fd8c10 + 0x0009a> in <filename unknown>:0
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-08-25 18:23:31 UTC
The correct path is:

    --launchsimwatch=/Users/cnordvik/projects/git/FotMob-iOS/FotMob.FotMobWatchAppV2/bin/iPhoneSimulator/Debug/FotMobFotMobWatchAppV2.app/Watch/*.app

however I can't reproduce this.

Can you try with the correct path and see if that works?

If not, please attach your complete version data from Xamarin Studio's about menu.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-09-23 16:36:02 UTC
@Christer, were you able to make this work?
Comment 3 Christer Nordvik 2016-09-23 16:36:50 UTC
Yes, got it working from Xamarin Studio so all good :-)