How to manually create icns files using iconutil?

Here’s a script to convert a 1024×1024 png (named “Icon1024.png”) to the required icns file. Save it to a file called “CreateICNS.src” in the folder where your png file is then in terminal “cd” to the same folder and type “source CreateICNS.src” to call it: mkdir MyIcon.iconset sips -z 16 16 Icon1024.png –out MyIcon.iconset/icon_16x16.png sips … Read more

How to find your current location with CoreLocation

You can find your location using CoreLocation like this: import CoreLocation: #import <CoreLocation/CoreLocation.h> Declare CLLocationManager: CLLocationManager *locationManager; Initialize the locationManager in viewDidLoad and create a function that can return the current location as an NSString: – (NSString *)deviceLocation { return [NSString stringWithFormat:@”latitude: %f longitude: %f”, locationManager.location.coordinate.latitude, locationManager.location.coordinate.longitude]; } – (void)viewDidLoad { locationManager = [[CLLocationManager alloc] … Read more

Adding resource files to xcode

It might be that the file you added was not added to the project build. Click your project > App target > Build Phases And check that the file exists in Compile sources (if it needs to be compiled), otherwise check Copy bundle resources. If the file does not exist there, drag it there and … Read more