You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* FR-24939.
Added SPM support.
* chore(ios): bump FronteggSwift SPM pin 1.3.8 -> 1.3.10 (latest)
Avoid regressing the iOS SDK: master is on FronteggSwift 1.3.10 (admin-portal
native bridge). Pin the SPM migration to 1.3.10 across Package.swift,
frontegg_spm.rb, the example Package.resolved + pbxproj SPM ref, and docs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: dianaKhortiuk-frontegg <diana.khortiuk@frontegg.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/setup.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,85 @@ This section guides you through configuring the Frontegg React Native SDK for bo
4
4
5
5
## Setup iOS Project
6
6
7
+
### Integrate FronteggSwift via Swift Package Manager
8
+
9
+
The iOS native SDK (`FronteggSwift`) is delivered through **Swift Package Manager (SPM)** only. The CocoaPods pod `FronteggSwift` is **not** used (previously pinned at `1.2.76`). React Native still uses CocoaPods for `FronteggRN` and other dependencies; `FronteggSwift` is linked into the `FronteggRN` pod target via SPM after `pod install`.
Adjust the `require_relative` path if your `node_modules` layout differs (monorepo, etc.).
42
+
43
+
#### 2. Install pods
44
+
45
+
From the `ios` directory:
46
+
47
+
```bash
48
+
cd ios
49
+
bundle exec pod install # recommended if you use a Gemfile
50
+
```
51
+
52
+
**React Native 0.72:** if `pod install` fails downloading `boost`, add the boost URL workaround at the top of your `Podfile` (see the [example `ios/Podfile`](https://github.com/frontegg/frontegg-react-native/blob/master/example/ios/Podfile)).
53
+
54
+
#### 3. Build and run
55
+
56
+
- Open **`YourApp.xcworkspace`** (not `.xcodeproj`).
57
+
- For local development on a **simulator**, prefer:
58
+
59
+
```bash
60
+
cd ..
61
+
yarn start # Metro — one terminal
62
+
yarn ios --simulator "iPhone 17 Pro Max"
63
+
```
64
+
65
+
If a physical iPhone is connected, React Native may target the device and fail on code signing (`com.your.bundle`). Use `--simulator` or disconnect the device.
66
+
67
+
The `frontegg_spm` helper pins **FronteggSwift 1.3.10** from `https://github.com/frontegg/frontegg-ios-swift.git`, links it to the **FronteggRN** CocoaPods target, and configures the app Xcode project so SPM resolves without duplicate symbol errors at link time.
68
+
69
+
> **Embedded mode step-up:**`FronteggSwift`**1.3.10** routes `stepUp()` through the embedded `WKWebView` when `embeddedMode` is enabled (instead of `ASWebAuthenticationSession`), so MFA/step-up reuses the existing web session. Set `<key>embeddedMode</key><true/>` in `Frontegg.plist` if you use the embedded login box.
See the [example `HomeScreen`](https://github.com/frontegg/frontegg-react-native/blob/master/example/src/HomeScreen.tsx) for a **Sensitive action** button matching the native iOS SDK demo.
85
+
7
86
### Create Frontegg.plist
8
87
9
88
1. Add a new file named `Frontegg.plist` to your root project directory.
Copy file name to clipboardExpand all lines: example/README.md
+14-56Lines changed: 14 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,74 +1,32 @@
1
-
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
1
+
# Frontegg React Native — example app
2
2
3
-
#Getting Started
3
+
## Prerequisites
4
4
5
-
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
- Configure `ios/Frontegg.plist` with your Frontegg `baseUrl` and `clientId` (see [Setup Guide](../docs/setup.md))
6
7
7
-
## Step 1: Start the Metro Server
8
+
## iOS (SPM + CocoaPods)
8
9
9
-
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
10
-
11
-
To start Metro, run the following command from the _root_ of your React Native project:
10
+
From the **example** directory:
12
11
13
12
```bash
14
-
# using npm
15
-
npm start
16
-
17
-
# OR using Yarn
18
-
yarn start
13
+
yarn install
14
+
cd ios && bundle exec pod install &&cd ..
15
+
yarn start # terminal 1
16
+
yarn ios --simulator "iPhone 17 Pro Max"# terminal 2 — use an available simulator name
19
17
```
20
18
21
-
## Step 2: Start your Application
19
+
Open `ios/ReactNativeExample.xcworkspace` in Xcode if you build from the IDE.
22
20
23
-
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
21
+
> Use `--simulator` when a physical iPhone is connected, otherwise `yarn ios` may try to deploy to the device and fail on provisioning.
24
22
25
-
### For Android
23
+
## Android
26
24
27
25
```bash
28
-
# using npm
29
-
npm run android
30
-
31
-
# OR using Yarn
32
26
yarn android
33
27
```
34
28
35
-
### For iOS
36
-
37
-
```bash
38
-
# using npm
39
-
npm run ios
40
-
41
-
# OR using Yarn
42
-
yarn ios
43
-
```
44
-
45
-
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
46
-
47
-
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
48
-
49
-
## Step 3: Modifying your App
50
-
51
-
Now that you have successfully run the app, let's modify it.
52
-
53
-
1. Open `App.tsx` in your text editor of choice and edit some lines.
54
-
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
55
-
56
-
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
57
-
58
-
## Congratulations! :tada:
59
-
60
-
You've successfully run and modified your React Native App. :partying_face:
61
-
62
-
### Now what?
63
-
64
-
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65
-
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66
-
67
-
# Troubleshooting
68
-
69
-
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70
-
71
-
# Learn More
29
+
## More
72
30
73
31
To learn more about React Native, take a look at the following resources:
0 commit comments