EKEventStore store = new EKEventStore();
store.RequestAccess(EKEntityType.Event, (arg1, arg2) => Console.WriteLine(arg2));
The app should crash and the Output should contain an informational message:
[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
The app crashes and the Output only shows a native crash log, no informational message.
=== Visual Studio Enterprise 2017 for Mac ===
Version 7.3.2 (build 12)
Installation UUID: b968d862-551c-4a33-ab4e-9666400e357c
Runtime:
Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 504010007
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.0-preview2-25407-01
SDK: /usr/local/share/dotnet/sdk/2.0.0-preview2-006497/Sdks
SDK Version: 2.0.0-preview2-006497
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 9.2 (13772)
Build 9C40b
=== Xamarin.Mac ===
Version: 4.0.0.214 (Visual Studio Enterprise)
=== Xamarin.Android ===
Version: 8.1.0.25 (Visual Studio Enterprise)
Android SDK: /Users/johnmiller/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.2
Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin.iOS ===
Version: 11.6.1.2 (Visual Studio Enterprise)
Hash: 6857dfcc
Branch: xcode9.2
Build date: 2017-12-04 21:20:41-0500
=== Xamarin Inspector ===
Not Installed
=== Build Information ===
Release ID: 703020012
Git revision: 7d0c9d7ad46b125cf4b7bbf9532c0531b6433ce6
Build date: 2017-12-12 14:03:18-05
Xamarin addins: 6dddaa49fbecb2695fcdcd6b712eb269e288518c
Build lane: monodevelop-lion-d15-5
=== Operating System ===
Mac OS X 10.13.1
Darwin 17.2.0 Darwin Kernel Version 17.2.0
Fri Sep 29 18:27:05 PDT 2017
root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
MicroFramework 1.0.1
Prism Template Pack 1.6.1
Internet of Things (IoT) development (Preview) 7.1
I was able to replicate this bug, Xcode does show the nice error in the console logs when our managed app crashes
Jan 3 22:57:04 iDalex6Plus GHIssue3148(TCC)[646]
: This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
Jan 3 22:57:04 iDalex6Plus GHIssue3148(libxamarin-debug.dylib)[646]: critical:
Native stacktrace:
Jan 3 22:57:04 iDalex6Plus GHIssue3148(libxamarin-debug.dylib)[646]: critical: 0 libmonosgen-2.0.dylib 0x0000000101490c5c mono_handle_native_crash + 224
Unfortunately this isn't getting redirected into VS4Mac's Application Output so we need to find a way to catch it and redirect it to VS4Mac's Application Output window.
Issue still persists.
For anyone else trying to get it working add this to your Info.plist file (right click on Info.plist -> Open With -> XML (Text) Editor):
<key>NSCalendarsUsageDescription</key>
<string>Add calendar events</string>
anywhere should be OK, right before the closing </dict> tag is recommended.
With our latest versions I get
Loaded assembly: /Users/poupou/Library/Developer/CoreSimulator/Devices/1BE507D2-EC56-4B9A-9D76-842CC603A7AD/data/Containers/Bundle/Application/A0DED081-2631-45A9-A29B-94714F02408B/gh3148.app/Xamarin.iOS.dll
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], string, string)' to /Users/poupou/git/xamarin/xamarin-macios/src/UIKit/UIApplication.cs:61 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], System.Type, System.Type)' to /Users/poupou/git/xamarin/xamarin-macios/src/UIKit/UIApplication.cs:68 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[])' to /Users/poupou/git/xamarin/xamarin-macios/src/UIKit/UIApplication.cs:73 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], System.IntPtr, System.IntPtr)' to /Users/poupou/git/xamarin/xamarin-macios/src/UIKit/UIApplication.cs:78 [0x00000].
Loaded assembly: /Users/poupou/Library/Developer/CoreSimulator/Devices/1BE507D2-EC56-4B9A-9D76-842CC603A7AD/data/Containers/Bundle/Application/A0DED081-2631-45A9-A29B-94714F02408B/gh3148.app/System.dll
Loaded assembly: /Users/poupou/Library/Developer/CoreSimulator/Devices/1BE507D2-EC56-4B9A-9D76-842CC603A7AD/data/Containers/Bundle/Application/A0DED081-2631-45A9-A29B-94714F02408B/gh3148.app/gh3148.exe
Loaded assembly: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/Xamarin.Interactive.XS/Xamarin Inspector.app/Contents/SharedSupport/Agents/Forms/iOS/Xamarin.Interactive.iOS.dll
Loaded assembly: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/Xamarin.Interactive.XS/Xamarin Inspector.app/Contents/SharedSupport/Agents/Forms/iOS/Xamarin.Interactive.dll
Loaded assembly: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/Xamarin.Interactive.XS/Xamarin Inspector.app/Contents/SharedSupport/Agents/Forms/iOS/netstandard.dll
2018-10-12 10:17:34.256568-0400 gh3148[32631:34807861] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=32631
2018-10-12 10:17:34.256807-0400 gh3148[32631:34807861] SecTaskCopyDebugDescription: gh3148[32631]/0#-1 LF=0
Resolved pending breakpoint at 'ViewController.cs:19,1' to void gh3148.ViewController.ViewDidLoad () [0x00008].
2018-10-12 10:17:42.749141-0400 gh3148[32631:34807861] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=32631
2018-10-12 10:17:42.749449-0400 gh3148[32631:34807861] SecTaskCopyDebugDescription: gh3148[32631]/0#-1 LF=0
2018-10-12 10:17:42.771092-0400 gh3148[32631:34808715] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
2018-10-12 10:17:42.771369-0400 gh3148[32631:34808715] critical: Memory around native instruction pointer (0x119cc1eb6):
2018-10-12 10:17:42.771515-0400 gh3148[32631:34808715] critical: 0x119cc1ea6 ff ff c3 90 90 90 b8 09 02 00 02 49 89 ca 0f 05 ...........I....
2018-10-12 10:17:42.771625-0400 gh3148[32631:34808715] critical: 0x119cc1eb6 73 08 48 89 c7 e9 29 7c ff ff c3 90 90 90 b8 1e s.H...)|........
2018-10-12 10:17:42.771734-0400 gh3148[32631:34808715] critical: 0x119cc1ec6 00 00 02 49 89 ca 0f 05 73 08 48 89 c7 e9 36 7c ...I....s.H...6|
2018-10-12 10:17:42.771838-0400 gh3148[32631:34808715] critical: 0x119cc1ed6 ff ff c3 90 90 90 b8 94 01 00 02 49 89 ca 0f 05 ...........I....
2018-10-12 10:17:42.771939-0400 gh3148[32631:34808715] critical:
Native stacktrace:
2018-10-12 10:17:42.780902-0400 gh3148[32631:34808715] critical: 0 gh3148 0x000000010bc757c0 mono_handle_native_crash + 1056
2018-10-12 10:17:42.781061-0400 gh3148[32631:34808715] critical: 1 libsystem_platform.dylib 0x0000000119ce7f5a _sigtramp + 26
2018-10-12 10:17:42.781145-0400 gh3148[32631:34808715] critical: 2 ??? 0x0000000000000000 0x0 + 0
2018-10-12 10:17:42.781241-0400 gh3148[32631:34808715] critical: 3 libsystem_kernel.dylib 0x0000000119cbc2e5 fcntl + 0
2018-10-12 10:17:42.781337-0400 gh3148[32631:34808715] critical: 4 TCC 0x000000011c1c1e7a __TCCAccessRequest_block_invoke.85 + 0
2018-10-12 10:17:42.781429-0400 gh3148[32631:34808715] critical: 5 TCC 0x000000011c1c1dcd __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 0
2018-10-12 10:17:42.781516-0400 gh3148[32631:34808715] critical: 6 TCC 0x000000011c1c5efa __tccd_send_message_block_invoke + 242
2018-10-12 10:17:42.781602-0400 gh3148[32631:34808715] critical: 7 libxpc.dylib 0x0000000119c523e1 _xpc_connection_reply_callout + 36
2018-10-12 10:17:42.781688-0400 gh3148[32631:34808715] critical: 8 libxpc.dylib 0x0000000119c4711c _xpc_connection_call_reply_async + 82
2018-10-12 10:17:42.781781-0400 gh3148[32631:34808715] critical: 9 libdispatch.dylib 0x00000001199135f1 _dispatch_client_callout3 + 8
2018-10-12 10:17:42.781865-0400 gh3148[32631:34808715] critical: 10 libdispatch.dylib 0x000000011992aef5 _dispatch_mach_msg_async_reply_invoke + 343
2018-10-12 10:17:42.781945-0400 gh3148[32631:34808715] critical: 11 libdispatch.dylib 0x0000000119915af3 _dispatch_queue_override_invoke + 475
2018-10-12 10:17:42.782020-0400 gh3148[32631:34808715] critical: 12 libdispatch.dylib 0x00000001199224af _dispatch_root_queue_drain + 355
2018-10-12 10:17:42.782097-0400 gh3148[32631:34808715] critical: 13 libdispatch.dylib 0x0000000119922d19 _dispatch_worker_thread2 + 97
2018-10-12 10:17:42.782169-0400 gh3148[32631:34808715] critical: 14 libsystem_pthread.dylib 0x0000000119dc3169 _pthread_wqthread + 1387
2018-10-12 10:17:42.782350-0400 gh3148[32631:34808715] critical: 15 libsystem_pthread.dylib 0x0000000119dc2be9 start_wqthread + 13
2018-10-12 10:17:42.782488-0400 gh3148[32631:34808715] critical:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
which clearly shows the error inside VS4M
2018-10-12 10:17:42.771092-0400 gh3148[32631:34808715] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
This might not cover all other similar cases. We have another issue (and idea) open in https://github.com/xamarin/xamarin-macios/issues/4831 to change the default mono SIGABRT message to link to a web page that will suggest possible causes and fixes.
Most helpful comment
Issue still persists.
For anyone else trying to get it working add this to your Info.plist file (right click on Info.plist -> Open With -> XML (Text) Editor):
<key>NSCalendarsUsageDescription</key><string>Add calendar events</string>anywhere should be OK, right before the closing
</dict>tag is recommended.