FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.04k stars 441 forks source link

AppDelegate Inheritance #983

Closed gwashburne closed 5 months ago

gwashburne commented 5 months ago

Issue

Following the docs, I expect to update my AppDelegate to as follows: @interface AppDelegate : RCTAppDelegate <RNAppAuthAuthorizationFlowManager> However, because I am using some Expo modules in this app (I am NOT using a managed workflow, just some modules), the AppDelegate inherits from EXAppDelegateWrapper. Since you can't inherit from more than one class, I can't inherit from RCTAppDelegate. However, it appears to work if I don't inherit from RCTAppDelegate at all. Below is what my AppDelegate is now, and everything seems to be working: @interface AppDelegate : EXAppDelegateWrapper <RNAppAuthAuthorizationFlowManager>

My question is: is this ok? Or will this approach cause issues? If this is incorrect, what would the correct approach be?


Environment

lovegaoshi commented 5 months ago

EXAppDelegateWrapper extends RCTAppDelegate. this is perfectly fine.

gwashburne commented 5 months ago

Awesome, thank you!