Skip to content

Commit e9a8e7b

Browse files
authored
1 parent a854f4b commit e9a8e7b

File tree

4 files changed

+1329
-1471
lines changed

4 files changed

+1329
-1471
lines changed

example/App.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ export default function App() {
1616
</View>
1717
</Modal>
1818
<Button title="open modal" onPress={() => setIsModalVisible(true)} />
19+
<Button title="fetch - no pin" onPress={fetchUnpinned} />
1920
<Button title="fetch - valid certificates" onPress={fetchValid} />
2021
<Button title="fetch - invalid certificates" onPress={fetchInvalid} />
2122
<Button
22-
title="fetch - invalid certificates - subdodmain"
23+
title="fetch - invalid certificates - subdomain"
2324
onPress={fetchInvalidSubdomain}
2425
/>
2526
<Button title="Is current keyboard safe?" onPress={checkIsKeyboardSafe} />
@@ -49,21 +50,33 @@ const styles = StyleSheet.create({
4950
},
5051
});
5152

53+
const fetchUnpinned = async () => {
54+
try {
55+
const response = await fetch("https://bing.com");
56+
console.warn("✅ fetch succeeded", {
57+
status: response.status,
58+
});
59+
} catch (error) {
60+
console.warn("❌ fetch failed", error);
61+
}
62+
};
63+
64+
5265
const fetchValid = async () => {
5366
try {
5467
const response = await fetch("https://google.com");
5568
console.warn("✅ valid certificate and fetch succeeded", {
5669
status: response.status,
5770
});
5871
} catch (error) {
59-
console.warn("❌ valid certificate but fetch failed", error);
72+
console.warn("❌ valid certificate but fetch failed - public keys expire, make sure they are up to date", error);
6073
}
6174
};
6275

6376
const fetchInvalid = async () => {
6477
try {
6578
const response = await fetch("https://yahoo.com");
66-
console.warn("❌ invalid certificated but fetch succeeded", {
79+
console.warn("❌ invalid certificate but fetch succeeded", {
6780
status: response.status,
6881
});
6982
} catch (error) {

example/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"rFjc3wG7lTZe43zeYTvPq8k4xdDEutCmIhI5dn4oCeE="
3636
],
3737
"google.com": [
38-
"We74o5ME3USRtL6+B2UhXnwY9FR91QPJMYDtUNk6tEc=",
38+
"2MXZa6jBZjmb6FYPT3yf4oZFB67aQGmsX4DQgddQ7XA=",
3939
"ylrexmVB/d9PHCARU9i0R9km/ahwuNpWaWXbpLyR7jQ="
4040
]
4141
},

example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
"ios": "expo run:ios"
99
},
1010
"dependencies": {
11-
"expo": "50.0.0-preview.7",
12-
"expo-splash-screen": "~0.26.1",
13-
"expo-status-bar": "~1.11.1",
11+
"expo": "^51.0.0",
12+
"expo-splash-screen": "~0.27.7",
13+
"expo-status-bar": "~1.12.1",
1414
"react": "18.2.0",
15-
"react-native": "0.73.1"
15+
"react-native": "0.74.5"
1616
},
1717
"devDependencies": {
18-
"@babel/core": "^7.20.0",
19-
"@types/react": "~18.2.45",
20-
"typescript": "^5.1.3"
18+
"@babel/core": "^7.24.0",
19+
"@types/react": "~18.2.79",
20+
"typescript": "~5.3.3"
2121
},
2222
"private": true,
2323
"expo": {

0 commit comments

Comments
 (0)