react-native-update 10.28.2 → 10.28.3-beta.0

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.
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>react-native-update</name>
4
+ <comment>Project react-native-update created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
+ </natures>
17
+ <filteredResources>
18
+ <filter>
19
+ <id>1727963310481</id>
20
+ <name></name>
21
+ <type>30</type>
22
+ <matcher>
23
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
+ </matcher>
26
+ </filter>
27
+ </filteredResources>
28
+ </projectDescription>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>react-native-update</name>
4
+ <comment>Project react-native-update created by Buildship.</comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ </buildSpec>
19
+ <natures>
20
+ <nature>org.eclipse.jdt.core.javanature</nature>
21
+ <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
+ </natures>
23
+ <filteredResources>
24
+ <filter>
25
+ <id>1727963310481</id>
26
+ <name></name>
27
+ <type>30</type>
28
+ <matcher>
29
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
+ </matcher>
32
+ </filter>
33
+ </filteredResources>
34
+ </projectDescription>
@@ -0,0 +1,13 @@
1
+ arguments=--init-script /var/folders/l6/0fn3x28s5s585ld3p04gsy1h0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/l6/0fn3x28s5s585ld3p04gsy1h0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
2
+ auto.sync=false
3
+ build.scans.enabled=false
4
+ connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
5
+ connection.project.dir=
6
+ eclipse.preferences.version=1
7
+ gradle.user.home=
8
+ java.home=/Users/sunny/.sdkman/candidates/java/17.0.9-zulu/zulu-17.jdk/Contents/Home
9
+ jvm.arguments=
10
+ offline.mode=false
11
+ override.workspace.settings=true
12
+ show.console.view=true
13
+ show.executions.view=true
@@ -1,10 +1,40 @@
1
1
  import ExpoModulesCore
2
- import react_native_update
2
+ import React
3
3
 
4
4
  public final class ExpoPushyReactDelegateHandler: ExpoReactDelegateHandler {
5
- private weak var reactDelegate: ExpoReactDelegate?
6
5
 
7
- public override func bundleURL(reactDelegate: ExpoReactDelegate) -> URL? {
8
- return RCTPushy.bundleURL()
9
- }
6
+ #if EXPO_SUPPORTS_BUNDLEURL
7
+ // This code block compiles only if EXPO_SUPPORTS_BUNDLEURL is defined
8
+ // For expo-modules-core >= 1.12.0
9
+
10
+ // Override bundleURL, which is the primary mechanism for these versions.
11
+ // Expo's default createBridge implementation should respect this.
12
+ override public func bundleURL(reactDelegate: ExpoReactDelegate) -> URL? {
13
+ let bundleURL = RCTPushy.bundleURL()
14
+ print("PushyHandler: Using bundleURL: \(bundleURL?.absoluteString ?? "nil")")
15
+ return bundleURL
16
+ }
17
+
18
+ // No createBridge override needed here, rely on default behavior using the bundleURL override.
19
+
20
+ #else
21
+ // This code block compiles only if EXPO_SUPPORTS_BUNDLEURL is NOT defined
22
+ // For expo-modules-core < 1.12.0
23
+
24
+ // No bundleURL override possible here.
25
+
26
+ // createBridge is the mechanism to customize the URL here.
27
+ // We completely override it and do not call super.
28
+ override public func createBridge(reactDelegate: ExpoReactDelegate, bridgeDelegate: RCTBridgeDelegate, launchOptions: [AnyHashable: Any]?) -> RCTBridge? {
29
+ let bundleURL = RCTPushy.bundleURL()
30
+ // Print the URL being provided to the initializer
31
+ print("PushyHandler: createBridge bundleURL: \(bundleURL?.absoluteString ?? "nil")")
32
+
33
+ // Directly create the bridge using the bundleURL initializer.
34
+ // Pass nil for moduleProvider, assuming default behavior is sufficient.
35
+ // WARNING: If bundleURL is nil, this initialization might fail silently or crash.
36
+ return RCTBridge(bundleURL: bundleURL, moduleProvider: nil, launchOptions: launchOptions)
37
+ }
38
+
39
+ #endif // EXPO_SUPPORTS_BUNDLEURL
10
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.28.2",
3
+ "version": "10.28.3-beta.0",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -74,5 +74,6 @@
74
74
  "react-native": "0.73",
75
75
  "ts-jest": "^29.2.5",
76
76
  "typescript": "^5.6.3"
77
- }
77
+ },
78
+ "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
78
79
  }
@@ -1,4 +1,5 @@
1
1
  require 'json'
2
+ require 'rubygems' # Required for version comparison
2
3
 
3
4
  new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
4
5
 
@@ -33,17 +34,45 @@ Pod::Spec.new do |s|
33
34
  s.dependency "React-Core"
34
35
  s.dependency 'SSZipArchive'
35
36
 
36
- project_root = File.expand_path('../../', __dir__)
37
- project_package_json = File.join(project_root, 'package.json')
38
37
  is_expo_project = false
38
+ expo_dependency_added = false
39
+ supports_bundle_url_final = false
39
40
 
40
- if (File.exist?(project_package_json))
41
- package_json = JSON.parse(File.read(project_package_json))
42
- has_expo_dependency = package_json['dependencies'] && package_json['dependencies']['expo']
43
- has_expo_modules_core = Dir.exist?('node_modules/expo-modules-core')
44
- is_expo_project = has_expo_dependency || has_expo_modules_core
45
- if is_expo_project
46
- s.dependency 'ExpoModulesCore'
41
+ # Use CocoaPods mechanism to find Podfile
42
+ begin
43
+ podfile_path = File.join(Pod::Config.instance.installation_root, 'Podfile')
44
+ if File.exist?(podfile_path)
45
+ podfile_content = File.read(podfile_path)
46
+ is_expo_project = podfile_content.include?('use_expo_modules!')
47
+ end
48
+ rescue
49
+ # Silently skip if CocoaPods config is not available
50
+ end
51
+
52
+ if is_expo_project
53
+ s.dependency 'ExpoModulesCore'
54
+ expo_dependency_added = true
55
+
56
+ # Current directory is in node_modules/react-native-update, so parent is node_modules
57
+ expo_core_package_json_path = File.join(__dir__, '..', 'expo-modules-core', 'package.json')
58
+
59
+ if File.exist?(expo_core_package_json_path)
60
+ begin
61
+ core_package_json = JSON.parse(File.read(expo_core_package_json_path))
62
+ installed_version_str = core_package_json['version']
63
+
64
+ if installed_version_str
65
+ begin
66
+ installed_version = Gem::Version.new(installed_version_str)
67
+ target_version = Gem::Version.new('1.12.0')
68
+ supports_bundle_url_final = installed_version >= target_version
69
+ rescue ArgumentError
70
+ # Silently skip version parsing errors
71
+ end
72
+ end
73
+ rescue JSON::ParserError, StandardError
74
+ # Silently skip file reading and parsing errors
75
+ end
47
76
  end
48
77
  end
49
78
 
@@ -62,9 +91,12 @@ Pod::Spec.new do |s|
62
91
  ss.public_header_files = 'ios/RCTPushy/HDiffPatch/**/*.h'
63
92
  end
64
93
 
65
- if is_expo_project
94
+ if expo_dependency_added
66
95
  s.subspec 'Expo' do |ss|
67
96
  ss.source_files = 'ios/Expo/**/*.{h,m,mm,swift}'
97
+ if supports_bundle_url_final
98
+ ss.pod_target_xcconfig = { 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'EXPO_SUPPORTS_BUNDLEURL' }
99
+ end
68
100
  end
69
101
  end
70
102
 
@@ -79,7 +111,7 @@ Pod::Spec.new do |s|
79
111
  s.pod_target_xcconfig = {
80
112
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
81
113
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
82
- }
114
+ }.merge(s.pod_target_xcconfig)
83
115
  s.dependency "React-Codegen"
84
116
  s.dependency "RCT-Folly"
85
117
  s.dependency "RCTRequired"