Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix performClosureAfterDelay issue for iOS 10 #98

Open
wants to merge 1 commit into
base: swift
Choose a base branch
from

Conversation

robertbabington
Copy link

After upgrading to Xcode 8 and automatically converting the codebase for iOS 10, the performClosureAfterDelay method causes a build error. Even if you don't do this automatic conversion you can get a dispatch_block_t is unavailable in swift error.

Xcode recommended converting closure from dispatch_block_t to () -> ()? but that didn't work, instead I converted to an optional closure: (() -> ())?

http://evgenii.com/blog/optional-trailing-closures-in-swift/

After upgrading to Xcode 8 and automatically converting the codebase for iOS 10, the `performClosureAfterDelay` method causes a build error. Even if you don't do this automatic conversion you can get a `dispatch_block_t is unavailable in swift` error.

Xcode recommended converting `closure` from `dispatch_block_t` to `() -> ()?` but that didn't work, instead I converted to an optional closure: `(() -> ())?`

http://evgenii.com/blog/optional-trailing-closures-in-swift/
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant