Bridges the worlds of .NET with the native APIs of macOS, iOS, tvOS, and watchOS.
Перейти к файлу
Rolf Bjarne Kvinge a4dffa6a78 [runtime] Disable the GC pump for Xamarin.Mac. (#52)
It seems it prevents the app from exiting; Mono will wait
for the GC pump thread to exit, which never happens.

The GC pump was never enabled for Xamarin.Mac apps
until recently (d9677714a), so this will just revert
to the previous behavior.

    thread 1: tid = 0x2ab2bf5, 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_50f', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      frame 0: 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10
      frame 1: 0x00007fff89015150 libsystem_pthread.dylib`_pthread_cond_wait + 767
      frame 2: 0x000000010ceb1283 MobileTestApp`_wapi_handle_timedwait_signal_handle [inlined] mono_os_cond_wait(cond=<unavailable>, mutex=<unavailable>) + 8 at mono-os-mutex.h:107 [opt]
      frame 3: 0x000000010ceb127b MobileTestApp`_wapi_handle_timedwait_signal_handle [inlined] mono_os_cond_timedwait(cond=<unavailable>, mutex=0x00007fb085016210, timeout_ms=<unavailable>) at mono-os-mutex.h:122 [opt]
      frame 4: 0x000000010ceb127b MobileTestApp`_wapi_handle_timedwait_signal_handle(handle=0x0000000000000400, timeout=<unavailable>, alertable=1, poll=0, alerted=0x00007fff52fb4984) + 1003 at handles.c:1555 [opt]
      frame 5: 0x000000010cec3d87 MobileTestApp`wapi_WaitForMultipleObjectsEx(numobjects=2, handles=<unavailable>, waitall=0, timeout=4294967295, alertable=<unavailable>) + 1527 at wait.c:615 [opt]
      frame 6: 0x000000010ce692b6 MobileTestApp`mono_thread_manage + 57 at threads.c:2956 [opt]
      frame 7: 0x000000010ce6927d MobileTestApp`mono_thread_manage + 301 at threads.c:3162 [opt]
      frame 8: 0x000000010ccbb533 MobileTestApp`mono_main(argc=<unavailable>, argv=<unavailable>) + 7987 at driver.g.c:2181 [opt]
      frame 9: 0x000000010cc61c67 MobileTestApp`main(argc=1, argv=0x00007fff52fb5268) + 775 at launcher.m:562
      frame 10: 0x000000010cc63150 MobileTestApp`start + 52

    thread 2: tid = 0x2ab2bf7, 0x00007fff97816ff6 libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
      frame 0: 0x00007fff97816ff6 libsystem_kernel.dylib`kevent_qos + 10
      frame 1: 0x00007fff88f18099 libdispatch.dylib`_dispatch_mgr_invoke + 216
      frame 2: 0x00007fff88f17d01 libdispatch.dylib`_dispatch_mgr_thread + 52

    thread 3: tid = 0x2ab2bfa, 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
      frame 0: 0x00007fff97815eb2 libsystem_kernel.dylib`__psynch_cvwait + 10
      frame 1: 0x00007fff89015150 libsystem_pthread.dylib`_pthread_cond_wait + 767
      frame 2: 0x000000010ceab31c MobileTestApp`thread_func [inlined] mono_os_cond_wait(mutex=0x000000010d02e190) + 15 at mono-os-mutex.h:107 [opt]
      frame 3: 0x000000010ceab30d MobileTestApp`thread_func(thread_data=0x0000000000000000) + 333 at sgen-thread-pool.c:110 [opt]
      frame 4: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 5: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 6: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13

    thread 4: tid = 0x2ab2bfb, 0x00007fff978103c2 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
      frame 0: 0x00007fff978103c2 libsystem_kernel.dylib`semaphore_wait_trap + 10
      frame 1: 0x000000010cdb847b MobileTestApp`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) + 11 at mono-os-semaphore.h:72 [opt]
      frame 2: 0x000000010cdb8470 MobileTestApp`finalizer_thread + 11 at mono-coop-semaphore.h:40 [opt]
      frame 3: 0x000000010cdb8465 MobileTestApp`finalizer_thread(unused=<unavailable>) + 181 at gc.c:770 [opt]
      frame 4: 0x000000010ce6bb05 MobileTestApp`start_wrapper [inlined] start_wrapper_internal + 548 at threads.c:738 [opt]
      frame 5: 0x000000010ce6b8e1 MobileTestApp`start_wrapper(data=<unavailable>) + 49 at threads.c:785 [opt]
      frame 6: 0x000000010ced50f6 MobileTestApp`inner_start_thread(arg=<unavailable>) + 406 at mono-threads-posix.c:92 [opt]
      frame 7: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 8: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 9: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13

    thread 5: tid = 0x2ab2c07, 0x00007fff97816206 libsystem_kernel.dylib`__semwait_signal + 10, name = 'tid_320b'
      frame 0: 0x00007fff97816206 libsystem_kernel.dylib`__semwait_signal + 10
      frame 1: 0x00007fff82df1d17 libsystem_c.dylib`nanosleep + 199
      frame 2: 0x00007fff82df1c0a libsystem_c.dylib`usleep + 54
      frame 3: 0x000000010cc5bc60 MobileTestApp`pump_gc(context=0x0000000000000000) + 64 at runtime.m:904
      frame 4: 0x00007fff89014c13 libsystem_pthread.dylib`_pthread_body + 131
      frame 5: 0x00007fff89014b90 libsystem_pthread.dylib`_pthread_start + 168
      frame 6: 0x00007fff89012375 libsystem_pthread.dylib`thread_start + 13
2016-05-16 08:12:49 -04:00
builds [builds] Compile watchos runtime with bitcode flags. 2016-05-09 21:03:32 -04:00
external Move guiunit to public repo so it can be used for XM unit tests 2016-05-04 15:12:18 -04:00
fsharp Build F#. 2016-04-24 14:47:24 -04:00
mk [mtouch] Fix --sdkroot not to report a default to /Developer/. Fixes part of #41083 2016-05-14 11:11:40 -04:00
mono/4.5 Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
msbuild [msbuild] Don't treat unsupported iCloud entitlements as errors in the build (#46) 2016-05-13 11:19:49 +02:00
opentk Build the platform assemblies. 2016-04-24 14:47:26 -04:00
runtime [runtime] Disable the GC pump for Xamarin.Mac. (#52) 2016-05-16 08:12:49 -04:00
src [Fix] Fix bug 24078 by adding the required attrs to generate the events. 2016-05-14 12:47:46 +02:00
tests Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
tools [mtouch] Fix --sdkroot not to report a default to /Developer/. Fixes part of #41083 2016-05-14 11:11:40 -04:00
.gitignore Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
.gitmodules Use relative URLs for submodules 2016-05-06 22:03:46 -04:00
LICENSE Adjust license to match requested format 2016-04-25 16:38:57 -04:00
Make.config Bump to mono 4.4 to get a 64-bit capable mono. (#39) 2016-05-11 10:14:52 -04:00
Makefile Add an optional dependency on xamarin-specific build logic. 2016-04-24 14:48:45 -04:00
README.md Update README.md (#54) 2016-05-16 13:47:28 +02:00
Xamarin.Mac.sln Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
Xamarin.iOS.sln Move parts of dontlink tests into new introspection tests (#32) 2016-05-04 20:14:32 -04:00
configure Store configure configuration in configure.inc. 2016-04-26 12:39:21 -04:00
product.snk Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00
system-dependencies.sh Bump to mono 4.4 to get a 64-bit capable mono. (#39) 2016-05-11 10:14:52 -04:00

README.md

Xamarin.iOS & Xamarin.Mac

This module is the main repository for both Xamarin.iOS and Xamarin.Mac.

These frameworks allow us to create native iOS, tvOS, watchOS and Mac 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—Xamarin Studio and Visual Studio—at our fingertips.

Build requirements

  • Autoconf, automake and libtool.

    You can use brew, or this script to get it directly from gnu.org (you'll have to edit your PATH to include /opt/bin if you use the script)

    To install brew and all the tool dependencies:

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    $ brew update
    $ brew install libtool autoconf automake bison flex
    
  • Xcode

    To build the Xamarin.iOS and Xamarin.Mac SDKs you need a certain version of Xcode. The build will tell you exactly which version you need.

    You can download the Xcode version you need from Apple's Developer Center (requires an Apple Developer account).

    To ease development with different versions of the SDK that require different versions of Xcode, we require Xcode to be in a non-standard location (based on the Xcode version).

    For example Xcode 7.0 must be installed in /Applications/Xcode7.app.

    The recommended procedure is to download the corresponding Xcode dmg from Apple's Developer Center, extract Xcode.app to your system, and rename it before launching it the first time. Renaming Xcode.app after having launched it once may confuse Xcode, and strange errors start occuring.

  • Mono MDK.

    The build will tell you if you need to update, and where to get it.

  • Xamarin Studio.

    The build will tell you if you need to update, and where to get it.

  • You can also provision some of the dependencies with an included script:

      $ ./system-dependencies.sh --provision-[xcode|xamarin-studio|mono|all]
    

## Quick build & install ##

Follow the following steps to build and install Xamarin.iOS and Xamarin.Mac:

  1. Clone this repository and its submodules

     $ git clone --recursive git@github.com:xamarin/xamarin-macios.git
     $ cd xamarin-macios
    
  2. Fetch dependencies and build everything

     $ make world
    
  3. Make sure permissions are OK to install into system directories (this will ask for your password)

     $ make fix-install-permissions
    
  4. Install into the system

     $ make install-system
    

Configure

There is a configure script that can optionally be used to configure the build. By default, everything required for both Xamarin.iOS and Xamarin.Mac will be built.

  • --disable-mac: Disable Mac-related parts.

  • --disable-ios: Disable iOS-related parts.

    In both cases the resulting build will contain both iOS and Mac bits because:

    • Parts of the iOS build depends on Mac parts (in particular mtouch uses Xamarin.Mac).

    • The class libraries builds can not be disabled because a very common error is to end up with code that only works/builds in either iOS or Mac.

  • --enable-ccache: Enables cached builds with ccache (default if ccache is found in the path).

  • --disable-ccache: Disables cached builds with ccache, even if it is present.

  • --disable-strip: If executables should be stripped or not. This makes it easier to debug native executables using lldb.

  • --help: Show the help.

Contributing

Mailing Lists

To discuss this project, and participate in the design, we use the macios-devel@lists.xamarin.com mailing list.

Coding Guidelines

We use Mono's Coding Guidelines.

Reporting Bugs

We use Bugzilla to track issues.