How to use compiler statements to create specific simulator/device code:
#if TARGETIPHONESIMULATOR //compiler specific code #else // device specific code #endif
How to use compiler statements to create specific simulator/device code:
#if TARGETIPHONESIMULATOR //compiler specific code #else // device specific code #endif
Info coming soon…
I’ve still not decided on the name.
Or the display theme for this blog!
Various links regarding ad hoc dists.
Furbo on beta testing.
Installing an ad hoc dist.
And the one I used:
Guidelines for building an ad hoc dist.
Some troubleshooting tips:
[Via]
This code tells you if you have a network connection. You need the Reachability class from Apple.
#import "Reachability.h" +(BOOL) doWeHaveInternetConnection{ Reachability *hostReach = [[Reachability reachabilityWithHostName: @"www.google.com"] retain]; NetworkStatus netStatus = [hostReach currentReachabilityStatus]; BOOL isAvailable = NO; if (netStatus == NotReachable) { NSLog(@"NotReachable"); isAvailable = NO; } if (netStatus == ReachableViaWiFi) { NSLog(@"ReachableViaWiFi"); isAvailable = YES; } if (netStatus == ReachableViaWWAN) { NSLog(@"ReachableViaWWAN"); isAvailable = YES; } [hostReach release]; return isAvailable; }
How to use try/catch:
Cup *cup = [[Cup alloc] init]; ? @try { ? [cup fill]; ? } @catch (NSException *exception) { NSLog(@"main: Caught %@: %@", [exception name], [exception reason]); ? } ? @finally { [cup release]; ? }