Skip to content

Commit 1ce147c

Browse files
committed
add generate xcframework scripts
1 parent afba54a commit 1ce147c

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.PHONY: help
2+
.DEFAULT_GOAL := help
3+
4+
help:
5+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
6+
7+
setup: ## setup
8+
@carthage update --platform iOS --no-use-binaries
9+
10+
generate_xcframeworks: ## Generate XCFrameworks.
11+
@./scripts/generate_xcframeworks.sh

Products/RIBsTreeViewerClient.xcframework/Info.plist

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66
<array>
77
<dict>
88
<key>LibraryIdentifier</key>
9-
<string>ios-armv7_arm64</string>
9+
<string>ios-x86_64_i386-simulator</string>
1010
<key>LibraryPath</key>
1111
<string>RIBsTreeViewerClient.framework</string>
1212
<key>SupportedArchitectures</key>
1313
<array>
14-
<string>armv7</string>
15-
<string>arm64</string>
14+
<string>x86_64</string>
15+
<string>i386</string>
1616
</array>
1717
<key>SupportedPlatform</key>
1818
<string>ios</string>
19+
<key>SupportedPlatformVariant</key>
20+
<string>simulator</string>
1921
</dict>
2022
<dict>
2123
<key>LibraryIdentifier</key>
22-
<string>ios-x86_64_i386-simulator</string>
24+
<string>ios-armv7_arm64</string>
2325
<key>LibraryPath</key>
2426
<string>RIBsTreeViewerClient.framework</string>
2527
<key>SupportedArchitectures</key>
2628
<array>
27-
<string>x86_64</string>
28-
<string>i386</string>
29+
<string>armv7</string>
30+
<string>arm64</string>
2931
</array>
3032
<key>SupportedPlatform</key>
3133
<string>ios</string>
32-
<key>SupportedPlatformVariant</key>
33-
<string>simulator</string>
3434
</dict>
3535
</array>
3636
<key>CFBundlePackageType</key>

scripts/generate_xcframeworks.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
# Delete existing file
4+
5+
rm -r ./Products/RIBsTreeViewerClient.xcframework
6+
7+
# Generate RIBsTreeViewerClient
8+
9+
xcodebuild \
10+
'ENABLE_BITCODE=YES' \
11+
'BITCODE_GENERATION_MODE=bitcode' \
12+
'OTHER_CFLAGS=-fembed-bitcode' \
13+
'BUILD_LIBRARY_FOR_DISTRIBUTION=YES' \
14+
'SKIP_INSTALL=NO' \
15+
archive \
16+
-project RIBsTreeViewerClient.xcodeproj \
17+
-scheme 'RIBsTreeViewerClient' \
18+
-destination 'generic/platform=iOS Simulator' \
19+
-configuration 'Release' \
20+
-archivePath 'build/RIBsTreeViewerClient-iOS-Simulator.xcarchive'
21+
22+
23+
xcodebuild \
24+
'ENABLE_BITCODE=YES' \
25+
'BITCODE_GENERATION_MODE=bitcode' \
26+
'OTHER_CFLAGS=-fembed-bitcode' \
27+
'BUILD_LIBRARY_FOR_DISTRIBUTION=YES' \
28+
'SKIP_INSTALL=NO' \
29+
archive \
30+
-project RIBsTreeViewerClient.xcodeproj \
31+
-scheme 'RIBsTreeViewerClient' \
32+
-destination 'generic/platform=iOS' \
33+
-configuration 'Release' \
34+
-archivePath 'build/RIBsTreeViewerClient-iOS.xcarchive'
35+
36+
37+
xcodebuild \
38+
-create-xcframework \
39+
-framework 'build/RIBsTreeViewerClient-iOS-Simulator.xcarchive/Products/Library/Frameworks/RIBsTreeViewerClient.framework' \
40+
-framework 'build/RIBsTreeViewerClient-iOS.xcarchive/Products/Library/Frameworks/RIBsTreeViewerClient.framework' \
41+
-output 'Products/RIBsTreeViewerClient.xcframework'

0 commit comments

Comments
 (0)