This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Multi to single thread execution | |
| // https://stackoverflow.com/questions/47724198/sync-calls-from-swift-to-c-thread-unsafe-library/47764223#47764223 | |
| // Credits go to https://stackoverflow.com/users/819340/paulo-mattos | |
| import Foundation | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(10 * 60)) { | |
| print("Done") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Multi to single thread execution | |
| // Implemented via a run loop and a custom operation object reference passing | |
| import Foundation | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3000)) { | |
| print("Done") | |
| PlaygroundPage.current.finishExecution() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Multi to single thread execution | |
| // Credits go to https://www.reddit.com/r/swift/comments/7ijbt0/whats_a_good_way_to_make_sync_calls_from_swift_to/dr4iwxr/ | |
| import Foundation | |
| import PlaygroundSupport | |
| PlaygroundPage.current.needsIndefiniteExecution = true | |
| DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3000)) { | |
| print("Done") | |
| PlaygroundPage.current.finishExecution() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Post install script that ensures that NSPrincipalClass | |
| # is transferred from original info.plist to the pod generated info.plist. | |
| post_install do |installer| | |
| # Frameworks and their principal classes dictionary | |
| frameworks_classes = { | |
| 'FrameworkA' => 'FrameworkAPrincipalClassName', | |
| 'FrameworkB' => 'FrameworkBPrincipalClassName' | |
| } |