Skip to content

Commit

Permalink
Adds support for use_frameworks!
Browse files Browse the repository at this point in the history
RE: #90
  • Loading branch information
lemaire31 committed Jan 29, 2024
1 parent d2d8fb6 commit 5071014
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ios/StarIo10.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
58B511F01A9E6C8500147676 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]" = "$(SRCROOT)/../../node_modules/react-native-star-io10/ios/libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/*.*";
Expand Down Expand Up @@ -402,6 +403,7 @@
58B511F11A9E6C8500147676 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
EXCLUDED_ARCHS = x86_64;
EXCLUDED_SOURCE_FILE_NAMES = "$(SRCROOT)/../../node_modules/react-native-star-io10/ios/libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/*.*";
FRAMEWORK_SEARCH_PATHS = (
Expand Down
18 changes: 16 additions & 2 deletions react-native-star-io10.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React"
s.pod_target_xcconfig = {
s.pod_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphoneos*]' => 'x86_64',
'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*]' => '$(SRCROOT)/../../node_modules/react-native-star-io10/ios/libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/*.*',
'FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]' => '$(SRCROOT)/libs/** $(SRCROOT)/../../node_modules/react-native-star-io10/ios/libs $(SRCROOT)/../../node_modules/react-native-star-io10/ios/libs/StarIO10.xcframework/ios-arm64',
Expand All @@ -29,6 +29,20 @@ Pod::Spec.new do |s|
# ...
# s.dependency "..."

if ENV['USE_FRAMEWORKS']
header_search_path = [
'$(SRCROOT)/../../node_modules/react/** $(SRCROOT)/../../node_modules/react-native/**'
]

exclude_source_file_name = [
'libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/Headers/*.h libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/PrivateHeaders/*.h'
]

s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => header_search_path.join(" "),
"EXCLUDED_SOURCE_FILE_NAMES" => exclude_source_file_name.join(" ")
}
end

s.vendored_frameworks = 'ios/libs/StarIO10.xcframework'
end

0 comments on commit 5071014

Please sign in to comment.