Skip to content

Flip macCatalyst check for #704#705

Merged
Jay-A-McBee merged 1 commit into
FormidableLabs:mainfrom
vincentjames501:fix/704
Feb 14, 2022
Merged

Flip macCatalyst check for #704#705
Jay-A-McBee merged 1 commit into
FormidableLabs:mainfrom
vincentjames501:fix/704

Conversation

@vincentjames501

Copy link
Copy Markdown
Contributor

Fixes #704

Description

See #704 for details

Steps to verify

It compiles now on Catalyst :)

@gispada

gispada commented Feb 7, 2022

Copy link
Copy Markdown
Contributor

Good catch, I actually didn't try to compile on Catalyst.

On second thought, it seems that for older SDKs TARGET_OS_MACCATALYST and TARGET_OS_IOS are separate, while more recently TARGET_OS_MACCATALYST is inside TARGET_OS_IOS.

Would it be safer to do something like this? Does it work for you?

#if (TARGET_OS_IOS && TARGET_OS_MACCATALYST) || TARGET_OS_MACCATALYST
    externalUserAgent = [[OIDExternalUserAgentCatalyst alloc] initWithPresentingViewController:presentingViewController];
#elif TARGET_OS_IOS
    externalUserAgent = [[OIDExternalUserAgentIOS alloc] initWithPresentingViewController:presentingViewController];
#elif TARGET_OS_OSX
    externalUserAgent = [[OIDExternalUserAgentMac alloc] init];
#endif

@Jay-A-McBee
Jay-A-McBee merged commit 51e4692 into FormidableLabs:main Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest release broken with macCatalyst

3 participants