Delay Actions in Swift

dispatch_after() is the standard way of delaying actions. indicator.startAnimating() let delay = 4.5 * Double(NSEC_PER_SEC) let time = dispatch_time(DISPATCH_TIME_NOW, Int64(delay)) dispatch_after(time, dispatch_get_main_queue()) { indicator.stopAnimating() } See: dispatch_after – GCD in swift? Update for Swift 3.0 indicator.startAnimating() let delay = Int(4.5 * Double(1000)) DispatchQueue.main.after(when: .now() + .milliseconds(delay)) { indicator.stopAnimating() } However, in the spirit of Swift … Read more

self.delegate respondsToSelector: … does not compile

-respondsToSelector: is a method on NSObject. Either assume that your id delegate is in fact an NSObject, and cast it: [(NSObject*)self.delegate respondsToSelector:@selector(myClass:willDoSomething:)] Or, better, make your delegate explicitly an NSObject: @property (nonatomic, weak) NSObject<MyClassDelegate>* delegate; Or make the protocol be a sub-protocol of NSObject: @protocol MyClassDelegate <NSObject>

Unable to download crash information

All credits to this answer go to “Adrian Sluyters”. After a bit of research I found this link. It’s the same question and someone actually answered it (and it was marked as viable solution), so here you go: 1) Visit the apple dev page (https://developer.apple.com). 2) Log in with your Agent/Admin ID. 3) Click on … Read more

Cordova: Unexpected Machine Code – Your upload contains both bitcode and native machine code

Posting an answer myself, as it seems to be quite a popular question with nobody answering — so the issue is on the Apple side. Some people contacted Apple support and confirmed this. There is no need to recompile anything. The binary with such a warning can be submitted to the AppStore — it will pass … Read more

Is it possible to install iOS 7 SDK on Xcode 6?

Seems like if you symlink the relevant SDK from a previous installation of Xcode to the Xcode 6 Beta directory, Xcode 6 will be able to use it. Assuming you still have Xcode 5.1.1 on your machine, try the following in terminal: ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk This should link the iOS 7 SDK for iPhone … Read more