PhoneNumberKit
PhoneNumberKit copied to clipboard
Build fails with default target library linking configuration
New Issue Checklist
- [x] Updated PhoneNumberKit to the latest version
- [ ] Phone number formatted correctly on JavaScript version
- [x] I searched for existing GitHub issues
Steps to reproduce
- Add PhoneNumberKit as a dependency through SPM
- Build project for macOS w/ Apple Silicon (cannot confirm for Intel/Universal)
Expected result
- Project should build without changes to target build configuration
- Project does build successfully if "PhoneNumberKit-Dynamic" and "PhoneNumberKit-Static" are removed from "Link Binary With Libraries" under target Build Phases, leaving only "PhoneNumberKit"
Actual result
- Build fails with error:
clang: error: no such file or directory: '/Users/lcadmin/Library/Developer/Xcode/DerivedData/[...]/Build/Products/Debug/PackageFrameworks/PhoneNumberKit-Dynamic.framework/Versions/A/PhoneNumberKit-Dynamic'
Environment
Building for Apple Silicon macOS Added through SPM
I understand your confusion, however, this is actually to be expected. When adding a dependency that offers both Dynamic and Static options, it's necessary to choose just one.
What you've done is indeed correct. You appropriately removed "PhoneNumberKit-Dynamic" and "PhoneNumberKit-Static" from the "Link Binary With Libraries" to maintain the default SPM option. Alternatively, you could choose to keep only Dynamic or only Static.
Ultimately, the choice should be guided by the specific requirements of your app. Hope this clarifies the matter for you.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.