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

Mark classes and methods unavailable for extensions #290

Merged
merged 7 commits into from
Jan 9, 2017

Conversation

felix-dumit
Copy link
Contributor

This is mostly relevant to when using cocoapods, as of version 1.1.0 you can no longer have a Podfile with a different subspec for the app target and extensions, i.e:

use_frameworks!

target 'TestApp' do
   pod "Bolts"
end

target 'Today' do
   pod "Bolts/Tasks"
end

[!] The 'Pods-TestApp' target has frameworks with conflicting names: bolts

So the solution is to use pod 'Bolts' for both targets.
In order to do that some methods/classes need to be marked as unavailable so the app is compilable.

@@ -143,7 +143,7 @@ - (BFTask *)followRedirects:(NSURL *)url {
}];
}

- (BFTask *)appLinkFromURLInBackground:(NSURL *)url {
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this here on top of adding it to the method definition in the BFAppLinkResolving protocol otherwise it would still complain.

Copy link
Member

@nlutsenko nlutsenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This does help solve some compilation problems.

@nlutsenko
Copy link
Member

Hey Felix, looks like this is failing some Travis tests...
I pushed a few small patches for travis configuration to master, so it should be all set and fixed now.
Any chance you can rebase this pull request, so we can merge it in?

@felix-dumit
Copy link
Contributor Author

@nlutsenko Ok just did 👍

@nlutsenko nlutsenko merged commit 73edcf9 into BoltsFramework:master Jan 9, 2017
laptobbe pushed a commit to prion-app/Bolts-ObjC that referenced this pull request Apr 28, 2017
* mark classes and methods unavailable for extensions

* Add BFVoid macro.

* Update BFTask.taskWithDelay to use BFVoid.

* Update xctoolchain to latest.

* Update projects to Xcode 8.2.

* Use Xcode 8.2 for Travis-CI.

* Remove automatic exception catching. (BoltsFramework#294)
@nlutsenko nlutsenko mentioned this pull request Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants