Skip to content

Commit

Permalink
specify no x86
Browse files Browse the repository at this point in the history
  • Loading branch information
phantomdon committed Aug 5, 2024
1 parent 2b93da3 commit 163accf
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 952 deletions.
42 changes: 6 additions & 36 deletions RNJuiceboxSdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ Pod::Spec.new do |s|

# Specify the vendored libraries for different architectures
s.vendored_libraries = [
'./target/aarch64-apple-ios/release/libjuicebox_sdk_ffi.a',
'./target/aarch64-apple-ios-sim/release/libjuicebox_sdk_ffi.a',
'./target/x86_64-apple-ios/release/libjuicebox_sdk_ffi.a'
'./libjuicebox_sdk_ffi.a'
]

s.dependency "JuiceboxSdk"

s.pod_target_xcconfig = {
'ARCHS[sdk=iphonesimulator*]' => 'arm64',
'ARCHS[sdk=iphoneos*]' => 'arm64',
}

# 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)
Expand All @@ -48,37 +51,4 @@ Pod::Spec.new do |s|
s.dependency "ReactCommon/turbomodule/core"
end
end

s.script_phase = {
:name => 'Select appropriate libjuicebox_sdk_ffi.a',
:script => <<-SCRIPT
echo "PODS_ROOT is set to: ${PODS_ROOT}"
echo "Current ARCHS: $ARCHS"
echo "Current EFFECTIVE_PLATFORM_NAME: $EFFECTIVE_PLATFORM_NAME"
if [[ "$ARCHS" == "x86_64" ]]; then
if [ -f "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/x86_64-apple-ios/release/libjuicebox_sdk_ffi.a" ]; then
cp "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/x86_64-apple-ios/release/libjuicebox_sdk_ffi.a" "${TARGET_BUILD_DIR}/${TARGET_NAME}.framework"
echo "Copied x86_64 library"
else
echo "x86_64 library not found"
fi
elif [[ "$ARCHS" == "arm64" && "$EFFECTIVE_PLATFORM_NAME" == "-iphonesimulator" ]]; then
if [ -f "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/aarch64-apple-ios-sim/release/libjuicebox_sdk_ffi.a" ]; then
cp "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/aarch64-apple-ios-sim/release/libjuicebox_sdk_ffi.a" "${TARGET_BUILD_DIR}/${TARGET_NAME}.framework"
echo "Copied arm64-sim library"
else
echo "arm64-sim library not found"
fi
elif [[ "$ARCHS" == "arm64" ]]; then
if [ -f "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/aarch64-apple-ios/release/libjuicebox_sdk_ffi.a" ]; then
cp "${PODS_ROOT}/../../../node_modules/@phantom/react-native-juicebox-sdk/target/aarch64-apple-ios/release/libjuicebox_sdk_ffi.a" "${TARGET_BUILD_DIR}/${TARGET_NAME}.framework"
echo "Copied arm64 library"
else
echo "arm64 library not found"
fi
else
echo "No matching architecture found"
fi
SCRIPT
}
end
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phantom/react-native-juicebox-sdk",
"version": "0.3.8",
"version": "0.3.9",
"description": "React native SDK for Juicebox",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
305 changes: 0 additions & 305 deletions target/aarch64-apple-ios-sim/release/include/juicebox_sdk_ffi.h

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 163accf

Please sign in to comment.