@dolami-inc/react-native-expo-unity 0.1.6 → 0.1.8

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/README.md CHANGED
@@ -81,15 +81,17 @@ cp node_modules/@dolami-inc/react-native-expo-unity/plugin/NativeCallProxy.mm <U
81
81
 
82
82
  ### 3. Copy build artifacts to your RN project
83
83
 
84
- Create `unity/builds/ios/` in your project root and copy:
84
+ Create `unity/builds/ios/` in your project root and copy all artifacts from your Unity iOS build:
85
85
 
86
86
  ```bash
87
87
  mkdir -p unity/builds/ios
88
88
  cp -R <unity-build>/UnityFramework.framework unity/builds/ios/
89
- cp <unity-build>/{baselib.a,il2cpp.a,libGameAssembly.a} unity/builds/ios/
89
+ cp <unity-build>/*.a unity/builds/ios/
90
90
  ```
91
91
 
92
- > Custom path? Set `EXPO_UNITY_PATH` environment variable to your Unity build directory.
92
+ The podspec references these files **directly by path** nothing is copied or embedded into the npm package. Updating your Unity build is as simple as replacing the contents of `unity/builds/ios/` and re-running `pod install`.
93
+
94
+ > Custom path? Set `EXPO_UNITY_PATH` environment variable pointing to your Unity build directory, or pass `unityPath` to the config plugin (see step 4).
93
95
 
94
96
  ### 4. Add the config plugin to `app.json`
95
97
 
@@ -38,19 +38,22 @@ Pod::Spec.new do |s|
38
38
  unity_ldflags << '-framework UnityFramework' if framework_exists
39
39
  unity_ldflags += a_files.map { |f| "\"#{f}\"" }
40
40
 
41
+ # Unity framework is ARM-only (device build) — never link it for Simulator.
42
+ # The [sdk=iphoneos*] conditional ensures these settings only apply when
43
+ # building for a physical device, not the Simulator SDK.
41
44
  s.pod_target_xcconfig = {
42
- 'HEADER_SEARCH_PATHS' => "\"#{unity_ios_dir}/UnityFramework.framework/Headers\"",
43
- 'FRAMEWORK_SEARCH_PATHS' => "\"#{unity_ios_dir}\"",
44
- 'OTHER_LDFLAGS' => unity_ldflags.join(' '),
45
- 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
46
- 'GCC_PREPROCESSOR_DEFINITIONS' => 'UNITY_FRAMEWORK=1',
47
- 'ENABLE_BITCODE' => 'NO'
45
+ 'HEADER_SEARCH_PATHS' => "$(inherited) \"#{unity_ios_dir}/UnityFramework.framework/Headers\"",
46
+ 'FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]' => "$(inherited) \"#{unity_ios_dir}\"",
47
+ 'OTHER_LDFLAGS[sdk=iphoneos*]' => "$(inherited) #{unity_ldflags.join(' ')}",
48
+ 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
49
+ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) UNITY_FRAMEWORK=1',
50
+ 'ENABLE_BITCODE' => 'NO'
48
51
  }
49
52
 
50
53
  s.user_target_xcconfig = {
51
- 'ENABLE_BITCODE' => 'NO',
52
- 'FRAMEWORK_SEARCH_PATHS' => "\"#{unity_ios_dir}\"",
53
- 'LIBRARY_SEARCH_PATHS' => "\"#{unity_ios_dir}\"",
54
- 'OTHER_LDFLAGS' => unity_ldflags.join(' ')
54
+ 'ENABLE_BITCODE' => 'NO',
55
+ 'FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]' => "$(inherited) \"#{unity_ios_dir}\"",
56
+ 'LIBRARY_SEARCH_PATHS[sdk=iphoneos*]' => "$(inherited) \"#{unity_ios_dir}\"",
57
+ 'OTHER_LDFLAGS[sdk=iphoneos*]' => "$(inherited) #{unity_ldflags.join(' ')}"
55
58
  }
56
59
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolami-inc/react-native-expo-unity",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Unity as a Library (UaaL) bridge for React Native / Expo",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",