Skip to content

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