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

Fails to import with swift package management in xcode #37

Open
sedurCode opened this issue Nov 20, 2019 · 7 comments
Open

Fails to import with swift package management in xcode #37

sedurCode opened this issue Nov 20, 2019 · 7 comments

Comments

@sedurCode
Copy link

When creating a swift application in Xcode 11 for macOS, a package.swift file is not created and linked with the project. As such I am not sure how to follow the documentation for how to include this package in my project.

As per this doc: https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app
It would appear apple are very keen for users to use their tool for dependency management, but as someone new to swift it obscures work-arounds.

This package repository is not accepted as a 'swift packages' dependency using the method in the article, due to the dependency on CFreeType:
image

Is there a way to add this package to my project given this state of affairs?

Thanks

@KarthikRIyer
Copy link
Owner

@sedurCode thanks for pointing out this issue! I'm not sure how we could resolve this at the moment. I use Swift on Linux and am new to XCode. I'll try to look into it and revert back.

@KarthikRIyer
Copy link
Owner

KarthikRIyer commented Nov 27, 2019

@sedurCode #42 might solve this issue. Can you try importing from master?

@sedurCode
Copy link
Author

Successfully imported from exemplary of karwa's branch. will now try from master of this branch

@sedurCode
Copy link
Author

Successfully imported from master of this repo.
Now need to get the package working.
Thank you for addressing this :) 👍

@sedurCode
Copy link
Author

Although I can import and compile a program that uses example code from the README, I now get the error:
dyld: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Referenced from:
.....
Reason: no suitable image found. Did find:
/usr/local/opt/freetype/lib/libfreetype.6.dylib: code signature in (/usr/local/opt/freetype/lib/libfreetype.6.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
/usr/local/lib/libfreetype.6.dylib: code signature in (/usr/local/lib/libfreetype.6.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
/usr/local/Cellar/freetype/2.10.0/lib/libfreetype.6.dylib: code signature in (/usr/local/Cellar/freetype/2.10.0/lib/libfreetype.6.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

@KarthikRIyer
Copy link
Owner

@sedurCode do you have freetype installed on your system? If not could you try again after installing it? In case you're unable to install it using homebrew you can also install it from the source that you'll find here: https://www.freetype.org/download.html

@sedurCode
Copy link
Author

I only have it installed with homebrew, so I will try and alternative source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants