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

Error building SDK v7.1.1 in a macOS app #311

Closed
shadone opened this issue Oct 22, 2020 · 1 comment
Closed

Error building SDK v7.1.1 in a macOS app #311

shadone opened this issue Oct 22, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@shadone
Copy link

shadone commented Oct 22, 2020

Current Behavior

Adding Amplitude (via SPM) version 7.1.1 shows this compilation error:

/Users/denis/Library/Developer/Xcode/DerivedData/Foobar-awgcdxfkjlfukvbohsvthoiwjurr/SourcePackages/checkouts/Amplitude-iOS/Sources/Amplitude/AMPInfoViewController.h:26:9: UIKit is not available when building for macOS. Consider using #if !TARGET_OS_OSX to conditionally import this framework, first importing TargetConditionals.h if necessary.

/Users/denis/Library/Developer/Xcode/DerivedData/Foobar-awgcdxfkjlfukvbohsvthoiwjurr/SourcePackages/checkouts/Amplitude-iOS/Sources/Amplitude/AMPEventExplorer.m:27:9: UIKit is not available when building for macOS. Consider using #if !TARGET_OS_OSX to conditionally import this framework, first importing TargetConditionals.h if necessary.

Possible Solution

Downgrading back to 7.0.1 fixes the issue.

Steps to Reproduce

  1. Create a new macOS App project
  2. Add Amplitude as a SPM dependency (File->Swift Packages->Add Package Dependency add https://github.com/amplitude/Amplitude-iOS)
  3. Try to build
  4. Error!

Environment

  • OS Version: macOS 10.15.4
  • Xcode: 12.0.1
@shadone shadone added the bug Something isn't working label Oct 22, 2020
@jooohhn
Copy link
Contributor

jooohhn commented Oct 22, 2020

Thanks for the report, it's related to #298. Will try to get a fix out today

@jooohhn jooohhn closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants