Skip to content

Commit dbcc5da

Browse files
authored
feat: upgrade example app to expo 54 + minor fixes (#27)
This PR : - upgrades expo in the example app from v51 to v54 - changes yarn version from 1.22 to 4.10.2 - fixes the SSL pinning of google.com in the example app - migrates links in the readme to apps.theodo.com Tested on iOS and Android: - SSL pinning (except webview which is not implemented) - hide app on background - safe keyboard detector
1 parent 95ad642 commit dbcc5da

9 files changed

Lines changed: 18057 additions & 13757 deletions

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ yarn-error.log
5555

5656
# Expo
5757
.expo/*
58+
59+
# yarn
60+
.yarn/*
61+
!.yarn/cache
62+
!.yarn/patches
63+
!.yarn/plugins
64+
!.yarn/releases
65+
!.yarn/sdks
66+
!.yarn/versions

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
> **⚠️ Disclaimer**<br/>
2222
> This package is intended to help implement a few basic security features but does not in itself guarantee that an app is secure.<br/>
2323
> Refer to [OWASP's resources](https://mas.owasp.org) for more information on mobile app security.<br/>
24-
> You can also [contact us](https://www.bam.tech/en/contact) if you need help with securing your app.
24+
> You can also [contact us](https://apps.theodo.com/en/contact) if you need help with securing your app.
2525
2626
# Installation and setup
2727

@@ -184,12 +184,14 @@ SafeKeyboardDetector.showInputMethodPicker(); // can only be called on Android
184184
```
185185

186186
## [EXPERIMENTAL - iOS only] Disable Default Caching in `Cache.db`
187-
> ⚠️ **DISCLAIMER:** This experimental feature may impact app behavior. Use it at your own risk. Disabling caching can cause unexpected issues.
188-
>
189-
> **Possible side effects:**
190-
> - Slower performance due to lack of cached responses
191-
> - Higher network usage from repeated requests
192-
> - Crashes in components expecting cached data
187+
188+
> ⚠️ **DISCLAIMER:** This experimental feature may impact app behavior. Use it at your own risk. Disabling caching can cause unexpected issues.
189+
>
190+
> **Possible side effects:**
191+
>
192+
> - Slower performance due to lack of cached responses
193+
> - Higher network usage from repeated requests
194+
> - Crashes in components expecting cached data
193195
> - Features failing in offline mode
194196
195197
> **🥷 Threat:** On iOS, every `NSURL` request may be cached by default in `Cache.db`, potentially storing sensitive data unless explicitly disabled. This can lead to unintentional data leaks.
@@ -202,15 +204,17 @@ Mitigating this threat is achieved by:
202204
```swift
203205
URLCache.shared = URLCache(memoryCapacity: 0, diskCapacity: 0, diskPath: nil)
204206
```
207+
205208
### Configuration
209+
206210
If you want to enable this functionality, it need to be enabled in the app configuration file (by default it's disabled)
207211

208212
```jsonc
209213
[
210214
"@bam.tech/react-native-app-security",
211215
{
212216
"disableCache": {
213-
"ios": { "enabled": true },
217+
"ios": { "enabled": true }
214218
}
215219
}
216220
]
@@ -224,6 +228,6 @@ When making a change to the `plugin` folder, you'll need to run `yarn prepare` b
224228

225229
# 👉 About BAM
226230

227-
We are a 100 people company developing and designing multi-platform applications with [React Native](https://www.bam.tech/expertise/react-native) using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:contact@bam.tech) or through our [contact form](https://www.bam.tech/en/contact)!
231+
We are a 100 people company developing and designing multi-platform applications with [React Native](https://apps.theodo.com/expertise/react-native) using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto:contact-apps@theodo.com) or through our [contact form](https://apps.theodo.com/en/contact)!
228232

229233
We will always answer you with pleasure 😁

example/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ yarn-error.*
3737
# Expo managed workflow
3838
/ios
3939
/android
40+
41+
# yarn
42+
.yarn/*
43+
!.yarn/cache
44+
!.yarn/patches
45+
!.yarn/plugins
46+
!.yarn/releases
47+
!.yarn/sdks
48+
!.yarn/versions

example/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const config: ExpoConfig = {
3737
],
3838
"google.com": [
3939
// One valid pin to test success
40-
"2MXZa6jBZjmb6FYPT3yf4oZFB67aQGmsX4DQgddQ7XA=",
40+
"84mRRa9Yj6rhmZjvR2x2Qx0Zc62GHteMSUWiR7dfoVk=",
4141
"ylrexmVB/d9PHCARU9i0R9km/ahwuNpWaWXbpLyR7jQ=",
4242
],
4343
},

example/package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@
88
"ios": "expo run:ios"
99
},
1010
"dependencies": {
11-
"expo": "^51.0.0",
12-
"expo-constants": "~16.0.2",
13-
"expo-linking": "~6.3.1",
14-
"expo-router": "~3.5.24",
15-
"expo-splash-screen": "~0.27.7",
16-
"expo-status-bar": "~1.12.1",
17-
"react": "18.2.0",
18-
"react-native": "0.74.5",
19-
"react-native-safe-area-context": "4.10.5",
20-
"react-native-screens": "3.31.1",
21-
"react-native-webview": "13.8.6"
11+
"@expo/metro-runtime": "~6.1.2",
12+
"expo": "^54",
13+
"expo-constants": "~18.0.9",
14+
"expo-linking": "~8.0.8",
15+
"expo-router": "~6.0.7",
16+
"expo-splash-screen": "~31.0.10",
17+
"expo-status-bar": "~3.0.8",
18+
"react": "19.1.0",
19+
"react-native": "0.81.4",
20+
"react-native-safe-area-context": "~5.6.0",
21+
"react-native-screens": "~4.16.0",
22+
"react-native-webview": "13.15.0"
2223
},
2324
"devDependencies": {
2425
"@babel/core": "^7.24.0",
25-
"@types/react": "~18.2.79",
26-
"typescript": "~5.3.3"
26+
"@types/react": "~19.1.10",
27+
"typescript": "~5.9.2"
2728
},
2829
"private": true,
2930
"expo": {

0 commit comments

Comments
 (0)