authgear / authgear-sdk-xamarin

Authgear authentication SDK for Xamarin applications
https://www.authgear.com/
Other
1 stars 9 forks source link

Add MAUI support #64

Closed roxk closed 1 year ago

roxk commented 1 year ago

Can compile now. Need to add maui sample app.

roxk commented 1 year ago

Was moving the sample code to shared project, then found the xaml files in maui contain maui specific reference, so cannot use the same xaml unless we do code-gen before build (replacing namespace, etc). To make it work first, will duplicate the sample code.

roxk commented 1 year ago
roxk commented 1 year ago

Note for MAUI doc: For android, would need to add the following to manifest to use custom tab to prevent NRE:

    <queries>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
    </queries>
roxk commented 1 year ago

Facing https://github.com/xamarin/xamarin-macios/issues/16223. Can't test right now unless downgrading to an older xamarin.iOS version (it assumes my machine uses xcode 14, which has a breaking change that xcode 13 doesn't understand). Will try the downgrade.

roxk commented 1 year ago

Installing old xamarin.ios for some reason doesn't work. VS for mac still pickup 16.x when I installed 14.x. Perhaps it's a preview thing. Tried to upgrade xcode, but that in turn requires me to upgrade the OS from 12.3 to 12.5. It's not possible to test iOS today.

roxk commented 1 year ago

Found the culprit. Seems net6 onwards (or VS for mac preview) is using Microsoft.iOS.Sdk. The usual /Library/Frameworks/Xamarin.iOS.Frameworks isn't used:

image

roxk commented 1 year ago

Using 6.0.3xx instead of 6.0.4xx the ios workload would use older version and thus could build the sample :tada: