Great little marketing idea, whenever a customer buys Hellmann’s mayonnaise the other items in their basket are analysed and a recipe printed on the receipt! Should be considered a success — sales increased by 44%!
Here’s an Objective C method that’ll return a SHA512 hex of a given string: -(NSString*) sha512:(NSString*)input { const char *cstr = [input cStringUsingEncoding:NSUTF8StringEncoding]; NSData *data = [NSData dataWithBytes:cstr length:input.length]; uint8_t digest[CC_SHA512_DIGEST_LENGTH]; CC_SHA512(data.bytes, data.length, digest); NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA512_DIGEST_LENGTH * 2]; for(int i = 0; i < CC_SHA512_DIGEST_LENGTH; i++) [output appendFormat:@”%02x”, digest[i]]; […]
From the iTunes Connect FAQ: [Developer login required] “Your app is searchable by your app name, your keywords and your company name.” This means you don’t have to waste valuable keywords by including your app or company name in the 100 byte keyword limit. To gain a few more characters you can also remove the spaces in-between keywords and […]
The HTML5 Boilerplate build script can auto generate your manifest.appcache file but it doesn’t out of the box. Slightly hidden away in the docs: To enable the appcache, just uncomment the file.manifest line in the project.properties file. It’ll create a manifest.appcache file and wire it all up. You’ll find the project.properties file in build/project. Now just do ant […]
When using Xcode 4.2 for iOS development there’s an annoying bug where any exceptions crash to the main.m file instead of highlighting the line. Luckily you can set a custom breakpoint to restore the old and correct behaviour: Open the Breakpoint navigator (CMD + 6) Click the + button in the bottom left Select Add Exception Breakpoint Click […]
So many iOS apps developers forget to remove the screenshots from their apps on the App Store; often revealing the horrendous times the screenshots were taken and detracting from the actual app. iTunes Connect recommends the removal of the status bar, and Status Barred removes the status bar perfectly regardless of the screenshot being retina, […]
A great, but underused location feature on iOS is the purpose property of the CLLocationManager. So many apps ask for your location — give your users confidence in sharing their location by telling them why you need it! Example: locationManager.purpose = @“We’ll only use your location to show you local events nearby.”; You need to do […]
When creating an NSDictionary to serialize as JSON with TouchJSON you can’t set a BOOL value in the dictionary because it requires an object. Use an NSNumber, which will be converted to true or false by the TouchJSON library. Eg: NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init]; [dictionary setObject:[NSNumber numberWithBool:YES forKey:@“shouldBeOn”]; [dictionary setObject:[NSNumber numberWithBool:NO forKey:@“shouldBeOff”]; NSError […]