Browse Source

npx install-expo-modules

0.73.0
tony chen 2 years ago
parent
commit
456cdcbd78
  1. 3
      android/app/src/main/java/com/tarodemo/MainActivity.kt
  2. 13
      android/app/src/main/java/com/tarodemo/MainApplication.kt
  3. 3
      android/settings.gradle
  4. 9
      ios/Podfile
  5. 45
      ios/Podfile.lock
  6. 76
      ios/taroDemo.xcodeproj/project.pbxproj
  7. 3
      ios/taroDemo/AppDelegate.h
  8. 12661
      package-lock.json
  9. 3
      package.json

3
android/app/src/main/java/com/tarodemo/MainActivity.kt

@ -1,4 +1,5 @@
package com.tarodemo
import expo.modules.ReactActivityDelegateWrapper
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
@ -18,5 +19,5 @@ class MainActivity : ReactActivity() {
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))
}

13
android/app/src/main/java/com/tarodemo/MainApplication.kt

@ -1,4 +1,7 @@
package com.tarodemo
import android.content.res.Configuration
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
import android.app.Application
import com.facebook.react.PackageList
@ -15,7 +18,7 @@ import com.facebook.soloader.SoLoader
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
ReactNativeHostWrapper(this, object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> {
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
@ -28,7 +31,7 @@ class MainApplication : Application(), ReactApplication {
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
})
override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
@ -41,5 +44,11 @@ class MainApplication : Application(), ReactApplication {
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}

3
android/settings.gradle

@ -2,3 +2,6 @@ rootProject.name = 'taroDemo'
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()

9
ios/Podfile

@ -1,3 +1,4 @@
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(
@ -26,6 +27,14 @@ if linkage != nil
end
target 'taroDemo' 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!
use_react_native!(

45
ios/Podfile.lock

@ -2,6 +2,23 @@ PODS:
- boost (1.83.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- EXConstants (15.4.1):
- ExpoModulesCore
- EXFont (11.10.0):
- ExpoModulesCore
- Expo (50.0.0-preview.3):
- ExpoModulesCore
- ExpoFileSystem (16.0.1):
- ExpoModulesCore
- ExpoKeepAwake (12.8.0):
- ExpoModulesCore
- ExpoModulesCore (1.11.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- React-NativeModulesApple
- React-RCTAppDelegate
- ReactCommon/turbomodule/core
- FBLazyVector (0.73.0)
- FBReactNativeSpec (0.73.0):
- RCT-Folly (= 2022.05.16.00)
@ -1117,6 +1134,12 @@ PODS:
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- EXFont (from `../node_modules/expo-font/ios`)
- Expo (from `../node_modules/expo`)
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../node_modules/expo-modules-core`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.201.0)
@ -1210,6 +1233,18 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXConstants:
:path: "../node_modules/expo-constants/ios"
EXFont:
:path: "../node_modules/expo-font/ios"
Expo:
:path: "../node_modules/expo"
ExpoFileSystem:
:path: "../node_modules/expo-file-system/ios"
ExpoKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../node_modules/expo-modules-core"
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
@ -1308,6 +1343,12 @@ SPEC CHECKSUMS:
boost: 26fad476bfa736552bbfa698a06cc530475c1505
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
EXConstants: 86bbc9fedbb67770c0c6bb37f22f81970ef45dc8
EXFont: 9ae7e8e2e4825cef04a45dca74512a3f711e2fe9
Expo: c8d65cabac2c76a94dfeafd1e09679403625a0ad
ExpoFileSystem: ebbbe77366bff2e66876e3b3bf09e61d3bb72c70
ExpoKeepAwake: ed71bfe0e6ecd38e337586ba6e1ba27a56eb373b
ExpoModulesCore: 728e40eb26952d75a78979b317acb410a6403921
FBLazyVector: 39ba45baf4e398618f8b3a4bb6ba8fcdb7fc2133
FBReactNativeSpec: 20cfca68498e27879514790359289d1df2b52c56
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
@ -1367,6 +1408,6 @@ SPEC CHECKSUMS:
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 44003f970aa541b79dfdd59cf236fda41bd5890f
PODFILE CHECKSUM: 45994dfbf1336aa11064d9dd2601f73be0f59e06
PODFILE CHECKSUM: aae9b003dd9b1b6a43b43b86b19224808093aa47
COCOAPODS: 1.14.3
COCOAPODS: 1.14.2

76
ios/taroDemo.xcodeproj/project.pbxproj

@ -12,8 +12,10 @@
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
24D82A32560FD3E2AF1E1E31 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE555D11C0360597ADAC2C57 /* ExpoModulesProvider.swift */; };
7699B88040F8A987B510C191 /* libPods-taroDemo-taroDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-taroDemo-taroDemoTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
BB818C29E87010F1B78FC091 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68AA472D724BC849D1425A6 /* ExpoModulesProvider.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -43,7 +45,9 @@
5DCACB8F33CDC322A6C60F78 /* libPods-taroDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-taroDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = taroDemo/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-taroDemo-taroDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-taroDemo-taroDemoTests.release.xcconfig"; path = "Target Support Files/Pods-taroDemo-taroDemoTests/Pods-taroDemo-taroDemoTests.release.xcconfig"; sourceTree = "<group>"; };
DE555D11C0360597ADAC2C57 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-taroDemo/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
F68AA472D724BC849D1425A6 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-taroDemo-taroDemoTests/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -83,6 +87,15 @@
name = "Supporting Files";
sourceTree = "<group>";
};
11E7537EE43B145CF6DD6512 /* ExpoModulesProviders */ = {
isa = PBXGroup;
children = (
F6ADDA194376113F7A544B9E /* taroDemo */,
2D588BD5B41F25D0E207BE95 /* taroDemoTests */,
);
name = ExpoModulesProviders;
sourceTree = "<group>";
};
13B07FAE1A68108700A75B9A /* taroDemo */ = {
isa = PBXGroup;
children = (
@ -106,6 +119,14 @@
name = Frameworks;
sourceTree = "<group>";
};
2D588BD5B41F25D0E207BE95 /* taroDemoTests */ = {
isa = PBXGroup;
children = (
F68AA472D724BC849D1425A6 /* ExpoModulesProvider.swift */,
);
name = taroDemoTests;
sourceTree = "<group>";
};
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
@ -122,6 +143,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */,
11E7537EE43B145CF6DD6512 /* ExpoModulesProviders */,
);
indentWidth = 2;
sourceTree = "<group>";
@ -148,6 +170,14 @@
path = Pods;
sourceTree = "<group>";
};
F6ADDA194376113F7A544B9E /* taroDemo */ = {
isa = PBXGroup;
children = (
DE555D11C0360597ADAC2C57 /* ExpoModulesProvider.swift */,
);
name = taroDemo;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -156,6 +186,7 @@
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "taroDemoTests" */;
buildPhases = (
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
398A020A6EED227A98F9950B /* [Expo] Configure project */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
@ -177,6 +208,7 @@
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "taroDemo" */;
buildPhases = (
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
0793EA18E731A0138928EFEB /* [Expo] Configure project */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
@ -282,6 +314,44 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-taroDemo/Pods-taroDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
0793EA18E731A0138928EFEB /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[Expo] Configure project";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-taroDemo/expo-configure-project.sh\"\n";
};
398A020A6EED227A98F9950B /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[Expo] Configure project";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-taroDemo-taroDemoTests/expo-configure-project.sh\"\n";
};
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -385,6 +455,7 @@
buildActionMask = 2147483647;
files = (
00E356F31AD99517003FC87E /* taroDemoTests.m in Sources */,
BB818C29E87010F1B78FC091 /* ExpoModulesProvider.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -394,6 +465,7 @@
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
24D82A32560FD3E2AF1E1E31 /* ExpoModulesProvider.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -429,6 +501,7 @@
"-lc++",
"$(inherited)",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taroDemo.app/taroDemo";
@ -453,6 +526,7 @@
"-lc++",
"$(inherited)",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/taroDemo.app/taroDemo";
@ -478,6 +552,7 @@
"-ObjC",
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = taroDemo;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -504,6 +579,7 @@
"-ObjC",
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = taroDemo;
SWIFT_VERSION = 5.0;

3
ios/taroDemo/AppDelegate.h

@ -1,6 +1,7 @@
#import <RCTAppDelegate.h>
#import <Expo/Expo.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : RCTAppDelegate
@interface AppDelegate : EXAppDelegateWrapper
@end

12661
package-lock.json

File diff suppressed because it is too large

3
package.json

@ -11,7 +11,8 @@
},
"dependencies": {
"react": "18.2.0",
"react-native": "0.73.0"
"react-native": "0.73.0",
"expo": ">=50.0.0-0 <51.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",

Loading…
Cancel
Save