Skip to content
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

Swift Package Manager SPM support? #112

Open
mburda-bc opened this issue Dec 2, 2021 · 5 comments · May be fixed by #116
Open

Swift Package Manager SPM support? #112

mburda-bc opened this issue Dec 2, 2021 · 5 comments · May be fixed by #116
Labels
enhancement New feature or request

Comments

@mburda-bc
Copy link

When trying to use SPM I end up with this:

xcodebuild: error: Could not resolve package dependencies:
  Source files for target Wormholy should be located under 'Sources/Wormholy', or a custom sources path can be set with the 'path' property in Package.swift

Do you by any chance plan to support SPM?

@EvgenyKarkan
Copy link

Tried specifying the master branch - but still no luck.

@pmusolino
Copy link
Owner

You can find the reason here #82 (comment)

@pmusolino pmusolino added the enhancement New feature or request label Feb 22, 2022
@dingtianran
Copy link
Contributor

@pmusolino I think maybe you can make a pre-built XCFramework, then we can have a SPM source

@murraysagal
Copy link

@pmusolino I think the concerns you have in #82 (comment) might not be valid now. I think SPM has been enhanced to support all that.

@akovalov
Copy link

akovalov commented May 3, 2023

Here is the script to build an xcFramework file from the source. Just put it in the root and run zsh buildXCFramework.sh. The built xcFramework could be added to the project manually or placed in a repo with the SPM support.

buildXCFramework.sh

# buildXCFramework.sh

FW=Wormholy.framework
XFW=Wormholy.xcframework

# builds iOS slice
xcodebuild archive -scheme Wormholy-iOS -configuration Release -destination 'generic/platform=iOS' -archivePath "./archives/$FW-iphoneos.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO
# builds iOS simulator slice
xcodebuild archive -scheme Wormholy-iOS -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath "./archives/$FW-iphonesimulator.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO
# merges both into .xcframework
rm -rf "$XFW"
xcodebuild -create-xcframework -framework "./archives/$FW-iphonesimulator.xcarchive/Products/Library/Frameworks/$FW" \
                               -framework "./archives/$FW-iphoneos.xcarchive/Products/Library/Frameworks/$FW" \
                               -output "$XFW"

@ipavlidakis ipavlidakis linked a pull request Apr 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants