From d2552cb6711763fe1455afafba75b4d26823a705 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Fri, 11 Apr 2025 10:12:32 +0530 Subject: [PATCH 1/3] Update React Native login guide for AppDelegate setup in Swift and Objective-C++ --- .../native/react-native/00-login.md | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/articles/quickstart/native/react-native/00-login.md b/articles/quickstart/native/react-native/00-login.md index 325a8f6ff2..0e192b5b06 100644 --- a/articles/quickstart/native/react-native/00-login.md +++ b/articles/quickstart/native/react-native/00-login.md @@ -84,8 +84,29 @@ At runtime, the `applicationId` value will automatically update with your applic ::: ### Configure iOS - -In the file `ios//AppDelegate.mm` add the following: +#### AppDelegate Setup (Choose Based on Architecture) + +If You're Using (Swift - `ios//AppDelegat.swift`) update the following: + +```swift + +class AppDelegate: RCTAppDelegate { + // ... your existing code ... + // update bundleURL method -> add return + override func bundleURL() -> URL? { + #if DEBUG + return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") + #else + return Bundle.main.url(forResource: "main", withExtension: "jsbundle") + #endif + } + // add the below method + override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return Auth0.resumeAuth(url, options: options) + } +} +``` +If You're Using (Objective-C++ - `ios//AppDelegate.mm`) add the following: ```objc #import From 11f280e02064890eb858118af51ecc7871282fae Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Thu, 15 May 2025 14:12:44 +0530 Subject: [PATCH 2/3] Update iOS AppDelegate setup instructions for React Native integration --- .../native/react-native/00-login.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/articles/quickstart/native/react-native/00-login.md b/articles/quickstart/native/react-native/00-login.md index 0e192b5b06..bdd8952be5 100644 --- a/articles/quickstart/native/react-native/00-login.md +++ b/articles/quickstart/native/react-native/00-login.md @@ -86,24 +86,11 @@ At runtime, the `applicationId` value will automatically update with your applic ### Configure iOS #### AppDelegate Setup (Choose Based on Architecture) -If You're Using (Swift - `ios//AppDelegat.swift`) update the following: +If You're Using (Swift - `ios//AppDelegat.swift`) add the following in `AppDelegate` class: ```swift - -class AppDelegate: RCTAppDelegate { - // ... your existing code ... - // update bundleURL method -> add return - override func bundleURL() -> URL? { - #if DEBUG - return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") - #else - return Bundle.main.url(forResource: "main", withExtension: "jsbundle") - #endif - } - // add the below method - override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { - return Auth0.resumeAuth(url, options: options) - } +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + return RCTLinkingManager.application(app, open: url, options: options) } ``` If You're Using (Objective-C++ - `ios//AppDelegate.mm`) add the following: From d9ba1778af8de2ba69fd6b8c1ae84bec7ded0779 Mon Sep 17 00:00:00 2001 From: Subhankar Maiti Date: Thu, 15 May 2025 18:51:07 +0530 Subject: [PATCH 3/3] Fix capitalization and formatting in iOS AppDelegate setup instructions --- articles/quickstart/native/react-native/00-login.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/quickstart/native/react-native/00-login.md b/articles/quickstart/native/react-native/00-login.md index bdd8952be5..c8468d06d3 100644 --- a/articles/quickstart/native/react-native/00-login.md +++ b/articles/quickstart/native/react-native/00-login.md @@ -86,14 +86,14 @@ At runtime, the `applicationId` value will automatically update with your applic ### Configure iOS #### AppDelegate Setup (Choose Based on Architecture) -If You're Using (Swift - `ios//AppDelegat.swift`) add the following in `AppDelegate` class: +If you're using (Swift - `ios//AppDelegat.swift`) add the following in `AppDelegate` class: ```swift func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { return RCTLinkingManager.application(app, open: url, options: options) } ``` -If You're Using (Objective-C++ - `ios//AppDelegate.mm`) add the following: +If you're using (Objective-C++ - `ios//AppDelegate.mm`) add the following: ```objc #import