-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carthage 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
}
main I 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
Chronology
release version is not available now.I installed with
master
branch by usingCarthage
, but it is useful to release the current version.Thanks.
The text was updated successfully, but these errors were encountered: