expo-modules-core 56.0.18 → 56.0.20

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/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 56.0.20 — 2026-07-07
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 56.0.19 — 2026-07-03
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - [iOS] Fix `ExpoModulesProvider` lookup failing for bundle names with non-identifier characters (e.g. dots). ([#46424](https://github.com/expo/expo/pull/46424) by [@shawnthye-guru](https://github.com/shawnthye-guru))
22
+
13
23
  ## 56.0.18 — 2026-07-01
14
24
 
15
25
  ### 🐛 Bug fixes
@@ -27,7 +27,7 @@ if (shouldIncludeCompose) {
27
27
  }
28
28
 
29
29
  group = 'host.exp.exponent'
30
- version = '56.0.18'
30
+ version = '56.0.20'
31
31
 
32
32
  def isExpoModulesCoreTests = {
33
33
  Gradle gradle = getGradle()
@@ -94,7 +94,7 @@ android {
94
94
  defaultConfig {
95
95
  consumerProguardFiles 'proguard-rules.pro'
96
96
  versionCode 1
97
- versionName "56.0.18"
97
+ versionName "56.0.20"
98
98
  buildConfigField "String", "EXPO_MODULES_CORE_VERSION", "\"${versionName}\""
99
99
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true"
100
100
 
@@ -644,9 +644,18 @@ public final class AppContext: NSObject, EXAppContextProtocol, @unchecked Sendab
644
644
  public static func modulesProvider(withName providerName: String = "ExpoModulesProvider") -> ModulesProvider {
645
645
  // [0] When ExpoModulesCore is built as separated framework/module,
646
646
  // we should explicitly load main bundle's `ExpoModulesProvider` class.
647
- if let bundleName = Bundle.main.infoDictionary?["CFBundleName"],
648
- let providerClass = NSClassFromString("\(bundleName).\(providerName)") as? ModulesProvider.Type {
649
- return providerClass.init()
647
+ // CFBundleExecutable is tried first: it equals $(PRODUCT_NAME:c99extidentifier) and
648
+ // directly matches the Swift module name. CFBundleName is kept as a fallback for the
649
+ // uncommon case where both values are identical valid identifiers.
650
+ let mainBundleNames = [
651
+ Bundle.main.infoDictionary?["CFBundleExecutable"],
652
+ Bundle.main.infoDictionary?["CFBundleName"]
653
+ ].compactMap { $0 as? String }
654
+
655
+ for providerClassName in moduleProviderClassNames(withName: providerName, bundleNames: mainBundleNames) {
656
+ if let providerClass = NSClassFromString(providerClassName) as? ModulesProvider.Type {
657
+ return providerClass.init()
658
+ }
650
659
  }
651
660
 
652
661
  // [1] Fallback to `ExpoModulesProvider` class from the current module.
@@ -656,9 +665,15 @@ public final class AppContext: NSObject, EXAppContextProtocol, @unchecked Sendab
656
665
 
657
666
  // [2] Fallback to search for `ExpoModulesProvider` in frameworks (brownfield use case)
658
667
  for bundle in Bundle.allFrameworks {
659
- guard let bundleName = bundle.infoDictionary?["CFBundleName"] as? String else { continue }
660
- if let providerClass = NSClassFromString("\(bundleName).\(providerName)") as? ModulesProvider.Type {
661
- return providerClass.init()
668
+ let frameworkBundleNames = [
669
+ bundle.infoDictionary?["CFBundleExecutable"],
670
+ bundle.infoDictionary?["CFBundleName"]
671
+ ].compactMap { $0 as? String }
672
+
673
+ for providerClassName in moduleProviderClassNames(withName: providerName, bundleNames: frameworkBundleNames) {
674
+ if let providerClass = NSClassFromString(providerClassName) as? ModulesProvider.Type {
675
+ return providerClass.init()
676
+ }
662
677
  }
663
678
  }
664
679
 
@@ -666,6 +681,14 @@ public final class AppContext: NSObject, EXAppContextProtocol, @unchecked Sendab
666
681
  return ModulesProvider()
667
682
  }
668
683
 
684
+ internal static func moduleProviderClassNames(withName providerName: String, bundleNames: [String]) -> [String] {
685
+ var seen = Set<String>()
686
+ return bundleNames.compactMap { bundleName in
687
+ let candidate = "\(bundleName).\(providerName)"
688
+ return seen.insert(candidate).inserted ? candidate : nil
689
+ }
690
+ }
691
+
669
692
  public func reloadAppAsync(_ reason: String = "Reload from appContext") {
670
693
  if moduleRegistry.has(moduleWithName: "ExpoGo") {
671
694
  NotificationCenter.default.post(name: NSNotification.Name(rawValue: "EXReloadActiveAppRequest"), object: nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "56.0.18",
3
+ "version": "56.0.20",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "main": "src/index.ts",
6
6
  "types": "build/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@expo/expo-modules-macros-plugin": "0.2.2",
50
- "expo-modules-jsi": "~56.0.10",
50
+ "expo-modules-jsi": "~56.0.12",
51
51
  "invariant": "^2.2.4"
52
52
  },
53
53
  "peerDependencies": {
@@ -66,7 +66,7 @@
66
66
  "@types/invariant": "^2.2.33",
67
67
  "expo-module-scripts": "56.0.3"
68
68
  },
69
- "gitHead": "b293744c7b199c6cbe910188863e93a174c21250",
69
+ "gitHead": "f7fcf668bc1a31cccd73275e6c316a0d1253f4c9",
70
70
  "scripts": {
71
71
  "build": "expo-module build",
72
72
  "clean": "expo-module clean",