Skip to content

Commit

Permalink
Merge pull request #14 from TaskRatchet/pre-initial-release-changes
Browse files Browse the repository at this point in the history
pre-initial release changes
  • Loading branch information
narthur authored Feb 6, 2024
2 parents 38e68a8 + 0091bc2 commit 0bc146d
Show file tree
Hide file tree
Showing 27 changed files with 568 additions and 1,148 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,8 @@ yarn-error.log

# testing
/coverage

# Expo
.expo
dist/
web-build/
5 changes: 5 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
//
// 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"
}

/**
Expand Down
5 changes: 3 additions & 2 deletions android/app/src/main/java/com/mobile/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.mobile;
import expo.modules.ReactActivityDelegateWrapper;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
Expand All @@ -23,10 +24,10 @@ protected String getMainComponentName() {
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new DefaultReactActivityDelegate(
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled());
DefaultNewArchitectureEntryPoint.getFabricEnabled()));
}
}
16 changes: 13 additions & 3 deletions android/app/src/main/java/com/mobile/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package com.mobile;
import android.content.res.Configuration;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;

import android.app.Application;
import com.facebook.react.PackageList;
Expand All @@ -13,7 +16,7 @@
public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost =
new DefaultReactNativeHost(this) {
new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
Expand All @@ -30,7 +33,7 @@ protected List<ReactPackage> getPackages() {

@Override
protected String getJSMainModuleName() {
return "index";
return ".expo/.virtual-metro-entry";
}

@Override
Expand All @@ -42,7 +45,7 @@ protected boolean isNewArchEnabled() {
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
});

@Override
public ReactNativeHost getReactNativeHost() {
Expand All @@ -58,5 +61,12 @@ public void onCreate() {
DefaultNewArchitectureEntryPoint.load();
}
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
ApplicationLifecycleDispatcher.onApplicationCreate(this);
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
}
}
3 changes: 3 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ rootProject.name = 'mobile'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
11 changes: 10 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
"projectId": "634f0123-3105-4f6d-91dc-57d2d4449007"
}
},
"version": "1.0.0",
"owner": "taskratchet",
"slug": "taskratchet-mobile"
"slug": "taskratchet-mobile",
"ios": {
"bundleIdentifier": "com.taskratchet.mobile",
"buildNumber": "1.0.0"
},
"android": {
"package": "com.taskratchet.mobile",
"versionCode": 1
}
}
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['babel-preset-expo'],
};
11 changes: 10 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip

platform :ios, min_ios_version_supported
platform :ios, '13.0'
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
Expand All @@ -26,6 +27,14 @@ if linkage != nil
end

target 'mobile' do
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
config = use_native_modules!

# Flags change depending on the env values.
Expand Down
137 changes: 135 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,83 @@ PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- EXApplication (5.3.1):
- ExpoModulesCore
- EXConstants (14.4.2):
- ExpoModulesCore
- EXFileSystem (15.4.5):
- ExpoModulesCore
- EXFont (11.4.0):
- ExpoModulesCore
- EXJSONUtils (0.7.1)
- EXManifests (0.7.2):
- ExpoModulesCore
- Expo (49.0.21):
- ExpoModulesCore
- expo-dev-client (2.4.12):
- EXManifests
- expo-dev-launcher
- expo-dev-menu
- expo-dev-menu-interface
- EXUpdatesInterface
- expo-dev-launcher (2.4.14):
- EXManifests
- expo-dev-launcher/Main (= 2.4.14)
- expo-dev-menu
- expo-dev-menu-interface
- ExpoModulesCore
- EXUpdatesInterface
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-RCTAppDelegate
- expo-dev-launcher/Main (2.4.14):
- EXManifests
- expo-dev-launcher/Unsafe
- expo-dev-menu
- expo-dev-menu-interface
- ExpoModulesCore
- EXUpdatesInterface
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-RCTAppDelegate
- expo-dev-launcher/Unsafe (2.4.14):
- EXManifests
- expo-dev-menu
- expo-dev-menu-interface
- ExpoModulesCore
- EXUpdatesInterface
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-RCTAppDelegate
- expo-dev-menu (3.2.2):
- expo-dev-menu/Main (= 3.2.2)
- RCT-Folly (= 2021.07.22.00)
- React-Core
- expo-dev-menu-interface (1.3.0)
- expo-dev-menu/Main (3.2.2):
- EXManifests
- expo-dev-menu-interface
- expo-dev-menu/Vendored
- ExpoModulesCore
- RCT-Folly (= 2021.07.22.00)
- React-Core
- expo-dev-menu/SafeAreaView (3.2.2):
- ExpoModulesCore
- RCT-Folly (= 2021.07.22.00)
- React-Core
- expo-dev-menu/Vendored (3.2.2):
- expo-dev-menu/SafeAreaView
- RCT-Folly (= 2021.07.22.00)
- React-Core
- ExpoKeepAwake (12.3.0):
- ExpoModulesCore
- ExpoModulesCore (1.5.12):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-NativeModulesApple
- React-RCTAppDelegate
- ReactCommon/turbomodule/core
- EXUpdatesInterface (0.10.1)
- FBLazyVector (0.72.7)
- FBReactNativeSpec (0.72.7):
- RCT-Folly (= 2021.07.22.00)
Expand Down Expand Up @@ -507,6 +584,20 @@ PODS:
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXApplication (from `../node_modules/expo-application/ios`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- EXFileSystem (from `../node_modules/expo-file-system/ios`)
- EXFont (from `../node_modules/expo-font/ios`)
- EXJSONUtils (from `../node_modules/expo-json-utils/ios`)
- EXManifests (from `../node_modules/expo-manifests/ios`)
- Expo (from `../node_modules/expo`)
- expo-dev-client (from `../node_modules/expo-dev-client/ios`)
- expo-dev-launcher (from `../node_modules/expo-dev-launcher`)
- expo-dev-menu (from `../node_modules/expo-dev-menu`)
- expo-dev-menu-interface (from `../node_modules/expo-dev-menu-interface/ios`)
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../node_modules/expo-modules-core`)
- EXUpdatesInterface (from `../node_modules/expo-updates-interface/ios`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.182.0)
Expand Down Expand Up @@ -597,6 +688,34 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXApplication:
:path: "../node_modules/expo-application/ios"
EXConstants:
:path: "../node_modules/expo-constants/ios"
EXFileSystem:
:path: "../node_modules/expo-file-system/ios"
EXFont:
:path: "../node_modules/expo-font/ios"
EXJSONUtils:
:path: "../node_modules/expo-json-utils/ios"
EXManifests:
:path: "../node_modules/expo-manifests/ios"
Expo:
:path: "../node_modules/expo"
expo-dev-client:
:path: "../node_modules/expo-dev-client/ios"
expo-dev-launcher:
:path: "../node_modules/expo-dev-launcher"
expo-dev-menu:
:path: "../node_modules/expo-dev-menu"
expo-dev-menu-interface:
:path: "../node_modules/expo-dev-menu-interface/ios"
ExpoKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../node_modules/expo-modules-core"
EXUpdatesInterface:
:path: "../node_modules/expo-updates-interface/ios"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
Expand Down Expand Up @@ -689,6 +808,20 @@ SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
EXApplication: 042aa2e3f05258a16962ea1a9914bf288db9c9a1
EXConstants: ce5bbea779da8031ac818c36bea41b10e14d04e1
EXFileSystem: f8b838a880254de42a5a7da20ed5ce12e2697c1b
EXFont: 738c44c390953ebcbab075a4848bfbef025fd9ee
EXJSONUtils: 6802be4282d42b97c51682468ddc1026a06f8276
EXManifests: cf66451b11b2c2f6464917528d792759f7fd6ce0
Expo: 61a8e1aa94311557c137c0a4dfd4fe78281cfbb4
expo-dev-client: 1e20e0d67534fd63da37604747a60e7d69fc46f5
expo-dev-launcher: e9411e0c91abaa448682d0fa688957e7dbff356e
expo-dev-menu: f7036f78c69f0f6ecb386f5543a06266dde64bf5
expo-dev-menu-interface: bda969497e73dadc2663c479e0fa726ca79a306e
ExpoKeepAwake: be4cbd52d9b177cde0fd66daa1913afa3161fc1d
ExpoModulesCore: c480fd4e3c7c8e81f0a6ba3a7c56869f25fe016d
EXUpdatesInterface: 82ed48d417cdcd376c12ca1c2ce390d35500bed6
FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597
FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671
Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818
Expand Down Expand Up @@ -746,6 +879,6 @@ SPEC CHECKSUMS:
Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: bd1de8000740624beecc88636f7c92c679382e67
PODFILE CHECKSUM: 7a07200b52c7e39da320a9cedb2217fc49e2347a

COCOAPODS: 1.14.3
COCOAPODS: 1.15.1
Loading

0 comments on commit 0bc146d

Please sign in to comment.