|
1 | 1 | #!/bin/bash |
2 | 2 | set -euo pipefail |
3 | 3 |
|
4 | | -configuration_suffix="${1-}" |
5 | | - |
6 | | -./scripts/build-xcframework-slice.sh "iphoneos" "Sentry" "-Dynamic" "mh_dylib" "$configuration_suffix" |
| 4 | +./scripts/build-xcframework-slice.sh "iphoneos" "Sentry" "-Dynamic" "mh_dylib" "V9" |
7 | 5 |
|
8 | 6 | ./scripts/assemble-xcframework.sh "Sentry" "-Dynamic" "" "iphoneos" "$(pwd)/Carthage/archive/Sentry-Dynamic/SDK_NAME.xcarchive" |
9 | 7 |
|
10 | 8 | # Delete private .swiftinterface files before running swift-api-digester |
11 | 9 | # This ensures only public interfaces are analyzed |
12 | 10 | find ./Sentry-Dynamic.xcframework -name "*.private.swiftinterface" -type f -delete |
13 | 11 |
|
14 | | -if [ "$configuration_suffix" = "V9" ]; then |
15 | | - FWROOT="./Sentry-Dynamic.xcframework/ios-arm64_arm64e/Sentry.framework" |
16 | | - for FRAME in Headers PrivateHeaders; do |
17 | | - HDRDIR="$FWROOT/${FRAME}" |
18 | | - for H in "$HDRDIR"/*.h; do |
19 | | - # unifdef will: |
20 | | - # - keep code under #if SDK_V9 (because of -D) |
21 | | - # - remove code under #else |
22 | | - # - strip away the #if/#else/#endif lines themselves |
23 | | - unifdef -D SDK_V9 -x 2 "$H" > "$H.tmp" |
24 | | - mv "$H.tmp" "$H" |
25 | | - done |
| 12 | +FWROOT="./Sentry-Dynamic.xcframework/ios-arm64_arm64e/Sentry.framework" |
| 13 | +for FRAME in Headers PrivateHeaders; do |
| 14 | + HDRDIR="$FWROOT/${FRAME}" |
| 15 | + for H in "$HDRDIR"/*.h; do |
| 16 | + # unifdef will: |
| 17 | + # - keep code under #if SDK_V9 (because of -D) |
| 18 | + # - remove code under #else |
| 19 | + # - strip away the #if/#else/#endif lines themselves |
| 20 | + unifdef -D SDK_V9 -x 2 "$H" > "$H.tmp" |
| 21 | + mv "$H.tmp" "$H" |
26 | 22 | done |
27 | | -fi |
| 23 | +done |
28 | 24 |
|
29 | 25 | xcrun --sdk iphoneos swift-api-digester \ |
30 | 26 | -dump-sdk \ |
31 | | - -o sdk_api${configuration_suffix:+"_${configuration_suffix}"}.json \ |
| 27 | + -o sdk_api_v9.json \ |
32 | 28 | -abort-on-module-fail \ |
33 | 29 | -avoid-tool-args \ |
34 | 30 | -avoid-location \ |
|
0 commit comments