Skip to content

Allow use in application extensions#55

Merged
glaszig merged 2 commits into
glaszig:masterfrom
simonboots:applicationExtensionAPIOnly
Apr 1, 2017
Merged

Allow use in application extensions#55
glaszig merged 2 commits into
glaszig:masterfrom
simonboots:applicationExtensionAPIOnly

Conversation

@simonboots

Copy link
Copy Markdown
Contributor

In order to safely use KZPropertyMapper in application extensions, APPLICATION_EXTENSION_API_ONLY needs to be set to YES. This does not have any effect on non-extension bundles.

@glaszig

glaszig commented Mar 1, 2017

Copy link
Copy Markdown
Owner

KZPropertyMapper?

@simonboots

Copy link
Copy Markdown
Contributor Author

Sorry, I meant SZTextView. I raised a similar PR for KZPropertyMapper and must have made a copy and paste mistake.

@simonboots

Copy link
Copy Markdown
Contributor Author

Are you not interested in taking this change?

@glaszig

glaszig commented Mar 13, 2017 via email

Copy link
Copy Markdown
Owner
@simonboots

Copy link
Copy Markdown
Contributor Author

Great, let me know if you have any questions.

@glaszig

glaszig commented Mar 30, 2017

Copy link
Copy Markdown
Owner

alright.

  • are you using cocoapods?
  • wouldn't it be better to have different targets for iOS and app extensions?
  • apps which have this variable set to NO will still be able to link this library?
@simonboots

Copy link
Copy Markdown
Contributor Author

are you using cocoapods?

I am using Carthage

wouldn't it be better to have different targets for iOS and app extensions?

If you're not using UIApplication.shared or any other APIs that aren't allowed in app extensions, I don't think this is necessary. Once you start using one of those APIs (Xcode will tell you) you can always create another target. But until then, it would only make clients have to ship your framework twice (with the same binary). There is no benefit to it (yet).

apps which have this variable set to NO will still be able to link this library?

Yes, of course. Non-extension bundles can still link against and use the library. This flag purely indicates that this framework is safe to use in extensions. It has no effect when used in regular applications.

@glaszig glaszig merged commit ff4a6c9 into glaszig:master Apr 1, 2017
@glaszig

glaszig commented Apr 1, 2017

Copy link
Copy Markdown
Owner

sounds reasonable. thanks a bunch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants