fix: React Native 0.65 compatibility (#230)

* Update Hermes Header import for RN 0.65

* Update VisionCamera.podspec
This commit is contained in:
Marc Rousavy 2021-06-28 18:27:03 +02:00 committed by GitHub
parent d8644ffe81
commit 0f0f1fbb07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"USE_HEADERMAP" => "YES",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/Headers/Private/React-Core\" "
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-hermes\" \"$(PODS_ROOT)/Headers/Public/hermes-engine\""
}
s.requires_arc = true

View File

@ -19,7 +19,10 @@
// on iOS, we simply check by __has_include. Headers are only available if the sources are there too.
#if __has_include(<hermes/hermes.h>)
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
// Hermes (https://hermesengine.dev) (RN 0.65+)
#include <reacthermes/HermesExecutorFactory.h>
#elif __has_include(<hermes/hermes.h>)
// Hermes (https://hermesengine.dev)
#include <hermes/hermes.h>
#elif __has_include(<v8runtime/V8RuntimeFactory.h>)
@ -47,7 +50,7 @@ static std::unique_ptr<jsi::Runtime> makeJSIRuntime() {
#else
#if __has_include(<hermes/hermes.h>)
#if __has_include(<hermes/hermes.h>) || __has_include(<reacthermes/HermesExecutorFactory.h>)
return facebook::hermes::makeHermesRuntime();
#elif __has_include(<v8runtime/V8RuntimeFactory.h>)
return facebook::createV8Runtime("");