understanding on Xamarin/Mono sources and become able to ◦ track Xamarin issues, or ◦ understand how Xamarin frameworks work ◉ Xamarin got OSS-ed, but hard to read them ◉ I don't want to keep my knowledge on Xamarin things only to myself
applies to mono ◦ Apps on iOS, Android, Mac ◦ Windows - most unlikely, depends on code. ◉ Useful mono runtime options ◦ --debug to get line numbers. ◦ -O=-all to get precise line numbers ▪ disables optimizations ▪ should not matter, but it often does... • longstanding issue... JIT is difficult
WSL, cygwin) ◦ Windows binaries: cross build or cygwin ◉ git clone --recursive <URL>; ./autogen.sh; make; make install ◦ --disable-nls on cygwin ◉ incremental builds - be careful, it's been broken (a while) ◦ BK: run "make;make;make" to make sure to build(!?)
◉ basic - minimum build to build "build" profile ◉ monolite - downloadable binaries of "basic" equivalents ◉ build - the profile which is used to build everything ◉ net4_x - desktop profile ◉ xbuild_12, xbuild_14 - profile to run xbuild ◉ monotouch, monodroid - if you are building mobile basic: built by system (preinstalled) mono / build: built by basic
the list? They are per profile. corlib.dll.sources -> default net_4_x_corlib.dll.sources -> net_4_x often #include-d in those files > checked #if MONOTOUCH, #if MONODROID, #if MOBILE ? "I'm making changes but it does not get compiled!"
=> mcs/class/lib/xxx ◦ `make run-test` in the assembly dir for minimum tests. ◉ compiler (./mcs/mcs) ◦ see mcs/tests and mcs/errors (check expected errors) ◉ runtime (./mono) ◦ `make` in mono ◉ full tests: `make check` at top-level dir. ◦ (yet, jenkins build should run for each mono PRs) make changes, run tests, create a PR! cf. Inside Xamarin #3
try your local changes without installing. ◉ mobile builds: ./configure --with-monotouch, --with-monodroid, --with-xammac etc. ◉ Mono framework assemblies for mobiles can be copied to: ◦ $(installed_dir)/lib/xbuild-frameworks/{product}/v1.0 ▪ `Facades` subdir too.
Platform "SDK" = console dev. tools and Fx. ◦ xamarin-android, xamarin-macios and Xamarin.Forms depend on MSBuild system. ▪ like Android does on Gradle, Apple does no xcodebuild ◉ xbuild on Mono so far (`msbuild` in the future) ◉ XA, XiOS, XM and XF extend each set of MSBuild tasks.
=> built outputs: _ios-build and _mac-build Xamarin.iOS.sln, Xamarin.Mac.sln : framework src: iOS/watchOS/tvOS/macOS assemblies, and btouch etc. tools: packaging tools (mtouch, mmp) etc. runtime: libmonotouch, using external/(watch-)mono
not really editable...) ◉ src/Mono.Android (Mono.Android.dll) ◦ (kind of) standard binding project ◦ partly hand-written, API XML prebuilt and "api-merge"d ◦ lots of metadata fixup in .csv files ◉ external/Java.Interop/src/Java.Interop (Java.Interop.dll) ◦ JNIEnv and co. ◦ *may* work with desktop Java
projects ◉ tasks: GenerateResourceDesigner, LinkAssemblies, CompileToDalvik etc. ◉ remember: no debugging support (no Fast Deployment) ◉ Xamarin.Android.Bindings.targets for Java binding projects
then the action is executed immediately. If the current thread is not the UI thread, the action is posted to the event queue of the UI thread. Xamarin.Forms.Core/Device.cs Xamarin.Forms.Platform.Android/Forms.cs android-sdk-*/sources/android-24/android/app/Activity.java
(github) ◦ bugfixes ◦ implement a new feature ◉ bugzilla.xamarin.com ◦ github issues - second citizens ◉ components/bindings, Xam plugins, IDE addins ◉ other general stuff (blogs, writing apps, libs, meetups...)
guidelines rule ◦ Xamarin.Forms follows VS style ◦ Xamarin Studio has code formats for both ◉ Adding tests for better contribution ◦ We use NUnit almost everywhere ◦ NUnit is similar to MSTest / xunit