diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index c263b57f966..00000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,61 +0,0 @@ -steps: - - block: ":rocket: Release!" - prompt: "Fill out the details for release" - if: 'build.message =~ /^release\$/i' - fields: - - text: "VERSION" - key: "version" - - text: "NPM_TAG" - key: "npm-tag" - default: 'null' - required: false - - text: "BUILD_DOCUMENTATION_VERSION" - key: "build-documentation-version" - default: 'null' - hint: 'Leave NULL if no version is specified' - - text: "REMOVE_DOCUMENTATION_VERSION" - key: "remove-documentation-version" - default: 'null' - hint: 'Leave NULL if no version is specified' - - - label: ":android: Android" - command: - - "nvm install" - - "npm install" - - "npm run test-js" - - "npm run test-unit-android -- --release" - - "npm run test-e2e-android-multi -- --release --headless --verbose --ci" - key: "android_build" - timeout_in_minutes: 90 - artifact_paths: "/Users/builder/work/artifacts/**/*" - - - label: ":ios: iOS - Unit" - command: - - "nvm install" - - "npm install" - - "npm run test-unit-ios -- --release" - key: "ios_unit" - timeout_in_minutes: 90 - - - label: ":ios: iOS - E2E" - command: - - "nvm install" - - "npm install" - - "npm run test-snapshot-ios -- --release" - - "npm run test-e2e-ios -- --release --multi --ci" - key: "ios_e2e" - timeout_in_minutes: 90 - artifact_paths: "/Users/builder/work/artifacts/**/*" - - - label: ":package: Publish" - env: - if: "build.pull_request.id == null" - command: - - "nvm install" - - "npm install" - - "npm run release" - depends_on: - - "android_build" - - "ios_unit" - - "ios_e2e" - timeout_in_minutes: 90 diff --git a/ReactNativeNavigation.podspec b/ReactNativeNavigation.podspec index 6778a6ebab2..d52e2e7b735 100644 --- a/ReactNativeNavigation.podspec +++ b/ReactNativeNavigation.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.module_name = 'ReactNativeNavigation' s.default_subspec = 'Core' - + s.subspec 'Core' do |ss| s.source = { :git => "https://github.com/wix/react-native-navigation.git", :tag => "#{s.version}" } s.source_files = 'lib/ios/**/*.{h,m,mm,cpp}' @@ -24,12 +24,17 @@ Pod::Spec.new do |s| end if fabric_enabled + install_modules_dependencies(s) + folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' fabric_flags = fabric_enabled ? '-DRCT_NEW_ARCH_ENABLED' : '' + s.pod_target_xcconfig = { - 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly" "$(PODS_ROOT)/Headers/Private/React-Core"', + 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly" "$(PODS_ROOT)/Headers/Private/React-Core" "$(PODS_ROOT)/Headers/Private/Yoga"', "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", + "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", } + s.compiler_flags = folly_compiler_flags + ' ' + '-DRCT_NEW_ARCH_ENABLED' s.requires_arc = true @@ -45,6 +50,7 @@ Pod::Spec.new do |s| s.dependency "React-runtimeexecutor" s.dependency "React-rncore" end + s.dependency 'React-Core' s.dependency 'React-CoreModules' s.dependency 'React-RCTImage' diff --git a/lib/android/app/build.gradle b/lib/android/app/build.gradle index 9d5a0fd2edd..166e76c608f 100644 --- a/lib/android/app/build.gradle +++ b/lib/android/app/build.gradle @@ -22,7 +22,7 @@ def kotlinStdlib = safeExtGet('RNNKotlinStdlib',DEFAULT_KOTLIN_STDLIB ) def kotlinCoroutinesCore = safeExtGet('RNNKotlinCoroutinesCore', '1.5.2') android { compileSdkVersion safeExtGetFallbackLowerBound('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) - buildToolsVersion = "33.0.0" + buildToolsVersion = "34.0.0" defaultConfig { minSdkVersion safeExtGetFallbackLowerBound('minSdkVersion', DEFAULT_MIN_SDK_VERSION) targetSdkVersion safeExtGetFallbackLowerBound('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) @@ -56,7 +56,7 @@ android { def repeatLength = output.length() println '\n\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n' - println "see report at file://${t.reports.html.destination}/index.html" + println "see report at file://${t.reports.html.outputLocation}/index.html" } } } @@ -66,7 +66,11 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + if (reactNativeMinorVersion() >= 73) { + jvmTarget = JavaVersion.VERSION_17 + } else { + jvmTarget = JavaVersion.VERSION_11 + } } flavorDimensions "RNN.reactNativeVersion" @@ -122,6 +126,11 @@ android { } } +int reactNativeMinorVersion() { + List reactNativeVersionComponents = reactNativeVersionComponents(findReactNativePackageJson()) + reactNativeVersionComponents[1].toInteger() +} + String resolveFlavor() { List reactNativeVersionComponents = reactNativeVersionComponents(findReactNativePackageJson()) Integer reactNativeMinorComponent = reactNativeVersionComponents[1].toInteger() diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java b/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java index 8ddc3d5762c..481aaf07220 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java +++ b/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java @@ -134,6 +134,7 @@ public void requestPermissions(String[] permissions, int requestCode, Permission @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); NavigationApplication.instance.onRequestPermissionsResult(requestCode, permissions, grantResults); if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) { mPermissionListener = null; diff --git a/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt b/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt index 93b3b8e5690..dbe077468fd 100644 --- a/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt +++ b/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt @@ -194,8 +194,8 @@ open class ButtonPresenter(private val context: Context, private val button: But class WixAccessibilityDelegateCompat: AccessibilityDelegateCompat(){ override fun onInitializeAccessibilityNodeInfo( - host: View?, - info: AccessibilityNodeInfoCompat? + host: View, + info: AccessibilityNodeInfoCompat ) { super.onInitializeAccessibilityNodeInfo(host, info) diff --git a/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java b/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java index ec919def461..95f35e78d1e 100644 --- a/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java +++ b/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java @@ -10,6 +10,8 @@ import static org.assertj.core.api.Java6Assertions.*; +import com.reactnativenavigation.R; + public class EnvironmentTest extends BaseTest { @Test public void assertJ() { @@ -33,7 +35,7 @@ public void supportDesign() { @Test public void androidR() { - assertThat(R.string.bottom_sheet_behavior).isNotZero(); + assertThat(com.google.android.material.R.string.bottom_sheet_behavior).isNotZero(); } @Test diff --git a/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java b/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java index 23cf871fc9f..b8381dab3bb 100644 --- a/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java +++ b/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java @@ -9,6 +9,7 @@ import java.util.Collections; import java.util.List; + public class TestApplication extends Application implements ReactApplication { private final ReactNativeHost host = new ReactNativeHost(this) { @Override @@ -25,7 +26,7 @@ protected List getPackages() { @Override public void onCreate() { super.onCreate(); - setTheme(R.style.Theme_AppCompat); + setTheme(androidx.appcompat.R.style.Theme_AppCompat); } @Override diff --git a/lib/ios/ElementAnimator.m b/lib/ios/ElementAnimator.m index 146700a6c9b..a383bdd7747 100644 --- a/lib/ios/ElementAnimator.m +++ b/lib/ios/ElementAnimator.m @@ -3,10 +3,12 @@ #import "ElementHorizontalTransition.h" #import "ElementVerticalTransition.h" #import "HorizontalTranslationTransition.h" +#import "HorizontalScaleTransition.h" #import "RNNElementFinder.h" #import "Transition.h" #import "VerticalRotationTransition.h" #import "VerticalTranslationTransition.h" +#import "VerticalScaleTransition.h" @implementation ElementAnimator { UIView *_containerView; @@ -60,6 +62,18 @@ - (instancetype)initWithTransitionOptions:(TransitionOptions *)transitionOptions transitionDetails:transitionOptions.rotationY]]; } + if (transitionOptions.scaleX.hasAnimation) { + [animations addObject:[[HorizontalScaleTransition alloc] + initWithView:self.view + transitionDetails:transitionOptions.scaleX]]; + } + + if (transitionOptions.scaleY.hasAnimation) { + [animations addObject:[[VerticalScaleTransition alloc] + initWithView:self.view + transitionDetails:transitionOptions.scaleY]]; + } + return animations; } diff --git a/lib/ios/HorizontalScaleTransition.h b/lib/ios/HorizontalScaleTransition.h new file mode 100644 index 00000000000..e87e5c07290 --- /dev/null +++ b/lib/ios/HorizontalScaleTransition.h @@ -0,0 +1,6 @@ +#import "FloatTransition.h" +#import + +@interface HorizontalScaleTransition : FloatTransition + +@end diff --git a/lib/ios/HorizontalScaleTransition.m b/lib/ios/HorizontalScaleTransition.m new file mode 100644 index 00000000000..4b190da3b3d --- /dev/null +++ b/lib/ios/HorizontalScaleTransition.m @@ -0,0 +1,21 @@ +#import "HorizontalScaleTransition.h" + +@implementation HorizontalScaleTransition + +- (CATransform3D)animateWithProgress:(CGFloat)p { + CGFloat scaleX = [RNNInterpolator fromFloat:self.from + toFloat:self.to + precent:p + interpolator:self.interpolator]; + return CATransform3DMakeScale(scaleX, 1, 1); +} + +- (CGFloat)calculateFrom:(Double *)from { + return from.hasValue ? from.get : 1; +} + +- (CGFloat)calculateTo:(Double *)to { + return to.hasValue ? to.get : 1; +} + +@end diff --git a/lib/ios/RNNAppDelegate.mm b/lib/ios/RNNAppDelegate.mm index fcccf9410f9..d74a8613a03 100644 --- a/lib/ios/RNNAppDelegate.mm +++ b/lib/ios/RNNAppDelegate.mm @@ -6,10 +6,9 @@ #import "RCTLegacyInteropComponents.h" #import #import -#import #import -#import #import +#import #import #import #import diff --git a/lib/ios/RNNReactView.h b/lib/ios/RNNReactView.h index 62850dcee0c..9856c69c0ee 100644 --- a/lib/ios/RNNReactView.h +++ b/lib/ios/RNNReactView.h @@ -1,5 +1,5 @@ #ifdef RCT_NEW_ARCH_ENABLED -#import +#import #else #import #endif @@ -32,7 +32,7 @@ typedef void (^RNNReactViewReadyCompletionBlock)(void); #ifdef RCT_NEW_ARCH_ENABLED @interface RNNReactView - : RCTFabricSurfaceHostingProxyRootView + : RCTSurfaceHostingProxyRootView #else @interface RNNReactView : RCTRootView #endif diff --git a/lib/ios/RNNReactView.m b/lib/ios/RNNReactView.mm similarity index 90% rename from lib/ios/RNNReactView.m rename to lib/ios/RNNReactView.mm index fec6fc6299d..97d1cf921d2 100644 --- a/lib/ios/RNNReactView.m +++ b/lib/ios/RNNReactView.mm @@ -1,6 +1,10 @@ #import "RNNReactView.h" #import +#ifdef RCT_NEW_ARCH_ENABLED +#import +#endif + @implementation RNNReactView { BOOL _isAppeared; } @@ -11,10 +15,9 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge eventEmitter:(RNNEventEmitter *)eventEmitter sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock { - self = [super initWithBridge:bridge - moduleName:moduleName - initialProperties:initialProperties - sizeMeasureMode:sizeMeasureMode]; + RCTFabricSurface *surface = [[RCTFabricSurface alloc] initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties]; + self = [super initWithSurface:surface sizeMeasureMode:sizeMeasureMode]; + [surface start]; #else - (instancetype)initWithBridge:(RCTBridge *)bridge moduleName:(NSString *)moduleName diff --git a/lib/ios/TransitionOptions.m b/lib/ios/TransitionOptions.m index 1cf92534736..11e2be68e23 100644 --- a/lib/ios/TransitionOptions.m +++ b/lib/ios/TransitionOptions.m @@ -8,6 +8,8 @@ - (instancetype)initWithDict:(NSDictionary *)dict { self.alpha = [[TransitionDetailsOptions alloc] initWithDict:dict[@"alpha"]]; self.x = [[TransitionDetailsOptions alloc] initWithDict:dict[@"x"]]; self.y = [[TransitionDetailsOptions alloc] initWithDict:dict[@"y"]]; + self.scaleX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"scaleX"]]; + self.scaleY = [[TransitionDetailsOptions alloc] initWithDict:dict[@"scaleY"]]; self.translationX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"translationX"]]; self.translationY = [[TransitionDetailsOptions alloc] initWithDict:dict[@"translationY"]]; self.rotationX = [[TransitionDetailsOptions alloc] initWithDict:dict[@"rotationX"]]; @@ -23,6 +25,8 @@ - (void)mergeOptions:(TransitionOptions *)options { [self.alpha mergeOptions:options.alpha]; [self.x mergeOptions:options.x]; [self.y mergeOptions:options.y]; + [self.scaleX mergeOptions:options.scaleX]; + [self.scaleY mergeOptions:options.scaleY]; [self.translationX mergeOptions:options.translationX]; [self.translationY mergeOptions:options.translationY]; [self.rotationX mergeOptions:options.rotationX]; @@ -36,12 +40,14 @@ - (void)mergeOptions:(TransitionOptions *)options { - (BOOL)hasAnimation { return self.x.hasAnimation || self.y.hasAnimation || self.alpha.hasAnimation || + self.scaleX.hasAnimation || self.scaleY.hasAnimation || self.translationX.hasAnimation || self.translationY.hasAnimation || self.rotationX.hasAnimation || self.rotationY.hasAnimation; } - (BOOL)hasValue { return self.x.hasAnimation || self.y.hasAnimation || self.alpha.hasAnimation || + self.scaleX.hasAnimation || self.scaleY.hasAnimation || self.translationX.hasAnimation || self.translationY.hasAnimation || self.rotationX.hasAnimation || self.rotationY.hasAnimation || self.waitForRender.hasValue || self.enable.hasValue; @@ -61,6 +67,14 @@ - (NSTimeInterval)maxDuration { maxDuration = [_y.duration withDefault:0]; } + if ([_scaleX.duration withDefault:0] > maxDuration) { + maxDuration = [_scaleX.duration withDefault:0]; + } + + if ([_scaleY.duration withDefault:0] > maxDuration) { + maxDuration = [_scaleY.duration withDefault:0]; + } + if ([_translationX.duration withDefault:0] > maxDuration) { maxDuration = [_translationX.duration withDefault:0]; } diff --git a/lib/ios/VerticalScaleTransition.h b/lib/ios/VerticalScaleTransition.h new file mode 100644 index 00000000000..43af70b2d42 --- /dev/null +++ b/lib/ios/VerticalScaleTransition.h @@ -0,0 +1,6 @@ +#import "FloatTransition.h" +#import + +@interface VerticalScaleTransition : FloatTransition + +@end diff --git a/lib/ios/VerticalScaleTransition.m b/lib/ios/VerticalScaleTransition.m new file mode 100644 index 00000000000..c484b4bf9df --- /dev/null +++ b/lib/ios/VerticalScaleTransition.m @@ -0,0 +1,21 @@ +#import "VerticalScaleTransition.h" + +@implementation VerticalScaleTransition + +- (CATransform3D)animateWithProgress:(CGFloat)p { + CGFloat scaleY = [RNNInterpolator fromFloat:self.from + toFloat:self.to + precent:p + interpolator:self.interpolator]; + return CATransform3DMakeScale(1, scaleY, 1); +} + +- (CGFloat)calculateFrom:(Double *)from { + return from.hasValue ? from.get : 1; +} + +- (CGFloat)calculateTo:(Double *)to { + return to.hasValue ? to.get : 1; +} + +@end diff --git a/metro.config.js b/metro.config.js index d6f79a8a4ba..53c45a82be7 100644 --- a/metro.config.js +++ b/metro.config.js @@ -1,7 +1,11 @@ +const path = require('node:path'); const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); const config = { projectRoot: `${__dirname}`, + resolver: { + enableGlobalPackages: true, + }, watchFolders: [__dirname], }; diff --git a/package.json b/package.json index 5ff2f2479df..d4df64a1096 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-navigation", - "version": "7.38.4", + "version": "7.39.2", "description": "React Native Navigation - truly native navigation for iOS and Android", "license": "MIT", "nativePackage": true, @@ -76,7 +76,10 @@ "@babel/plugin-proposal-export-namespace-from": "7.10.1", "@babel/runtime": "7.22.6", "@babel/types": "7.22.5", - "@react-native/metro-config": "^0.73.0", + "@babel/preset-env": "^7.22.9", + "@react-native/metro-config": "^0.73.2", + "@react-native/babel-preset": "^0.73.18", + "@react-native/typescript-config": "^0.73.1", "@react-native-community/blur": "^3.6.0", "@react-native-community/datetimepicker": "^3.4.7", "@react-native-community/eslint-config": "2.0.0", @@ -94,7 +97,7 @@ "@typescript-eslint/parser": "4.33.0", "babel-jest": "^27.0.0", "clang-format": "^1.4.0", - "detox": "20.18.3", + "detox": "20.19.5", "detox-testing-library-rnn-adapter": "^2.0.3", "eslint": "7.32.0", "eslint-config-prettier": "6.11.0", @@ -109,7 +112,7 @@ "pngjs": "^6.0.0", "prettier": "2.1.2", "react": "18.2.0", - "react-native": "0.72.3", + "react-native": "0.73.3", "react-native-fast-image": "^8.6.3", "react-native-gesture-handler": "^2.10.1", "react-native-reanimated": "^3.8.1", diff --git a/playground/android/app/build.gradle b/playground/android/app/build.gradle index 5fde867133d..8624bb3cc60 100644 --- a/playground/android/app/build.gradle +++ b/playground/android/app/build.gradle @@ -13,9 +13,11 @@ def jscFlavor = 'org.webkit:android-jsc:+' android { compileSdkVersion rootProject.ext.get("compileSdkVersion") + namespace "com.reactnativenavigation.playground" + compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } defaultConfig { diff --git a/playground/android/app/src/main/java/com/reactnativenavigation/playground/FragmentComponent.java b/playground/android/app/src/main/java/com/reactnativenavigation/playground/FragmentComponent.java index f8ccd359a88..910f40dd76a 100644 --- a/playground/android/app/src/main/java/com/reactnativenavigation/playground/FragmentComponent.java +++ b/playground/android/app/src/main/java/com/reactnativenavigation/playground/FragmentComponent.java @@ -10,6 +10,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.FragmentActivity; +import com.reactnativenavigation.R; public class FragmentComponent implements ExternalComponent { private final FrameLayout content; diff --git a/playground/android/build.gradle b/playground/android/build.gradle index f6d60a1e3ce..809412b1917 100644 --- a/playground/android/build.gradle +++ b/playground/android/build.gradle @@ -2,13 +2,13 @@ buildscript { ext { - kotlinVersion = "1.7.10" + kotlinVersion = "1.8.10" RNNKotlinVersion = kotlinVersion detoxKotlinVersion = kotlinVersion - compileSdkVersion = 33 - buildToolsVersion = "33.0.0" + compileSdkVersion = 34 + buildToolsVersion = "34.0.0" minSdkVersion = 21 - targetSdkVersion = 33 + targetSdkVersion = 34 // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" } @@ -36,3 +36,13 @@ allprojects { } } } + +subprojects { + afterEvaluate { p -> + if (p.hasProperty('android')) { + android { + buildToolsVersion rootProject.ext.buildToolsVersion + } + } + } +} diff --git a/playground/android/gradle/wrapper/gradle-wrapper.properties b/playground/android/gradle/wrapper/gradle-wrapper.properties index 5a14d36da82..5fe713fe642 100644 --- a/playground/android/gradle/wrapper/gradle-wrapper.properties +++ b/playground/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Jul 28 13:48:47 IDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/playground/ios/Podfile b/playground/ios/Podfile index 57d344ef9d5..0abf29c8cad 100644 --- a/playground/ios/Podfile +++ b/playground/ios/Podfile @@ -15,9 +15,6 @@ if linkage != nil use_frameworks! :linkage => linkage.to_sym end -# Execute the pre-install script before doing anything else -system('node scripts/pre-install.js') - def all_pods config = use_native_modules! @@ -38,18 +35,11 @@ def all_pods end post_install do |installer| - __apply_Xcode_15_3_flipper_post_install_workaround(installer) - - react_native_post_install(installer, "../../node_modules/react-native", :mac_catalyst_enabled => false) - - __apply_Xcode_12_5_M1_post_install_workaround(installer) - - # This is to resolve "'shared_timed_mutex' is unavailable: introduced in iOS 10.0" error - installer.pods_project.targets.each do |t| - t.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4' - end - end + react_native_post_install( + installer, + "../../node_modules/react-native", + :mac_catalyst_enabled => false + ) end def __apply_Xcode_15_3_flipper_post_install_workaround(installer) diff --git a/playground/ios/playground.xcodeproj/project.pbxproj b/playground/ios/playground.xcodeproj/project.pbxproj index 2e0284b4ab9..195a51e534b 100644 --- a/playground/ios/playground.xcodeproj/project.pbxproj +++ b/playground/ios/playground.xcodeproj/project.pbxproj @@ -164,6 +164,8 @@ 50CF233C240695B10098042D /* RNNBottomTabsController+Helpers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNNBottomTabsController+Helpers.m"; sourceTree = ""; }; 50E4888A2427DA4800B11A8E /* StackOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StackOptionsTest.m; sourceTree = ""; }; 50FDEFBB258F5C5D008C9C3C /* RNNSearchBarOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSearchBarOptionsTest.m; sourceTree = ""; }; + 60BCFCC02B7F812F00FCDB38 /* libLLVM.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libLLVM.dylib; path = usr/lib/libLLVM.dylib; sourceTree = SDKROOT; }; + 60BCFCCA2B7F817400FCDB38 /* libReactNativeNavigation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReactNativeNavigation.a; sourceTree = BUILT_PRODUCTS_DIR; }; 7F8E255E2E08F6ECE7DF6FE3 /* Pods-playground.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.release.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.release.xcconfig"; sourceTree = ""; }; 9F9A3A9525260DA900AAAF37 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; B484A10A046B0046B98A76B5 /* Pods-playground.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.debug.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.debug.xcconfig"; sourceTree = ""; }; @@ -375,6 +377,8 @@ E504607E227748E900212BD8 /* Frameworks */ = { isa = PBXGroup; children = ( + 60BCFCCA2B7F817400FCDB38 /* libReactNativeNavigation.a */, + 60BCFCC02B7F812F00FCDB38 /* libLLVM.dylib */, 50364D6B238E7F0A000E62A2 /* ReactNativeNavigation.framework */, E504607F227748EA00212BD8 /* JavaScriptCore.framework */, C10F72071A488F801E1F1116 /* libPods-NavigationIOS12Tests.a */, @@ -553,7 +557,6 @@ ORGANIZATIONNAME = Wix; TargetAttributes = { 13B07F861A680F5B00A75B9A = { - DevelopmentTeam = XPHGA2FMQQ; LastSwiftMigration = 1400; ProvisioningStyle = Automatic; }; @@ -698,11 +701,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-playground/Pods-playground-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -784,11 +787,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-NavigationTests/Pods-NavigationTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -826,11 +829,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SnapshotTests/Pods-SnapshotTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -890,11 +893,11 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-NavigationIOS12Tests/Pods-NavigationIOS12Tests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -1028,9 +1031,10 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEAD_CODE_STRIPPING = YES; - DEVELOPMENT_TEAM = XPHGA2FMQQ; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; EXCLUDED_ARCHS = ""; + GCC_C_LANGUAGE_STANDARD = c17; HEADER_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_ROOT}/Headers/Public\"", @@ -1101,7 +1105,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SocketRocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", @@ -1111,7 +1114,6 @@ ); OTHER_CFLAGS = ( "$(inherited)", - "-fmodule-map-file=\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit/YogaKit.modulemap\"", "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/FlipperKit/FlipperKit.modulemap\"", "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap\"", "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React/React-Core.modulemap\"", @@ -1133,7 +1135,7 @@ OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", - "-l\"c++\"", + "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = com.rnn.playground; PRODUCT_NAME = playground; @@ -1154,9 +1156,10 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XPHGA2FMQQ; + DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; EXCLUDED_ARCHS = ""; + GCC_C_LANGUAGE_STANDARD = c17; HEADER_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_ROOT}/Headers/Public\"", @@ -1220,7 +1223,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SocketRocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", @@ -1231,7 +1233,7 @@ OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", - "-l\"c++\"", + "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = com.rnn.playground; PRODUCT_NAME = playground; @@ -1323,7 +1325,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SocketRocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", @@ -1418,7 +1419,6 @@ "\"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/SocketRocket\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/fmt\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", @@ -1439,7 +1439,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -1487,15 +1487,19 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", ); OTHER_CPLUSPLUSFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", + ); + OTHER_LDFLAGS = ( + "-Wl", + "-ld_classic", ); - OTHER_LDFLAGS = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; }; name = Debug; }; @@ -1504,7 +1508,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -1544,15 +1548,19 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", ); OTHER_CPLUSPLUSFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", + ); + OTHER_LDFLAGS = ( + "-Wl", + "-ld_classic", ); - OTHER_LDFLAGS = ""; REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/playground/ios/scripts/pre-install.js b/playground/ios/scripts/pre-install.js deleted file mode 100644 index 55488f01d41..00000000000 --- a/playground/ios/scripts/pre-install.js +++ /dev/null @@ -1,33 +0,0 @@ -const fs = require('fs'); - -const patchBoostPodspec = () => { - const log = message => console.log(`[POST-INSTALL] ${message}`); - const boostPodspecPath = `${process.cwd()}/node_modules/react-native/third-party-podspecs/boost.podspec`; - const originalUrl = 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'; - const patchedUrl = 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2'; - - if (!fs.existsSync(boostPodspecPath)) { - log('boost.podspec does not exist, skipping patch...'); - return; - } - - let boostPodspec = fs.readFileSync(boostPodspecPath, 'utf8'); - - if (!boostPodspec.includes(originalUrl)) { - log('boost.podspec is already patched or the URL is different, skipping patch...'); - return; - } - - log('Applying boost.podspec patch...'); - boostPodspec = boostPodspec.replace(originalUrl, patchedUrl); - fs.writeFileSync(boostPodspecPath, boostPodspec, 'utf8'); -}; - -function patchBoostPodspecIfNeeded() { - if (process.platform === 'darwin') { - console.log('[POST-INSTALL] Running boost.io podspec patch...'); - patchBoostPodspec(); - } -} - -patchBoostPodspecIfNeeded();