mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d07575b1c6
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35138 Changelog: [General][Added] - Add a C++ only TurboModule example (for Android/iOS/macOS/Windows) react-native@0.69 introduced a new bridging layer to ease integration for pure C++ TurboModules using C++ std:: types directly instead of the lower level jsi:: types: https://github.com/facebook/react-native/tree/v0.69.0/ReactCommon/react/bridging This bridging layer can be used in JSI functions or more conveniently in C++ TurboModules. Here is a example of an C++ only TurboModule which will work on Android and iOS and macOS/Windows (using microsoft/react-native-macos|windows) only using flow/TypeScript and standard C++ types. C++ only TurboModules are very handy as they do not require to work with JSI APIs - instead std:: or custom C++ can by used. Reviewed By: javache Differential Revision: D39011736 fbshipit-source-id: 84c833d8540671fde8505f1aeb0265074b248730
32 lines
1.1 KiB
Ruby
32 lines
1.1 KiB
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
require "json"
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, "../package.json")))
|
|
|
|
Pod::Spec.new do |s|
|
|
s.name = "NativeCxxModuleExample"
|
|
s.version = package["version"]
|
|
s.summary = package["description"]
|
|
s.description = "NativeCxxModuleExample"
|
|
s.homepage = "https://github.com/facebook/react-native.git"
|
|
s.license = "MIT"
|
|
s.platforms = { :ios => "12.4" }
|
|
s.compiler_flags = '-Wno-nullability-completeness'
|
|
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
s.source = { :git => "https://github.com/facebook/react-native.git", :tag => "#{s.version}" }
|
|
s.source_files = "**/*.{h,cpp}"
|
|
s.requires_arc = true
|
|
s.pod_target_xcconfig = {
|
|
"USE_HEADERMAP" => "YES",
|
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
}
|
|
|
|
install_modules_dependencies(s)
|
|
|
|
s.dependency "ReactCommon/turbomodule/core"
|
|
end
|