4f004e78b3
A few compat fixes were necessary to make the code compile and run correctly. Fixes this startup crash with the linkall test: 2020-08-27 18:15:09.648352+0200 link all[91128:1963430] *** Assertion failure in void _UIApplicationMainPreparations(int, char **, NSString *__strong, NSString *__strong)(), /Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3920.31.100/UIApplication.m:4765 2020-08-27 18:15:09.697128+0200 link all[91128:1963430] Unhandled Exception: Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded. Native stack trace: 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862 5 ??? 0x00000001087d2504 0x0 + 4437386500 6 ??? 0x00000001087d237b 0x0 + 4437386107 7 ??? 0x00000001087cef93 0x0 + 4437372819 8 ??? 0x00000001087cedcb 0x0 + 4437372363 9 ??? 0x00000001087ceec1 0x0 + 4437372609 10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911 11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80 12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92 13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369 14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685 15 link all 0x0000000107f0cced main + 45 16 libdyld.dylib 0x00007fff51a231fd start + 1 at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception) at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc) at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate) at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName) at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 --- End of stack trace from previous location --- at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate) at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName) at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862 5 ??? 0x00000001087d2504 0x0 + 4437386500 6 ??? 0x00000001087d237b 0x0 + 4437386107 7 ??? 0x00000001087cef93 0x0 + 4437372819 8 ??? 0x00000001087cedcb 0x0 + 4437372363 9 ??? 0x00000001087ceec1 0x0 + 4437372609 10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911 11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80 12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92 13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369 14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685 15 link all 0x0000000107f0cced main + 45 16 libdyld.dylib 0x00007fff51a231fd start + 1 2020-08-27 18:15:09.698283+0200 link all[91128:1963430] Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded. Native stack trace: 0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff258b8c9b -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 4 UIKitCore 0x00007fff48c8baed UIApplicationMain + 1862 5 ??? 0x00000001087d2504 0x0 + 4437386500 6 ??? 0x00000001087d237b 0x0 + 4437386107 7 ??? 0x00000001087cef93 0x0 + 4437372819 8 ??? 0x00000001087cedcb 0x0 + 4437372363 9 ??? 0x00000001087ceec1 0x0 + 4437372609 10 libmonosgen-2.0.dylib 0x00000001081a2d7e mono_jit_runtime_invoke + 1911 11 libmonosgen-2.0.dylib 0x000000010832ee0a do_runtime_invoke + 80 12 libmonosgen-2.0.dylib 0x0000000108331fd0 do_exec_main_checked + 92 13 libmonosgen-2.0.dylib 0x00000001081f191e mono_jit_exec + 369 14 libxamarin-debug.dylib 0x000000010802badd xamarin_main + 2685 15 link all 0x0000000107f0cced main + 45 16 libdyld.dylib 0x00007fff51a231fd start + 1 (Foundation.MonoTouchException) at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception) at ObjCRuntime.Runtime.throw_ns_exception(IntPtr exc) at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate) at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName) at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 --- End of stack trace from previous location --- at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate) at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName) at LinkAll.Application.Main(String[] args) in [...]/xamarin-macios/tests/linker/ios/link all/Main.cs:line 15 ================================================================= Native Crash Reporting ================================================================= Got a abrt while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= ================================================================= Native stacktrace: ================================================================= 0x108273f92 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info 0x1082207bd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_native_crash 0x1082737e9 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : sigabrt_signal_handler 0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp 0x0 - Unknown 0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort 0x10801979f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler 0x1082e4980 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook 0x108220166 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal 0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception 0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception 0x1086105b0 - Unknown 0x1080194fb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception 0x108019377 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_process_managed_exception_gchandle 0x108019333 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_ftnptr_exception_handler 0x10821feeb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception_internal 0x10821ea47 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_handle_exception 0x10826ea06 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_amd64_throw_exception 0x1086105b0 - Unknown 0x1087d264b - Unknown 0x10869439b - Unknown 0x108016c07 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_throw_ns_exception 0x10801a1cb - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : _ZL17exception_handlerP11NSException 0x7fff23e3d36d - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : __handleUncaughtException 0x7fff50ba8c05 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL15_objc_terminatev 0x7fff4f9f6c87 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZSt11__terminatePFvvE 0x7fff4f9f940b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : __cxa_get_exception_ptr 0x7fff4f9f93d2 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib : _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception 0x7fff50ba8ad6 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib : _ZL26_objc_exception_destructorPv 0x7fff23e3cc88 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : +[NSException raise:format:arguments:] 0x7fff258b8c9b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] 0x7fff48c8baed - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain 0x1087d2504 - Unknown 0x1087d237b - Unknown 0x1087cef93 - Unknown 0x1087cedcb - Unknown 0x1087ceec1 - Unknown 0x1081a2d7e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_runtime_invoke 0x10832ee0a - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_runtime_invoke 0x108331fd0 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : do_exec_main_checked 0x1081f191e - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libmonosgen-2.0.dylib : mono_jit_exec 0x10802badd - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/libxamarin-debug.dylib : xamarin_main 0x107f0cced - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/2394E0CC-9F77-4BAD-8ADE-6CEE69EF8D6C/link all.app/link all : main 0x7fff51a231fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdyld.dylib : start |
||
---|---|---|
builds | ||
docs | ||
dotnet | ||
external | ||
fsharp | ||
jenkins | ||
mk | ||
mono | ||
msbuild | ||
opentk | ||
runtime | ||
src | ||
tests | ||
tools | ||
.editorconfig | ||
.gitignore | ||
.gitmodules | ||
CODEOWNERS | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
Make.config | ||
Make.versions | ||
Makefile | ||
NOTICE.txt | ||
NuGet.config | ||
README.md | ||
SECURITY.MD | ||
Versions-ios.plist.in | ||
Versions-mac.plist.in | ||
Xamarin.Mac.sln | ||
Xamarin.iOS.sln | ||
banner.png | ||
configure | ||
mac-entitlements.plist | ||
product.snk | ||
system-dependencies.sh | ||
versions-check.csharp |
README.md
Xamarin.iOS & Xamarin.Mac
Welcome!
This module is the main repository for both Xamarin.iOS and Xamarin.Mac.
These SDKs allow us to create native iOS, tvOS, watchOS and macOS applications using the same UI controls we would in Objective-C and Xcode, except with the flexibility and elegance of a modern language (C#), the power of the .NET Base Class Library (BCL), and two first-class IDEs—Visual Studio for Mac and Visual Studio—at our fingertips.
This repository is where we do development for the Xamarin.iOS and Xamarin.Mac SDKs. There are a few ways that you can contribute, for example:
- Submit bugs and feature requests
- Review source code changes
- Submit pull requests to resolve issues and fix bugs
Contributing
If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:
- How to build and run from source
- The development workflow, including debugging and running tests
- Coding Guidelines
- Submitting pull requests
Downloads
The preferred method for installing Xamarin.iOS and Mac is to use the Visual Studio installers (Windows, Mac).
The team also strongly recommends using the latest Xamarin SDK and Xcode whenever possible.
However, we provide links to older Xamarin.iOS and Mac packages for macOS downgrades and build machine configuration.
Platform | Link |
---|---|
Xamarin.iOS d16.7 | 13.20.2.2 |
Xamarin.Mac d16.7 | 6.20.2.2 |
Xamarin.iOS d16.6 | 13.18.2.1 |
Xamarin.Mac d16.6 | 6.18.2.1 |
Xamarin.iOS d16.5 | 13.16.0.13 |
Xamarin.Mac d16.5 | 6.16.0.13 |
Xamarin.iOS d16.4 | 13.10.0.21 |
Xamarin.Mac d16.4 | 6.10.0.21 |
Xamarin.iOS d16.3 | 13.6.0.12 |
Xamarin.Mac d16.3 | 6.6.0.12 |
Xamarin.iOS d16.2 | 12.14.0.114 |
Xamarin.Mac d16.2 | 5.14.0.114 |
Xamarin.iOS d16.1 | 12.10.0.157 |
Xamarin.Mac d16.1 | 5.10.0.157 |
Xamarin.iOS d16.0 | 12.8.0.2 |
Xamarin.Mac d16.0 | 5.8.0.0 |
Feedback
- Ask a question on Stack Overflow or the Xamarin Forums
- Request a new feature on GitHub
- Vote on existing feature requests
- Submit bugs to GitHub Issues
- Discuss development and design on Discord
License
Copyright (c) .NET Foundation Contributors. All rights reserved. Licensed under the MIT License.