callstack / react-native-visionos

A framework for building native visionOS applications using React
https://callstack.github.io/react-native-visionos-docs/
MIT License
847 stars 28 forks source link

Asset validation failed - A key for 'MinimumOSVersion' is required #101

Closed billyjacoby closed 1 month ago

billyjacoby commented 5 months ago

Description

Trying to validate a package gives the error:

Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle rnVision.app/ Frameworks/hermes.framework is required. (ID: 9433b1a0-5eff-4dd6-987b-06de7f96acca))

Steps to reproduce

  1. Install a new applicaiton
  2. Create an archive
  3. Validate that archive

React Native Version

0.73.3

Affected Platforms

Other (please specify)

Output of npx react-native info

System:
  OS: macOS 14.4
  CPU: (10) arm64 Apple M1 Max
  Memory: 6.48 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 4.1.0
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.2 AI-222.4459.24.2221.9971841
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.19
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.3
    wanted: 0.73.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle rnVision.app/ Frameworks/hermes.framework is required. (ID: 9433b1a0-5eff-4dd6-987b-06de7f96acca))

Reproducer

https://github.com/billyjacoby/vision-template

Screenshots and Videos

I know this project is marked as experimental and not ready for production, but wanted to post these findings here anyway.

I tried adding the MinimumOSValue in the visionos/Pods/hermes-engine/destroot/Library/Frameworks/xros/hermes.framework/Info.plist file, but that didn't seem to help.

okwasniewski commented 5 months ago

Hey, thanks for opening the issue. I'm aware of this bug and I have it on my todo list 😄

A workaround that you can do:

  1. Archive
  2. Click Open Archive in Finder
  3. Click "Show Package contents" on .xcarchive in Finder
  4. Go to Products/Applications/NameOfTheApp.app
  5. Click on the .app and "Show Package contents"
  6. Go to Frameworks/hermes.framework
  7. Modify the contents of Info.plist to include:
<key>MinimumOSVersion</key>
<string>1.0</string>

I think it may also work if you modify the destroot/Library/Frameworks one but with MinimumOSVersion

billyjacoby commented 5 months ago

That workaround fixes it, thanks!

okwasniewski commented 2 months ago

This issue should be closed once this PR gets merged to Hermes: https://github.com/facebook/hermes/pull/1358

okwasniewski commented 1 month ago

Hey,

This issue should now be resolved in React Native 0.74.3. Backport to 0.73.x will be available once this PR get's merged: https://github.com/facebook/hermes/pull/1432