-
Notifications
You must be signed in to change notification settings - Fork 166
fix(ios): CoreLocation import + wrap TurboModule constants as callable functions #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zaferatli
merged 8 commits into
GantMan:master
from
hbabathe:fix/ios-corelocation-import
Apr 27, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8a3298b
fix(ios): add CoreLocation import for new architecture build
hbabathe d98f05e
chore: add ExampleExpo55 app for SDK 55 new-architecture testing
hbabathe 677bef8
fix(js): wrap TurboModule constants as callable functions
hbabathe 2ab5a0c
fix: restore android native source files
hbabathe 84b7e3e
chore: ignore .vscode/settings.json, clean bun.lock on example reinstall
hbabathe 7188036
fix(js): address Copilot review on TurboModule wrapper and example a11y
hbabathe d904841
chore(example): install jail-monkey from tgz in legacy ExampleProject
hbabathe 5c2681f
rename exmaple project to ExampleExpo
hbabathe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,3 +54,5 @@ buck-out/ | |
|
|
||
| # Bundle artifact | ||
| *.jsbundle | ||
|
|
||
| .vscode/settings.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| # Don't ship the example project | ||
| # Don't ship the example projects | ||
| ExampleProject/ | ||
| ExampleExpo/ | ||
|
|
||
| .github/ | ||
| .yarn/ | ||
| .yarnrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
|
||
| # dependencies | ||
| node_modules/ | ||
|
|
||
| # Expo | ||
| .expo/ | ||
| dist/ | ||
| web-build/ | ||
| expo-env.d.ts | ||
|
|
||
| # Native | ||
| .kotlin/ | ||
| *.orig.* | ||
| *.jks | ||
| *.p8 | ||
| *.p12 | ||
| *.key | ||
| *.mobileprovision | ||
|
|
||
| # Metro | ||
| .metro-health-check* | ||
|
|
||
| # debug | ||
| npm-debug.* | ||
| yarn-debug.* | ||
| yarn-error.* | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # local env files | ||
| .env*.local | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
|
|
||
| # generated native folders | ||
| /ios | ||
| /android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| import { useEffect, useState } from 'react'; | ||
| import { StyleSheet, Text, View } from 'react-native'; | ||
| import { SafeAreaView } from 'react-native-safe-area-context'; | ||
| import { StatusBar } from 'expo-status-bar'; | ||
| import JailMonkey from 'jail-monkey'; | ||
|
|
||
| export default function App() { | ||
| const [isDevelopmentSettingsMode, setIsDevelopmentSettingsMode] = useState< | ||
| boolean | undefined | ||
| >(); | ||
| const [isDebuggedMode, setIsDebuggedMode] = useState<boolean | undefined>(); | ||
|
|
||
| useEffect(() => { | ||
| JailMonkey.isDevelopmentSettingsMode() | ||
| .then(setIsDevelopmentSettingsMode) | ||
| .catch(console.warn); | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| JailMonkey.isDebuggedMode().then(setIsDebuggedMode).catch(console.warn); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <SafeAreaView style={styles.root}> | ||
| <StatusBar style="auto" /> | ||
| <View style={styles.content}> | ||
| <Text style={styles.title}>Expo SDK 55 (New Architecture)</Text> | ||
| <Text style={styles.subtitle}>jail-monkey from ../ (local)</Text> | ||
|
|
||
| <Text style={styles.section}>Android & iOS</Text> | ||
| <Row label="isJailBroken" value={JailMonkey.isJailBroken()} /> | ||
| <Row label="canMockLocation" value={JailMonkey.canMockLocation()} /> | ||
| <Row label="trustFall" value={JailMonkey.trustFall()} /> | ||
| <Row label="isDebuggedMode" value={isDebuggedMode} /> | ||
|
|
||
| <Text style={styles.section}>Android</Text> | ||
| <Text style={styles.note}> | ||
| These APIs will always return false on iOS. | ||
| </Text> | ||
| <Row label="hookDetected" value={JailMonkey.hookDetected()} /> | ||
| <Row | ||
| label="isOnExternalStorage" | ||
| value={JailMonkey.isOnExternalStorage()} | ||
| /> | ||
| <Row label="AdbEnabled" value={JailMonkey.AdbEnabled()} /> | ||
| <Row | ||
| label="isDevelopmentSettingsMode" | ||
| value={isDevelopmentSettingsMode} | ||
| /> | ||
| </View> | ||
| </SafeAreaView> | ||
| ); | ||
| } | ||
|
|
||
| function Row({ | ||
| label, | ||
| value, | ||
| }: { | ||
| label: string; | ||
| value: string | boolean | undefined; | ||
| }) { | ||
| return ( | ||
| <View | ||
| style={styles.row} | ||
| accessibilityLabel={`${label}: ${value?.toString() ?? 'unknown'}`}> | ||
| <Text style={styles.label}>{label}:</Text> | ||
| <Text style={styles.value}>{value?.toString() ?? 'unknown'}</Text> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| root: { | ||
| flex: 1, | ||
| backgroundColor: '#fff', | ||
| }, | ||
| content: { | ||
| padding: 20, | ||
| }, | ||
| title: { | ||
| fontSize: 22, | ||
| color: '#000', | ||
| fontWeight: '700', | ||
| marginBottom: 4, | ||
| }, | ||
| subtitle: { | ||
| fontSize: 13, | ||
| color: '#666', | ||
| marginBottom: 16, | ||
| }, | ||
| section: { | ||
| fontSize: 20, | ||
| color: '#000', | ||
| fontWeight: '700', | ||
| marginTop: 16, | ||
| marginBottom: 5, | ||
| }, | ||
| note: { | ||
| fontSize: 11, | ||
| color: '#888', | ||
| marginBottom: 10, | ||
| }, | ||
| row: { | ||
| flexDirection: 'row', | ||
| marginBottom: 5, | ||
| }, | ||
| label: { | ||
| fontSize: 16, | ||
| color: '#444', | ||
| fontWeight: '700', | ||
| marginRight: 5, | ||
| }, | ||
| value: { | ||
| fontSize: 16, | ||
| color: '#444', | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "expo": { | ||
| "name": "ExampleExpo", | ||
| "slug": "ExampleExpo", | ||
| "version": "1.0.0", | ||
| "scheme": "exampleexpo", | ||
| "orientation": "portrait", | ||
| "icon": "./assets/icon.png", | ||
| "userInterfaceStyle": "light", | ||
| "splash": { | ||
| "image": "./assets/splash-icon.png", | ||
| "resizeMode": "contain", | ||
| "backgroundColor": "#ffffff" | ||
| }, | ||
| "ios": { | ||
| "supportsTablet": true, | ||
| "bundleIdentifier": "com.jailmonkey.exampleexpo" | ||
| }, | ||
| "android": { | ||
| "adaptiveIcon": { | ||
| "foregroundImage": "./assets/adaptive-icon.png", | ||
| "backgroundColor": "#ffffff" | ||
| }, | ||
| "package": "com.jailmonkey.exampleexpo" | ||
| }, | ||
| "web": { | ||
| "favicon": "./assets/favicon.png" | ||
| } | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { registerRootComponent } from 'expo'; | ||
| import { SafeAreaProvider } from 'react-native-safe-area-context'; | ||
|
|
||
| import App from './App'; | ||
|
|
||
| function Root() { | ||
| return ( | ||
| <SafeAreaProvider> | ||
| <App /> | ||
| </SafeAreaProvider> | ||
| ); | ||
| } | ||
|
|
||
| registerRootComponent(Root); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "example-expo", | ||
| "version": "1.0.0", | ||
| "main": "index.tsx", | ||
| "private": true, | ||
| "scripts": { | ||
| "start": "expo start --dev-client", | ||
| "android": "expo run:android", | ||
| "ios": "expo run:ios", | ||
| "web": "expo start --web", | ||
| "prebuild": "expo prebuild", | ||
| "prebuild:clean": "expo prebuild --platform all --clean" | ||
| }, | ||
| "dependencies": { | ||
| "expo": "~55.0.0", | ||
| "expo-dev-client": "~55.0.19", | ||
| "expo-status-bar": "~55.0.4", | ||
| "expo-system-ui": "~55.0.11", | ||
| "jail-monkey": "../", | ||
| "react": "19.2.0", | ||
| "react-native": "0.83.6", | ||
| "react-native-safe-area-context": "~5.6.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/react": "~19.2.10", | ||
| "typescript": "~5.9.2" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "extends": "expo/tsconfig.base", | ||
| "compilerOptions": { | ||
| "strict": true | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon we'd like to rename this directory to
ExampleExpo-- we'll likely want to update the SDK version here over time without creating a new exmaple project with every major SDK.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!