我有一个Swift包,其结构如下:
我还需要生成一个通过Cocoapods进行分发的框架。以下是我在以前是Xcode框架项目时用来生成的内容-如果我直接从Swift包构建,我如何为Cocoapods生成框架?
xcodebuild archive \
-scheme roboflow-swift \
-archivePath "archives/roboflow-swift-iOS.xcarchive" \
-destination "generic/platform=iOS" \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-scheme roboflow-swift \
-archivePath "archives/roboflow-swift-iOS-simulator.xcarchive" \
-destination "generic/platform=iOS Simulator" \
-sdk iphonesimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework "archives/roboflow-swift-iOS.xcarchive/Products/Library/Frameworks/roboflow-swift.framework" \
-framework "archives/roboflow-swift-iOS-simulator.xcarchive/Products/Library/Frameworks/roboflow-swift.framework" \
-output "roboflow-swift.xcframework"