Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCarthage supports #9
Comments
|
There is ongoing work (Carthage/Carthage#1945) to support this from Carthage's side, but it seems to be a tricky problem to solve. In the meantime we could attach pre-built frameworks to releases, which Carthage can pick up instead of building the library from scratch. Some automation would be needed for that, though. |
|
This script shows how we could build a universal framework for iOS: #!/usr/bin/env bash
set -o nounset
set -o errexit
readonly FRAMEWORK=Time
readonly BUILD=build
readonly FRAMEWORK_PATH=${FRAMEWORK}.framework
function prepare_environment {
swift package generate-xcodeproj
rm -rf ${BUILD}
rm -f ${FRAMEWORK}-iOS.framework.tar.gz
xcodebuild clean
}
function archive_platform_frameworks {
xcodebuild archive -sdk iphoneos SYMROOT=${BUILD}
xcodebuild build -sdk iphonesimulator SYMROOT=${BUILD}
cp -RL ${BUILD}/Release-iphoneos ${BUILD}/Release-universal
cp -RL ${BUILD}/Release-iphonesimulator/${FRAMEWORK_PATH}/Modules/${FRAMEWORK}.swiftmodule/* \
${BUILD}/Release-universal/${FRAMEWORK_PATH}/Modules/${FRAMEWORK}.swiftmodule
}
function generate_universal_framework {
lipo -create \
${BUILD}/Release-iphoneos/${FRAMEWORK_PATH}/${FRAMEWORK} \
${BUILD}/Release-iphonesimulator/${FRAMEWORK_PATH}/${FRAMEWORK} \
-output ${BUILD}/Release-universal/${FRAMEWORK_PATH}/${FRAMEWORK}
}
function package_framework_and_dsym {
tar -czv -C ${BUILD}/Release-universal -f ${FRAMEWORK}-iOS.tar.gz \
${FRAMEWORK_PATH} ${FRAMEWORK_PATH}.dSYM
}
function main {
prepare_environment
archive_platform_frameworks
generate_universal_framework
package_framework_and_dsym
}
mainI attached the resulting framework to the 0.9.0 release of my fork and tested using an example iOS project. @davedelong Do you think it's worth continuing in this direction? |
|
This would be a great addition! If you could get this to work via Github Actions (perhaps with this? https://github.com/actions/create-release) I'll merge it in. |
Hi
Thanks for this great library.
The
Chronologyrelease version is not available now.I installed with
masterbranch by usingCarthage, but it is useful to release the current version.Thanks.