Skip to content

FIX: OS X + Carthage - #164

Merged
garrettmoon merged 4 commits into
pinterest:masterfrom
justin:fix/osx-conditionals
Mar 18, 2016
Merged

FIX: OS X + Carthage#164
garrettmoon merged 4 commits into
pinterest:masterfrom
justin:fix/osx-conditionals

Conversation

@justin

@justin justin commented Mar 17, 2016

Copy link
Copy Markdown
Contributor

This does two things

  1. Make the target checks more explicit for tvOS & iOS vs OS X.
  2. Include the TargetConditionals.h file so that the PINImage macros play nicely when including a framework.

justin added 2 commits March 17, 2016 08:45
First we check to see if we are on the iOS or tvOS. If not, then we defer back to OS X.

TARGET_OS_IPHONE is a variant of TARGET_OS_MAC, which makes this whole thing really stupid.
@garrettmoon

Copy link
Copy Markdown
Collaborator

Do we need to check for WATCH_OS anywhere?

Separately, can you make an macro that expands to all the other targets? I.E.

#define PIN_TARGET_IOS (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_TV)

@garrettmoon

Copy link
Copy Markdown
Collaborator

Thank you for doing this!

@justin

justin commented Mar 18, 2016

Copy link
Copy Markdown
Contributor Author

Are you wanting to support watchOS? :) I left it out because I didn't think it was a supported platform.

Make it easier to differentiate between Mac and iOS / tvOS targets.
@garrettmoon

Copy link
Copy Markdown
Collaborator

Ha, you're right, I was thinking PINCache.

@garrettmoon

Copy link
Copy Markdown
Collaborator

Sorry to ask for one more change: Can you change the @imports back to #imports? @import doesn't work in Obj-C++ projects.

@justin

justin commented Mar 18, 2016

Copy link
Copy Markdown
Contributor Author

Done!

@garrettmoon
garrettmoon merged commit 4099060 into pinterest:master Mar 18, 2016
@garrettmoon

Copy link
Copy Markdown
Collaborator

Thanks for doing this @justin!

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

Successfully merging this pull request may close these issues.

2 participants