1# Copyright (c) Meta Platforms, Inc. and affiliates.
2#
3# This source code is licensed under the MIT license found in the
4# LICENSE file in the root directory of this source tree.
5
6require "json"
7
8package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
9version = package['version']
10
11
12
13folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
14folly_version = '2021.07.22.00'
15
16header_search_paths = [
17  "\"$(PODS_ROOT)/RCT-Folly\"",
18  "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"",
19  "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
20]
21
22if ENV["USE_FRAMEWORKS"]
23  header_search_paths = header_search_paths.concat([
24    "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
25    "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
26    "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers/build/generated/ios\"",
27    "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\""
28  ])
29end
30
31Pod::Spec.new do |s|
32  s.name                   = "ABI49_0_0React-RCTVibration"
33  s.version                = version
34  s.summary                = "An API for controlling the vibration hardware of the device."
35  s.homepage               = "https://reactnative.dev/"
36  s.documentation_url      = "https://reactnative.dev/docs/vibration"
37  s.license                = package["license"]
38  s.author                 = "Meta Platforms, Inc. and its affiliates"
39  s.platforms              = { :ios => "12.4" }
40  s.compiler_flags         = folly_compiler_flags + ' -Wno-nullability-completeness'
41  s.source                 = { :path => "." }
42  s.source_files           = "*.{m,mm}"
43  s.preserve_paths         = "package.json", "LICENSE", "LICENSE-docs"
44  s.header_dir             = "ABI49_0_0RCTVibration"
45  s.pod_target_xcconfig    = {
46                               "USE_HEADERMAP" => "YES",
47                               "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
48                               "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
49                             }
50  s.frameworks             = "AudioToolbox"
51
52  s.dependency "RCT-Folly", folly_version
53  s.dependency "ABI49_0_0React-Codegen", version
54  s.dependency "ABI49_0_0ReactCommon/turbomodule/core", version
55  s.dependency "ABI49_0_0React-jsi", version
56  s.dependency "ABI49_0_0React-Core/RCTVibrationHeaders", version
57  s.dependency "ABI49_0_0React-NativeModulesApple", version
58end
59