Xcode 4 – clang error

Apparently, you’ve set custom compiler flags for the include paths. Go to your target’s build settings and check this option: Other C flags If you have something in it, you may replace it by the -iquote version. Otherwise, still in the build settings, check the value of the following options: Header Search Paths User Header … Read more

Optimizing CLLocationManager/CoreLocation to retrieve data points faster on the iPhone

I’ve had lots of issues with CLLocationManager on the iPhone also. From different Apps, and trial and error this is what I’ve figured out; 1) Use a singleton class for the locationManager, ONLY ONE Instance, follow the examples in: Apple’s LocateMe example Tweetero : http://tweetero.googlecode.com/svn/trunk I’m thinking you can only have one location manager running, … Read more

How to display the current project version of my App to the user?

After further searching and testing, I found the solution myself. NSDictionary* infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSLog(@”%i Keys: %@”, [infoDictionary count], [[infoDictionary allKeys] componentsJoinedByString: @” ,”]); This snipplet gave me the following output: 20 Keys : NSBundleResolvedPath ,CFBundleVersion ,NSBundleInitialPath ,CFBundleIdentifier ,NSMainNibFile ,CFBundleIconFile ,CFBundleInfoPlistURL ,CFBundleExecutable ,DTSDKName ,UIStatusBarStyle ,CFBundleDevelopmentRegion ,DTPlatformName ,CFBundleInfoDictionaryVersion ,CFBundleSupportedPlatforms ,CFBundleExecutablePath ,CFBundleDisplayName ,LSRequiresIPhoneOS ,CFBundlePackageType ,CFBundleSignature … Read more

iPhone MKMapView Annotation Clustering

You don’t necessarily need to use a 3rd party framework because since iOS 4.2, MKMapView has a method called – (NSSet *)annotationsInMapRect:(MKMapRect)mapRect which you can use to do your clustering. Check out the WWDC11 Session video ‘Visualizing Information Geographically with MapKit‘. About half way through it explains how to do it. But I’ll summarize the … Read more

Can’t find momd file: Core Data problems

Here are a few recommendations: The code you posted to get the .mom(d) file is not exactly the recommended way. Use mergedModelFromBundles instead, as in self.managedObjectContent= [NSManagedObjectModel mergedModelFromBundles:nil]; It takes care of getting the path, choosing/merging the correct mom or momd, and initializing of the MOC all by one step. You should use this. But … Read more