Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
72523c6
feat: setup rnef for ios and android
adhorodyski Mar 21, 2025
0205a57
chore: disable remote cache by default
adhorodyski Mar 19, 2025
23721bf
chore: uninstall /tools as they are not not needed now
adhorodyski Mar 19, 2025
4406cb0
chore: prettier run
adhorodyski Mar 19, 2025
cf05573
chore: cleanup lockfiles
adhorodyski Mar 21, 2025
01029b6
docs: hybridApp docs cleanup after removing rn cli
adhorodyski Mar 21, 2025
55c560b
chore: fix package-lock
adhorodyski Mar 25, 2025
b6a243d
chore: update checksum in `Podfile.lock`
szymonrybczak Mar 26, 2025
5d927d2
chore: move the rn bundle script outside of the project declaration
adhorodyski Mar 26, 2025
1ae3146
chore: fix shell lint errors on the extracted script
adhorodyski Mar 26, 2025
1408f58
chore: fix shell lint warnings on the extracted script
adhorodyski Mar 26, 2025
9f5851b
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 27, 2025
ff72bff
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 28, 2025
98f2ec8
fix: permissions to exec the ios bundle script
adhorodyski Mar 28, 2025
83d6a81
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 31, 2025
1044f46
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 31, 2025
1f59c8d
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 31, 2025
cebcb95
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Mar 31, 2025
0b16a1c
fix: ios js bundling command
adhorodyski Apr 1, 2025
a183f5e
fix: prettier watch command to include mjs files
adhorodyski Apr 1, 2025
c273c4c
fix: android js bundling command
adhorodyski Apr 1, 2025
b566652
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Apr 1, 2025
b98f90b
chore: use bundler property for the metro plugin
adhorodyski Apr 1, 2025
568b024
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Apr 2, 2025
d93f2cd
fix: cli path location for android
adhorodyski Apr 2, 2025
c635827
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Apr 2, 2025
5788dee
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Apr 3, 2025
10ae87d
Merge branch 'Expensify:main' into feat/remote-builds
adhorodyski Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/verifyPodfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if ! SPEC_DIRS=$(yq '.["EXTERNAL SOURCES"].[].":path" | select( . == "*node_modu
fi

# Retrieve a list of podspec paths from react-native config
if ! read_lines_into_array PODSPEC_PATHS < <(npx react-native config | jq --raw-output '.dependencies[].platforms.ios.podspecPath | select ( . != null)'); then
if ! read_lines_into_array PODSPEC_PATHS < <(npx rnef config -p ios | jq --raw-output '.dependencies[].platforms.ios.podspecPath | select ( . != null)'); then
Comment thread
adhorodyski marked this conversation as resolved.
Outdated
error "Error: could not parse podspec paths from react-native config command"
cleanupAndExit 1
fi
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,6 @@ docs/.bundle

# Output of react compiler healthcheck dev script
react-compiler-output.txt

# React Native Enterprise Framework
.rnef/
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ react {
autolinkLibrariesWithApp()
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
cliFile = file("../../node_modules/@rnef/cli/dist/src/bin.js")
bundleCommand = "bundle"
}

project.ext.envConfigFiles = [
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand(['npx', 'rnef', 'config', '-p', 'android']) }
rootProject.name = 'NewExpensify'
include ':react-native-webview'
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
Expand Down
3 changes: 0 additions & 3 deletions contributingGuides/HYBRID_APP.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ If you'd like to build HybridApp in `release` configuration you need to adjust o
### How to see native logs in Android Studio?
The easiest way to see native logs is to use Logcat. In order to find it go to: `View` > `Tool windows` > `Logcat`
## iOS
### Error: `undefined method [] for nil`
It's an error that you may encounter while executing `npm run pod-install`. Unfortunately it's very generic, and indicates an error in some React Native CLI script. In order to debug it, you have to get deeper into JS script files of the `@react-native-community/cli` package. If you haven't changed anything in the `Podfile`, or haven't bumped `react-native` the best thing to do is to remove and reinstall `node_modules` and make sure all patches were applied correctly.

### Error: `"xcodebuild" exited with error code '65'`
This is a very common error that may appear during an iOS build, it's especially annoying when it appears after executing `npm run ios`, because it doesn't give any additional information that may be useful for debugging. In order to see the real error you need to open XCode and rerun the build from there. When the build fails, pick `Errors Only` in the main panel, and extend the error by pressing an icon with 4 parallel lines on the right hand side. On the very bottom you should see the real error.

Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios relative | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli')\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n";
shellScript = "bash -l -c \"${PROJECT_DIR}/bundle-react-native-code-and-images.sh\"\n";
};
0B960DEC1F581E1EB7F1342F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ target 'NewExpensify' do
'ReleaseProduction' => :release,
'Debug' => :debug

config = use_native_modules!
config = use_native_modules!(['npx', 'rnef', 'config', '-p', 'ios'])

# Flags change depending on the env values.
flags = get_default_flags()
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3478,6 +3478,6 @@ SPEC CHECKSUMS:
VisionCamera: c95a8ad535f527562be1fb05fb2fd324578e769c
Yoga: 1fd059161b449018342943b095a6d4e69bcaa719

PODFILE CHECKSUM: 5b2f0a75a0848d964701b52fb6ab7e9602040f3e
PODFILE CHECKSUM: e1af24debf4226877e7b4ae9da7137bd4361db9d

COCOAPODS: 1.15.2
32 changes: 32 additions & 0 deletions ios/bundle-react-native-code-and-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [[ -f "$PODS_ROOT/../.xcode.env" ]]; then
source "$PODS_ROOT/../.xcode.env"
fi
if [[ -f "$PODS_ROOT/../.xcode.env.local" ]]; then
source "$PODS_ROOT/../.xcode.env.local"
fi

# The project root by default is one level up from the ios directory
export PROJECT_ROOT="$PROJECT_DIR/.."

if [[ "$CONFIGURATION" = *Debug* ]]; then
export SKIP_BUNDLING=1
fi
if [[ -z "$ENTRY_FILE" ]]; then
# Set the entry JS file using the bundler's entry resolution.
ENTRY_FILE="$("$NODE_BINARY" -e "require('expo/scripts/resolveAppEntry')" "$PROJECT_ROOT" ios relative | tail -n 1)"
export ENTRY_FILE
fi

if [[ -z "$CLI_PATH" ]]; then
export CONFIG_CMD="dummy-workaround-value"
CLI_PATH="$("$NODE_BINARY" --print "require('path').dirname(require.resolve('@rnef/cli/package.json')) + '/dist/src/bin.js'")"
export CLI_PATH
fi
if [[ -z "$BUNDLE_COMMAND" ]]; then
# CLI command for bundling
export BUNDLE_COMMAND="bundle"
fi

"$NODE_BINARY" --print "require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'"
Loading