<commit_before>
# Linker

    System.ExecutionEngineException: Attempting to JIT compile method 'System.Reactive.Linq.QueryLanguage:Switch (System.IObservable1<System.IObservable1>)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

    ghuntley [1:12 PM]
    When deploying on iOS 8.3, Unified API, physical hardware. Simulator works fine.

    ghuntley [1:12 PM]
    found this https://bugzilla.xamarin.com/show_bug.cgi?id=26060 and https://github.com/michaeldimoudis/RxFormsTest

    GitHub
    michaeldimoudis/RxFormsTest
    RxFormsTest

    ghuntley [1:13 PM]
    It seems that on iOS " enable generic value type sharing" on the advanced page must be toggled otherwise the application crashes immediately on startup when doing the  
    ```RxApp.SuspensionHost.SetupDefaultSuspendResume();```

    ghuntley [1:14 PM]
    Still not completely resolved, now got another exception - most likely my code but hopefully the above helps someone else out :simple_smile:

    ghuntley [1:23 PM] 
    @michaelstonis: what's your experience with
    ```enable generic value type sharing```
    - do you still your iOS apps with it? What linker settings do you use as well.

    ghuntley [1:24 PM]
    oh different michael sorry :simple_smile:

    michaelstonis [1:25 PM] 
    no worries

    michaelstonis [1:25 PM]
    FWIW, I always use generic type sharing

    ghuntley [1:25 PM] 
    It's not a default option w/ Right Click -> Add Project

    michaelstonis [1:29 PM] 
    yea, it will make your apps a lil' bit bigger, but the benefit is that you to use code that would have nuked out from JIT compilation

    michaelstonis [1:29 PM]
    it should be a default in newer releases

    michaelstonis [1:30 PM]
    it was a while back, but I think they flipped it to be a default in Xamarin.iOS 6 or 7

    ghuntley [1:48 PM] 
    FYI :simple_smile:

    paulcbetts [2:16 PM] 
    Check every experimental box

    paulcbetts [2:17 PM]
    You can often also get around this class of bugs by turning your value-typed Observable into a reference typed one

    paulcbetts [2:18 PM]
    I.e. don't use IObservable<int>, use IObservable<int?><commit_msg>Update xamarin-ios.md<commit_after>Title: Xamarin iOS
----

Your viewmodels should inherit from `ReactiveObject`

- https://reactiveui.net/api/reactiveui/reactiveobject/

Use `ISupportsActivation` and `WhenActivated` for lifecycle

- https://reactiveui.net/api/reactiveui/isupportsactivation/
- https://reactiveui.net/docs/handbook/when-activated/

Use your normal iOS concepts that you would usually use in iOS development, we have some base classes which you should use as they expose observables such as `Changed`, `Changing` and `Deactivated` that can be used for composition.

- https://reactiveui.net/api/reactiveui/reactivetableviewcontroller/
- https://reactiveui.net/api/reactiveui/reactivetableview/
- https://reactiveui.net/api/reactiveui/reactivecollectionview/
- https://reactiveui.net/api/reactiveui/reactivecollectionviewcontroller
- https://reactiveui.net/api/reactiveui/reactivenavigationcontroller
- https://reactiveui.net/api/reactiveui/reactivetabbarcontroller/
- https://reactiveui.net/api/reactiveui/reactivepageviewcontroller/

Keep references to your subscriptions

- https://reactiveui.net/docs/concepts/reactive-programming/subscriptions#lifecycle

Use disposables to manage lifetime, scope and resources:

- https://reactiveui.net/docs/concepts/reactive-programming/disposables
{'fraction_non_alphanumeric': 0.08262108262108261, 'fraction_numerical': 0.01680911680911681, 'mean_word_length': 3.9520451339915375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1681705', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1029, 'n_words': 351}