Amplitude-iOS icon indicating copy to clipboard operation
Amplitude-iOS copied to clipboard

Swift Package Manager build of Amplitude-iOS 5.2.0 fails modulemap generation

Open darylwyee opened this issue 4 years ago • 2 comments

Checklist I've searched for existing GitHub issues I've looked for existing answers on Stack Overflow I've read the Code of Conduct This issue is not security related and can safely be disclosed publicly on GitHub

Environment Xcode Version: 11.5 Swift Version: 5.1 (if issue is Swift related) Installation Platform & Version: [SPM] version 5.2

Goals Importing Amplitude-iOS as a Swift Package into our private package. .package(name: "Amplitude", url: "https://github.com/amplitude/Amplitude-iOS", .exact("5.2.0")), Running "swift build" yields error:

Resolving https://github.com/amplitude/Amplitude-iOS at 5.2.0 error: target 'Amplitude' failed modulemap generation; umbrella header defined at '/Users//dev/MTIShared/build/checkouts/Amplitude-iOS/Sources/Amplitude/Amplitude.h', but directories exist: /Users//dev/MTIShared/build/checkouts/Amplitude-iOS/Sources/Amplitude/SSLCertificatePinning; consider removing them [20:12:10]: Exit status: 1

Note that other packages import without issue.
Suggestions?

Steps to Reproduce Create a package and import Amplitude-iOS

run "swift build"

darylwyee avatar Jul 15 '20 03:07 darylwyee

Hey there. What happened with this? We're also looking into doing exactly this in our company project

mchirino89 avatar Mar 27 '23 11:03 mchirino89

Hey there. What happened with this? We're also looking into doing exactly this in our company project

For what it's worth, there's a way to do this that's briefly mentioned in the doc

CleanShot 2023-03-27 at 10 20 14@2x

Like so

CleanShot 2023-03-27 at 10 21 43@2x

Afterward, it's simply linking the project to the SPM and you're golden

CleanShot 2023-03-27 at 10 19 13@2x

mchirino89 avatar Mar 27 '23 13:03 mchirino89