How to open a URL in Safari programmatically

Instead of loading a URL into a UIWebView we can also launch Safari to display it: UIApplication *mySafari = [UIApplication sharedApplication]; NSURL *myURL = [[NSURL alloc]initWithString:@”http://www.mydomain.com”; [mySafari openURL:myURL]; The method returns a BOOL value which will feed back if this operation was a success or not: if (![mySafari openURL:myURL]) { // opening didn’t work } […]

How to use iCloud key value storage

Storing small bits of info in iCloud is very similar to using the local NSUserDefaults device storage. The only difference is that your App ID needs to be enabled for iCloud in iTunes Connect and that you need to enable it in your project: Here’s how you save data to iCloud (from a text label): […]

How to restart Plesk on CentOS / RHEL / Linux

I had always assumed that to restart Plesk, all that was necessary was the following command: service psa restart However, since Plesk is in charge of a multitude of services that’s not enough. Instead, we should be using service psa stopall service psa start Or if the service command isn’t working for you, you can … Read more

When Xcode 4.5 suddenly stops running your app on a device (could not launch app)

I’ve had this problem that Xcode 4.5 would run my app fine in the simulator, but didn’t do so anymore on the device. Something about the “derived data folder was not found”. I checked, it was definitely there. Then I found this post on Stackoverflow to show some suggestions: http://stackoverflow.com/questions/11456312/xcode-suddenly-stopped-running-project-on-hardware-could-not-launch-xxx-app This solution worked for me […]