Skip to content

Commit d2552cb

Browse files
Update React Native login guide for AppDelegate setup in Swift and Objective-C++
1 parent a9d4fa6 commit d2552cb

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

articles/quickstart/native/react-native/00-login.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,29 @@ At runtime, the `applicationId` value will automatically update with your applic
8484
:::
8585

8686
### Configure iOS
87-
88-
In the file `ios/<YOUR PROJECT>/AppDelegate.mm` add the following:
87+
#### AppDelegate Setup (Choose Based on Architecture)
88+
89+
If You're Using (Swift - `ios/<YOUR PROJECT>/AppDelegat.swift`) update the following:
90+
91+
```swift
92+
93+
class AppDelegate: RCTAppDelegate {
94+
// ... your existing code ...
95+
// update bundleURL method -> add return
96+
override func bundleURL() -> URL? {
97+
#if DEBUG
98+
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
99+
#else
100+
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
101+
#endif
102+
}
103+
// add the below method
104+
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
105+
return Auth0.resumeAuth(url, options: options)
106+
}
107+
}
108+
```
109+
If You're Using (Objective-C++ - `ios/<YOUR PROJECT>/AppDelegate.mm`) add the following:
89110

90111
```objc
91112
#import <React/RCTLinkingManager.h>

0 commit comments

Comments
 (0)