@rock-js/platform-ios 0.12.9 → 0.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rock-js/platform-ios",
3
- "version": "0.12.9",
3
+ "version": "0.12.11",
4
4
  "description": "iOS platform support and configuration for Rock",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",
@@ -22,12 +22,12 @@
22
22
  "dependencies": {
23
23
  "@react-native-community/cli-config-apple": "^20.0.0",
24
24
  "@react-native-community/cli-types": "^20.0.0",
25
- "@rock-js/platform-apple-helpers": "^0.12.9",
26
- "@rock-js/tools": "^0.12.9",
25
+ "@rock-js/platform-apple-helpers": "^0.12.11",
26
+ "@rock-js/tools": "^0.12.11",
27
27
  "tslib": "^2.3.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@rock-js/config": "^0.12.9"
30
+ "@rock-js/config": "^0.12.11"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
@@ -1,18 +1,17 @@
1
- # Resolve react_native_pods.rb with node to allow for hoisting
2
- require Pod::Executable.execute_command('node', ['-p',
3
- 'require.resolve(
4
- "react-native/scripts/react_native_pods.rb",
5
- {paths: [process.argv[1]]},
6
- )', __dir__]).strip
1
+ require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
2
+
3
+ # Inspired from https://github.com/expo/expo/blob/main/templates/expo-template-bare-minimum/ios/Podfile
4
+ podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
5
+
6
+ ENV['RCT_NEW_ARCH_ENABLED'] ||= '0' if podfile_properties['newArchEnabled'] == 'false'
7
+ ENV['RCT_USE_RN_DEP'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
8
+ ENV['RCT_USE_PREBUILT_RNCORE'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
7
9
 
8
10
  platform :ios, min_ios_version_supported
9
11
  prepare_react_native_project!
10
12
 
11
- linkage = ENV['USE_FRAMEWORKS']
12
- if linkage != nil
13
- Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14
- use_frameworks! :linkage => linkage.to_sym
15
- end
13
+ use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
14
+ use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
16
15
 
17
16
  target 'HelloWorld' do
18
17
  config = use_native_modules!(['npx', 'rock', 'config', '-p', 'ios'])
@@ -20,7 +19,9 @@ target 'HelloWorld' do
20
19
  use_react_native!(
21
20
  :path => config[:reactNativePath],
22
21
  # An absolute path to your application root.
23
- :app_path => "#{Pod::Config.instance.installation_root}/.."
22
+ :app_path => "#{Pod::Config.instance.installation_root}/..",
23
+ :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes'
24
+
24
25
  )
25
26
 
26
27
  post_install do |installer|
@@ -0,0 +1,3 @@
1
+ {
2
+ "expo.jsEngine": "hermes"
3
+ }
@@ -4,6 +4,6 @@
4
4
  "ios": "rock run:ios"
5
5
  },
6
6
  "devDependencies": {
7
- "@rock-js/platform-ios": "^0.12.9"
7
+ "@rock-js/platform-ios": "^0.12.11"
8
8
  }
9
9
  }