-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add visionOS support #1358
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,13 +24,14 @@ Pod::Spec.new do |spec| | |
# The podspec would be serialized to JSON and people will download prebuilt binaries instead of the source. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think React Native uses this file. It is pretty outdated, I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was needed to make the internal hermes tests work and properly build in Xcode |
||
# TODO(use the hash field as a validation mechanism when the process is stable) | ||
spec.source = ENV['hermes-artifact-url'] ? { http: ENV['hermes-artifact-url'] } : { git: "https://github.com/facebook/hermes.git", tag: "v#{spec.version}" } | ||
spec.platforms = { :osx => "10.13", :ios => "11.0" } | ||
spec.platforms = { :osx => "10.13", :ios => "12.0", :visionos => "1.0" } | ||
|
||
spec.preserve_paths = ["destroot/bin/*"].concat(HermesHelper::BUILD_TYPE == :debug ? ["**/*.{h,c,cpp}"] : []) | ||
spec.source_files = "destroot/include/**/*.h" | ||
spec.header_mappings_dir = "destroot/include" | ||
|
||
spec.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework" | ||
spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework" | ||
spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework" | ||
|
||
spec.xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "CLANG_CXX_LIBRARY" => "compiler-default", "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
#include <android/log.h> | ||
#elif defined(__APPLE__) | ||
#include <os/log.h> | ||
#include <stdio.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the source of issues 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from what I read in the docs, it's probably also a problem on macOS 11.3+ toolchains. weird they'd make such a fundamental change to their core libc headers after so many years 🤷 |
||
#else | ||
#include <cstdio> | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologise, I thought testing didn't require CMake, but it looks like pod install is looking for it. We should add the same thing here with a comment.