@soyio/soyio-rn-sdk 4.1.5-dev → 4.1.6-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ---------------------------------------------------------------------------
|
|
3
|
+
# prepare-facetec-xcframework.sh
|
|
4
|
+
#
|
|
5
|
+
# CocoaPods does not fully handle vendored xcframeworks in pods that also
|
|
6
|
+
# have source files (only aggregate-target pods like hermes-engine work
|
|
7
|
+
# automatically). This script works around two missing pieces:
|
|
8
|
+
# 1. Extract the correct platform slice before Swift compilation
|
|
9
|
+
# 2. Patch the consumer's embed-frameworks script so the dynamic framework
|
|
10
|
+
# is bundled inside the .app at runtime
|
|
11
|
+
# ---------------------------------------------------------------------------
|
|
12
|
+
set -e
|
|
13
|
+
|
|
14
|
+
# --- 1. Extract the correct xcframework slice for the current platform -----
|
|
15
|
+
"${PODS_ROOT}/Target Support Files/soyio_rn_sdk/soyio_rn_sdk-xcframeworks.sh"
|
|
16
|
+
|
|
17
|
+
# --- 2. Patch consumer embed-frameworks script -----------------------------
|
|
18
|
+
# CocoaPods generates Pods-<Target>-frameworks.sh to embed dynamic frameworks
|
|
19
|
+
# but omits FaceTecSDK. Append the install_framework call so the framework is
|
|
20
|
+
# copied into the .app bundle.
|
|
21
|
+
EMBED_LINE='install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/soyio_rn_sdk/FaceTecSDK.framework"'
|
|
22
|
+
for fw_script in "${PODS_ROOT}/Target Support Files"/Pods-*/Pods-*-frameworks.sh; do
|
|
23
|
+
[ -f "$fw_script" ] || continue
|
|
24
|
+
grep -q 'soyio_rn_sdk/FaceTecSDK' "$fw_script" && continue
|
|
25
|
+
awk -v line="$EMBED_LINE" '/^if.*COCOAPODS_PARALLEL_CODE_SIGN/{print line}1' "$fw_script" > "${fw_script}.tmp"
|
|
26
|
+
mv "${fw_script}.tmp" "$fw_script"
|
|
27
|
+
chmod +x "$fw_script"
|
|
28
|
+
done
|
package/soyio_rn_sdk.podspec
CHANGED
|
@@ -15,7 +15,6 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source_files = 'ios/**/*.{h,m,mm,swift}'
|
|
16
16
|
s.exclude_files = 'ios/Frameworks/**/*', 'ios/Frameworks-dev/**/*'
|
|
17
17
|
|
|
18
|
-
# Font and image resources
|
|
19
18
|
s.resource_bundles = {
|
|
20
19
|
'SoyioRnSdk' => [
|
|
21
20
|
'assets/fonts/**/*.ttf',
|
|
@@ -23,23 +22,31 @@ Pod::Spec.new do |s|
|
|
|
23
22
|
]
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
#
|
|
25
|
+
# FaceTecSDK is a dynamic xcframework. CocoaPods doesn't fully handle
|
|
26
|
+
# vendored xcframeworks in pods with source files, so we use a script phase
|
|
27
|
+
# to extract the correct slice and patch the consumer's embed script.
|
|
28
|
+
# See scripts/prepare-facetec-xcframework.sh for details.
|
|
27
29
|
s.vendored_frameworks = 'ios/Frameworks/FaceTecSDK.xcframework'
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
s.script_phase = {
|
|
32
|
+
:name => 'Extract and prepare FaceTecSDK XCFramework',
|
|
33
|
+
:script => 'bash "${PODS_TARGET_SRCROOT}/scripts/prepare-facetec-xcframework.sh"',
|
|
34
|
+
:execution_position => :before_compile
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
s.pod_target_xcconfig = {
|
|
31
38
|
'DEFINES_MODULE' => 'YES',
|
|
32
|
-
'SWIFT_VERSION' => '5.0'
|
|
39
|
+
'SWIFT_VERSION' => '5.0',
|
|
40
|
+
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/soyio_rn_sdk"'
|
|
33
41
|
}
|
|
34
42
|
|
|
35
|
-
#
|
|
43
|
+
# Propagate FaceTecSDK to consumer so the linker resolves symbols
|
|
36
44
|
s.user_target_xcconfig = {
|
|
37
|
-
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/React-Core"'
|
|
45
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/React-Core"',
|
|
46
|
+
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/soyio_rn_sdk"',
|
|
47
|
+
'OTHER_LDFLAGS' => '$(inherited) -framework "FaceTecSDK"'
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
# Swift version
|
|
41
50
|
s.swift_version = '5.0'
|
|
42
|
-
|
|
43
|
-
# React Native dependency
|
|
44
51
|
s.dependency 'React-Core'
|
|
45
52
|
end
|