-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e427a1
commit dfe7c56
Showing
5 changed files
with
134 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export NODE_BINARY=/private/var/folders/jd/67zkvtb16kq6d4pqn3bcjrhr0000gn/T/xfs-fbe94b7a/node | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
example/ios/IosModalExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,132 @@ | ||
require "json" | ||
require 'json' | ||
|
||
package = JSON.parse(File.read(File.join(__dir__, "package.json"))) | ||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' | ||
package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
|
||
reactNativeVersion = '0.0.0' | ||
begin | ||
reactNativeVersion = `node --print "require('react-native/package.json').version"` | ||
rescue | ||
reactNativeVersion = '0.0.0' | ||
end | ||
|
||
reactNativeTargetVersion = reactNativeVersion.split('.')[1].to_i | ||
|
||
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' | ||
fabric_compiler_flags = '-DRN_FABRIC_ENABLED -DRCT_NEW_ARCH_ENABLED' | ||
folly_version = '2022.05.16.00' | ||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -Wno-comma -Wno-shorten-64-to-32' | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "react-native-ios-modal" | ||
s.version = package["version"] | ||
s.summary = package["description"] | ||
s.homepage = package["homepage"] | ||
s.license = package["license"] | ||
s.authors = package["author"] | ||
s.name = "react-native-ios-modal" | ||
s.version = package["version"] | ||
s.summary = package["description"] | ||
s.homepage = package["homepage"] | ||
s.license = package["license"] | ||
s.authors = package["author"] | ||
|
||
s.platforms = { :ios => min_ios_version_supported } | ||
s.source = { :git => "https://github.com/dominicstop/react-native-ios-modal.git", :tag => "#{s.version}" } | ||
|
||
s.swift_version = '5.4' | ||
|
||
s.static_framework = true | ||
s.header_dir = 'react-native-ios-modal' | ||
|
||
header_search_paths = [ | ||
'"$(PODS_ROOT)/boost"', | ||
'"$(PODS_ROOT)/DoubleConversion"', | ||
'"$(PODS_ROOT)/RCT-Folly"', | ||
'"${PODS_ROOT}/Headers/Public/React-hermes"', | ||
'"${PODS_ROOT}/Headers/Public/hermes-engine"', | ||
'"${PODS_ROOT}/Headers/Private/React-Core"', | ||
'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', | ||
'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-modal/Swift Compatibility Header"', | ||
#'"${PODS_ROOT}/Headers/Public/react-native-ios-utilities"', | ||
#'"${PODS_ROOT}/Headers/Private/react-native-ios-utilities"', | ||
#'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', | ||
] | ||
|
||
# Swift/Objective-C compatibility | ||
s.pod_target_xcconfig = { | ||
'USE_HEADERMAP' => 'YES', | ||
'DEFINES_MODULE' => 'YES', | ||
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20', | ||
'SWIFT_COMPILATION_MODE' => 'wholemodule', | ||
'HEADER_SEARCH_PATHS' => header_search_paths.join(' '), | ||
"FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"", | ||
'OTHER_SWIFT_FLAGS' => "$(inherited) #{fabric_enabled ? fabric_compiler_flags : ''}" | ||
} | ||
user_header_search_paths = [ | ||
'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', | ||
'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/**"', | ||
'"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-modal/Swift Compatibility Header"', | ||
|
||
|
||
#'"$(PODS_ROOT)/Headers/Private/react-native-ios-utilities"', | ||
#'"$(PODS_ROOT)/Headers/Public/react-native-ios-utilities"', | ||
|
||
'"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging"', | ||
'"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers"', | ||
'"$(PODS_ROOT)/Headers/Private/Yoga"', | ||
] | ||
if fabric_enabled && ENV['USE_FRAMEWORKS'] | ||
user_header_search_paths << "\"$(PODS_ROOT)/DoubleConversion\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"" | ||
user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"" | ||
end | ||
|
||
s.user_target_xcconfig = { | ||
"HEADER_SEARCH_PATHS" => user_header_search_paths, | ||
} | ||
|
||
# s.xcconfig = { | ||
# 'HEADER_SEARCH_PATHS' => [ | ||
# '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', | ||
# '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/**"', | ||
# ], | ||
# } | ||
|
||
s.platforms = { :ios => min_ios_version_supported } | ||
s.source = { :git => "https://github.com/dominicstop/react-native-ios-modal.git", :tag => "#{s.version}" } | ||
compiler_flags = folly_compiler_flags + ' ' + "-DREACT_NATIVE_TARGET_VERSION=#{reactNativeTargetVersion}" | ||
if ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1' | ||
compiler_flags += ' -DUSE_HERMES' | ||
end | ||
|
||
s.source_files = "ios/**/*.{h,m,mm}" | ||
s.dependency 'React-Core' | ||
s.dependency 'ReactCommon/turbomodule/core' | ||
s.dependency 'React-RCTAppDelegate' if reactNativeTargetVersion >= 71 | ||
s.dependency 'React-NativeModulesApple' if reactNativeTargetVersion >= 72 | ||
|
||
s.dependency 'react-native-ios-utilities' | ||
s.dependency 'DGSwiftUtilities' | ||
s.dependency 'ComputableLayout' | ||
|
||
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. | ||
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. | ||
if respond_to?(:install_modules_dependencies, true) | ||
install_modules_dependencies(s) | ||
else | ||
s.dependency "React-Core" | ||
|
||
# Don't install the dependencies when we run `pod install` in the old architecture. | ||
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then | ||
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" | ||
s.pod_target_xcconfig = { | ||
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", | ||
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", | ||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" | ||
} | ||
s.dependency "React-RCTFabric" | ||
s.dependency "React-Codegen" | ||
s.dependency "RCT-Folly" | ||
s.dependency "RCTRequired" | ||
s.dependency "RCTTypeSafety" | ||
s.dependency "ReactCommon/turbomodule/core" | ||
end | ||
if fabric_enabled | ||
compiler_flags << ' ' << fabric_compiler_flags | ||
|
||
s.dependency 'React-RCTFabric' | ||
s.dependency 'RCT-Folly', folly_version | ||
end | ||
|
||
unless defined?(install_modules_dependencies) | ||
# `install_modules_dependencies` is defined from react_native_pods.rb. | ||
# when running with `pod ipc spec`, this method is not defined and we have to require manually. | ||
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") | ||
end | ||
install_modules_dependencies(s) | ||
|
||
s.source_files = 'ios/**/*.{h,m,mm,swift,cpp}', 'common/cpp/**/*.{h,cpp}' | ||
|
||
exclude_files = ['ios/Tests/'] | ||
if !fabric_enabled | ||
exclude_files.append('ios/Fabric/') | ||
exclude_files.append('common/cpp/fabric/') | ||
end | ||
|
||
s.exclude_files = exclude_files | ||
s.compiler_flags = compiler_flags | ||
s.private_header_files = ['ios/**/*+Private.h', 'ios/**/Swift.h'] | ||
end |