XCode – launch multiple simulators

Everyone that use XCode knows that to run the app in a different device, you need to select one from list, launch and wait the device to boot…
Well, it’s a mess. I hate a lot this feature.

So, today a trick to run all of your simulators and from XCode select the rigth one without wait the boot and debug the app… simultaneously!

It’s a great trick. Tried with XCode 7.

Read More

 

ObjectiveC – Get device color

A simple trick, using private API to get the device COVER color!

You cannot use this in App Store, but you can play with private API:

NSBundle *b = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/FTServices.framework"];

BOOL success = [b load];

Class FTDeviceSupport = NSClassFromString(@"FTDeviceSupport");
id si = [FTDeviceSupport valueForKey:@"sharedInstance"];
NSLog(@"-- %@", [si valueForKey:@"deviceColor"]);}

And output:

TestJW[19775:2776384] -- #3b3b3c

That responds to this one: http://www.color-hex.com/color/3b3b3c

And… yes, my iPhone is dark gray! 

 

[Xcode] – Introduction to Auto Layout

Editor’s note: If you’ve downloaded the Xcode 6 beta and played around with it, one thing you may notice is the change of Interface Builder. The default view controller is now wider and doesn’t look like an iPhone 5. When you position a button in the center of the view and run the app, it doesn’t look good. The button is not centered properly.

Read More

 

[Objc] How to get SecKeyRef from base64 coded string

This quick iOS Application Development tip will show you How to get SecKeyRefM from base64 coded string, which for iOS 7 utilises: So, let’s assume that you have a base64 coded public key, like:

MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3gn+tJ1+PbP0GHa6hmM35WsVyibpypWAwRuBYY4MGfh3VWoXgiyiLo5HJTW1eR9BUFq3z+yOG1rwzSabZ8I4zneWm0kH7xErSjNrMbmjirbL7e6TQNa1ujP/x4x9XVbqf3vIsNVs19kn/qSX/HGzd5Ct3TGAo0AT0T4JwkCfciwIDAQAB

Read More