Handling applicationDidBecomeActive – “How can a view controller respond to the app becoming Active?”

I have the UIApplicationDelegate protocol in my main AppDelegate.m class, with the applicationDidBecomeActive method defined. I want to call a method when the application returns from the background, but the method is in another view controller. How can I check which view controller is currently showing in the applicationDidBecomeActive method and then make a call … Read more

Warning :-Presenting view controllers on detached view controllers is discouraged

In my app, I am using a navigation controller. Later on in some view I am using presentViewController for showing a zoomed image. Also I am not using a Storyboard or nib. I am getting this error in iOS 7 only. It works fine in iOS 6 and earlier: Presenting view controllers on detached view … Read more

Validation Error: Invalid Bundle. The bundle at … contains disallowed file ‘Frameworks’

I’m trying to submit an app with the Xcode 6 GM, and I get this error on validation. The app has an action extension and a dynamic framework that’s shared between the extension and the app itself. I don’t have a file called ‘Frameworks’ anywhere in the project, so I’m really not sure what this … Read more

What’s the best practice for naming Swift files that add extensions to existing objects?

It’s possible to add extensions to existing Swift object types using extensions, as described in the language specification. As a result, it’s possible to create extensions such as: extension String { var utf8data:NSData { return self.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)! } } However, what’s the best naming practice for Swift source files containing such extensions? In the … Read more