Skip to content

Swift/1.2 - import ObjectiveC #28

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

Merged
merged 2 commits into from
Apr 10, 2015
Merged

Conversation

DanielAsher
Copy link
Contributor

import ObjectiveC allows SwiftTask.swift to be included in the Sources folder of a playground.

@DanielAsher
Copy link
Contributor Author

my first pull request, so do let me know if anything is not quite right and I should resubmit.

@inamiy
Copy link
Member

inamiy commented Apr 10, 2015

Thanks, but why do you need import ObjectiveC?
It seems to work fine without it.

Ref: Importing Custom Frameworks Into a Playground

@DanielAsher
Copy link
Contributor Author

8.3 allows for a Source import mechanism that required the implicit dependency be made explicit. https://github.com/DanielAsher/SwiftTask-in-Playground-Sources-Folder demonstrates the issue, uncomment 'import ObjectiveC' to enable SwiftTask to build and load.

@inamiy
Copy link
Member

inamiy commented Apr 10, 2015

Thanks for providing a demo 👍
It looks like it's safer to declare import ObjectiveC explicitly just because SwiftTask uses objc_sync_enter/objc_sync_exit.

P.S.
This might also solve the issue in ReactKit/ReactKit#16 where ReactKit build failed due to error: use of unresolved identifier 'objc_sync_enter'.

inamiy added a commit that referenced this pull request Apr 10, 2015
Swift/1.2 - import ObjectiveC
@inamiy inamiy merged commit 1979df7 into ReactKit:swift/1.2 Apr 10, 2015
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