App will run and is debuggable in iOS simulator
App is instantly closed and VSMac has no output when running on iOS 10 simulator.
Running the same app without changes on iOS 11 and iOS 12 simulators work fine. App runs, debugger connects and info appears in the log window in VS Mac
I have tried restarting VS Mac a number of times since the update. This did not change anything.
I have since rebooted my Mac and this hasn't improved anything either.
=== Visual Studio Community 2017 for Mac ===
Version 7.6.11 (build 9)
Installation UUID: 15d318c1-0022-470b-8742-ac625e930509
Runtime:
Mono 5.12.0.309 (2018-02/39d89a335c8) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 512000309
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.2
2.1.1
2.0.5
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
2.1.302
2.1.301
2.1.4
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 9.0.0.20 (Visual Studio Community)
Android SDK: /Users/ewan/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.1
SDK Build Tools Version: 27.0.3
Java SDK: /usr
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
(I'm running a Xamarin.Mac patch in order to build and run our Mac app without rendering glitches on Mojave. See https://github.com/xamarin/xamarin-macios/issues/4848)
Version: 5.2.1.4 (Visual Studio Community)
Hash: 2d1d1183
Branch:
Build date: 2018-10-05 11:03:51-0400
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Xamarin.iOS ===
Version: 12.2.1.10 (Visual Studio Community)
Hash: f2a05edd
Branch: d15-9
Build date: 2018-10-31 18:55:57-0400
=== Build Information ===
Release ID: 706110009
Git revision: d7cd66f5e3acd3d46ba0b94a0c935378f828bde0
Build date: 2018-10-31 17:17:12+00
Build branch: release-7.6
Xamarin extensions: bc9b985bfcb480b04a208a6d4045adc443a07857
=== Operating System ===
Mac OS X 10.14.1
Darwin 18.2.0 Darwin Kernel Version 18.2.0
Fri Oct 5 19:41:49 PDT 2018
root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
Have you tried rebuilding your project?
Rebuild: Still happens
Clean + Rebuild via keyboard shortcuts: Still happens
Manual Clean + Rebuild: Still happens
I could reproduce this by launching a single view template project on a 9.3 simulator. This works on a 11.3 and 12.1 simulator.
Simulator Log: https://gist.github.com/GouriKumari/bb9611edad1099aebf3cc1cdb7756be1
Screencast: https://screencast.com/t/w5npuJ0x
This issue occurs with XI 12.1.0.15, it doesn't look like a regression with 12.2.1.10.
https://gist.github.com/GouriKumari/4b93a699f61c6c0bf77fa09e489522ec
Hello, thank you for your report! I am also able to reproduce this.
@GouriKumari is there any chance you can try to repro this on an actual device with either iOS 10/9? Since the simulator is not giving us anything useful.
This is probably a known issue from Apple with older iOS Simulators on Mojave.
Can you check if there are any crash reports in ~/Library/Logs/DiagnosticReports/ (and attach them)?
It was working right before I updated Xamarin.iOS. That directory was full so I re-ran it again on the iOS 10 simulator and got the following .crash file
https://gist.github.com/projectgoav/91e32602724d8af54aaefb67b4f316d2
Hope this helps!
Also noticed that if you try and launch the app directly from the simulator it'll crash right away as well.
I couldn't reproduce the simulator launching issue on high Sierra with single view template.
https://screencast.com/t/gvAdWk2a3.
I tested the app on an 8.3 device from both Mojave and High Sierra and it deployed and debugged successfully.
https://www.screencast.com/t/G8Tq0G66ikX
After some research, the issue is linked to #4741, quoting https://github.com/xamarin/xamarin-macios/issues/4741#issuecomment-419790225
This is the error:
Dyld Error Message: Library not loaded: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices Referenced from: /System/Library/Frameworks/Intents.framework/Intents Reason: no suitable image found. Did find: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices: mach-o, but not built for iOS simulatorwhich happens when trying to use the iOS 9.X simulator on _macOS Mojave_.
This is a bug in Mojave and/or Xcode/the simulator, and is in fact listed in Xcode 10's release notes:
"Weak linking against frameworks that are not present in simulator runtimes older than iOS 12.0, tvOS 12.0, and watchOS 5.0 yet are present in macOS Mojave can cause an app to crash on launch when running in those older simulator runtimes. (41224059) Workaround: Use older simulator runtimes on macOS High Sierra."
This is the reason why @GouriKumari could not reproduce the issue on a High Sierra machine.
One workaround is to use the static registrar (give -registrar:static to mtouch on additional mtouch arguments options inside project settings, this will allow you to run your app in older sims at the expense of a little more build time using macOS Mojave or you could use a High Sierra machine.
I'm closing this, since it's not a bug in any Xamarin products.
I'm a little confused here. I've been using the iOS 10 simulator exclusively for the past few months during the upgrade to Mojave beta, release and .1 update as well as the XCode 10 beta, release and .1 update. During this I've tried to keep my VS as up-to-date as possible with the 'Preview' or 'Stable' channels.
If it is indeed the case, that it's a Mojave simulator bug, I would have thought I would have seen it long before now? I was able to deploy, run and debug on the simulator until the latest Xamarin.iOS update the other day.
I looked into my update cache in Visual Studio and found the previous Xamarin.iOS installer (6th Nov: v12.1.0.15). After installing this I can build, deploy, run and debug my app on iOS 10 quite happily.
Any workaround for this? Adding -registrar:static to mtouch argument doesn't make any difference.
I've not found one.
In the meantime I reverted back to the last working Xamarin iOS release I had (12.1.0.15) till either Xamarin or Apple fix it...
@lassana
Any workaround for this? Adding
-registrar:statictomtouchargument doesn't make any difference.
Can you try enabling the linker in the project's iOS Build options (either Link SDK or Link All) and see if that works?
Enabling the linker allows me to deploy, run and debug on iOS 10 simulators using Xamarin iOS 12.2.1.11
@rolfbjarne , setting Link Framework SDKs and adding -registrar:static allow me to run the app on iOS 9 simulators. Thank you!
Just to add to my previous comment, I am able to run on iOS 10 simulators without adding -registrar:static
Most helpful comment
@lassana
Can you try enabling the linker in the project's iOS Build options (either Link SDK or Link All) and see if that works?