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

Unable to build framework when including this via SPM #246

Open
civatrix opened this issue Jun 8, 2023 · 4 comments
Open

Unable to build framework when including this via SPM #246

civatrix opened this issue Jun 8, 2023 · 4 comments

Comments

@civatrix
Copy link

civatrix commented Jun 8, 2023

Describe the bug
I'm building an XCFramework that includes this as a dependency via SPM. Because of a bug in the swift compiler, I'm unable to build my framework with yours included. tl;dr The module shares a name with a class within the module and Swift can't generate a correct swiftinterface file

Ideally if you could change the name of the module to something like InputBarAccessoryViewKit that would fix the issue until the compiler bug is resolved.

To Reproduce

  1. Create a new Framework project in Xcode 14.3
  2. Add https://github.com/nathantannar4/InputBarAccessoryView as a package (File -> Add Packages...)
  3. From the Terminal run xcodebuild archive -scheme <Name> -archivePath archives -destination "generic/platform=iOS" -sdk iphoneos BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  4. You should get an error like
The following build commands failed:
	SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ InputBarAccessoryView.private.swiftinterface ... (in target 'InputBarAccessoryView' from project 'InputBarAccessoryView')

Screenshots
Screenshot 2023-06-07 at 5 56 32 PM

Expected behavior
The archive command should succeed

Environment

  • What version of InputBarAccessoryView are you using? 6.2.0
  • What version of iOS are you running on? N/A
  • What version of Swift are you running on? 5.0
  • What device(s) are you testing on? Are these simulators? N/A
  • Is the issue you're experiencing reproducible in the example app? N/A

Additional context
Add any other context about the problem here.

@barakwei
Copy link

barakwei commented Dec 5, 2023

I see the same issue

@nathantannar4
Copy link
Owner

Are you able to use SPMs module aliases feature now?

@barakwei
Copy link

barakwei commented Dec 6, 2023

I'm not using SPM at all, I'm just trying to build the framework as a binary with BUILD_LIBRARY_FOR_DISTRIBUTION=YES, as the author suggested.

@jposes22
Copy link

To solve this problem execute the archive with OTHER_SWIFT_FLAGS='-no-verify-emitted-module-interface'
Like:
xcodebuild archive -scheme <Name> -archivePath archives -destination "generic/platform=iOS" -sdk iphoneos BUILD_LIBRARY_FOR_DISTRIBUTION=YES OTHER_SWIFT_FLAGS='-no-verify-emitted-module-interface'

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

4 participants