+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name ‘Account”

– (NSManagedObjectContext *)managedObjectContext { if (managedObjectContext != nil) return managedObjectContext; NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { managedObjectContext = [[NSManagedObjectContext alloc] init]; [managedObjectContext setPersistentStoreCoordinator:coordinator]; } return managedObjectContext; } You haven’t provided a lazy loading implementation of persistentStoreCoordinator so coordinator will always be nil so you will always be returning nil from this … Read more

Xcode 5 Error CertUIFramework.axbundle

Temporary workaround: click iOS Simulator > Reset Content and Settings… and run again. This error message may reappear at random. For me, it happens when I launch a different application. There are several threads in Apple dev forums and in StackOverflow about this problem, but none have a definitive answer. This seems to be a … Read more

Should *.xccheckout files in Xcode5 be ignored under VCS?

You should check in an Xcode 5 .xccheckout file; in general, files in xcshareddata should be committed. An .xccheckout file contains metadata about what repositories are used in a workspace. For a single project in a single repository that doesn’t make much difference. But if you’re using a workspace that has multiple projects from different … Read more

ERROR ITMS-9000: “Redundant Binary Upload. There already exists a binary upload with build version ‘1.0’ for train ‘1.0’”

More than one binary may be uploaded to App Store Connect for the same version, if the the Build number is increasing for each build uploaded to iTunesConnect. The build number just has to be unique (and higher) for each binary that is uploaded (select the Target, then Xcode -> General -> Build, see the … Read more

Get global tint color from code

Easy. Objective C: UIColor *tintColor = [[self view]tintColor]; Swift: let tintColor = self.view.tintColor; This should get the tintColor set on the app. If you change it, this property should get updated. This assumes you’re inside a viewController or a subclass of one and that you haven’t overridden the tintColor in some superView between this view … Read more

UIStatusBarStyle PreferredStatusBarStyle does not work on iOS 7

I discovered that if your ViewController is inside a navigationController then the navigationController’s navigationBar.barStyle determines the statusBarStyle. Setting your navigationBar’s barStyle to UIBarStyleBlackTranslucent will give white status bar text (ie. UIStatusBarStyleLightContent), and UIBarStyleDefault will give black status bar text (ie. UIStatusBarStyleDefault). Note that this applies even if you totally change the navigationBar’s color via its … Read more

tech