-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add SPM support with XCF #789
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8bb38e1
add SPM support with XCF
julepka 42d29fd
add swift SPM test project
julepka f7c8b8d
add macOS swift SPM example, updated iOS one
julepka ef2db35
updates per pr comments
julepka d2967bf
Merge branch 'master' into spm-xcf-support
julepka f81f9e8
removed cl-openssl from Themis.xcodeproj + edits per pr comments + ex…
julepka acd55c6
removed example projects
julepka 7f1bfd3
updated xcodeproj version
julepka 5b3f333
updated Package.swift
julepka 055dd49
updated changelog
julepka 3bcd864
Update CHANGELOG.md
julepka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Shebang to explicitly use bash and not break on macOS boxes with zsh as default shell. | ||
# | ||
# After that you usually describe what this script is for and how to use it. In particular, | ||
# what it expects the current directory to be. (That's more important if it's it "scripts".) | ||
ilammy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
set -eu # common flags to ensure that the shell does not ignore failures | ||
|
||
BUILD_PATH=build | ||
output_dir=$BUILD_PATH/xcf_output | ||
ilammy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
cd .. | ||
repo_root_path=$(pwd) | ||
ilammy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
mkdir $BUILD_PATH | ||
mkdir $output_dir | ||
mkdir $output_dir/archives | ||
mkdir $output_dir/iphoneos | ||
mkdir $output_dir/macosx | ||
ilammy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
xcodebuild archive \ | ||
-scheme "Themis (iOS)" \ | ||
-destination="iOS" \ | ||
-archivePath $output_dir/archives/ios.xcarchive \ | ||
-derivedDataPath $output_dir/iphoneos \ | ||
-sdk iphoneos \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | ||
|
||
xcodebuild archive \ | ||
-scheme "Themis (iOS)" \ | ||
-destination="iOS Simulator" \ | ||
-archivePath $output_dir/archives/iossimulator.xcarchive \ | ||
-derivedDataPath $output_dir/iphoneos \ | ||
-sdk iphonesimulator \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | ||
|
||
xcodebuild archive \ | ||
-scheme "Themis (macOS)" \ | ||
-destination="macOS" \ | ||
-archivePath $output_dir/archives/macosx.xcarchive \ | ||
-derivedDataPath $output_dir/macosx \ | ||
-sdk macosx \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | ||
|
||
xcodebuild -create-xcframework \ | ||
-framework $output_dir/archives/ios.xcarchive/Products/Library/Frameworks/themis.framework \ | ||
-framework $output_dir/archives/iossimulator.xcarchive/Products/Library/Frameworks/themis.framework \ | ||
-framework $output_dir/archives/macosx.xcarchive/Products/Library/Frameworks/themis.framework \ | ||
-output $output_dir/themis.xcframework | ||
|
||
rm -rf $output_dir/archives | ||
rm -rf $output_dir/iphoneos | ||
rm -rf $output_dir/macosx | ||
|
||
cd $output_dir | ||
zip -r themis.xcframework.zip themis.xcframework | ||
|
||
rm -rf themis.xcframework | ||
|
||
cd "$repo_root_path" | ||
echo "XCF Checksum:" | ||
swift package compute-checksum $output_dir/themis.xcframework.zip |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I wanted to ask, “Where is
cl-openssl
?“ But then I realized that it's not here because themis.xcframework will be statically linked to openssl.xcframework, hence users of themis.xcframework don't need to install shared OpenSSL.