This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02-04 06:43:30.664 9206-12182/com.bjss.williamheng.office365poc W/System.err: com.google.gson.JsonSyntaxException: 2016-04-08 | |
02-04 06:43:30.664 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103) | |
02-04 06:43:30.674 9206-12182/com.bjss.williamheng.office365poc W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196) | |
02-04 06:43:30.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation WHYPerson | |
- (id)init { | |
self = [super init]; | |
if (self) { | |
// It is recommended to use instance variables directly to initialise the object | |
_firstName = ...; | |
_lastName = ...; | |
_dateOfBirth = ...; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation WHYPerson | |
... | |
// This is generated by the compiler (there is no need to put this line in your code) | |
@synthesize firstName; // Shorter version | |
// The above, according to Apple automatic naming convention for instance variables, | |
// is just doing this (add '_' prefix): | |
@synthesize firstName = _firstName; // Longer version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "WHYPerson.h" | |
... | |
@implmentation WHYPerson | |
... | |
- (NSString *)doSomething { | |
return [NSString stringWithFormat:@"Hello, %@", [self firstName]]; | |
// Can also be done using dot syntax as it's just a wrapper around [self firstName] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface WHYPerson : NSObject | |
@property (nonatomic) NSString *firstName; | |
@property (nonatomic) NSString *lastName; | |
@property (nonatomic) NSDate *dateOfBirth; | |
@property (nonatomic, readonly) NSString *fullName; | |
... | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) { | |
int retVal = -1; | |
@autoreleasepool { | |
@try { | |
retVal = UIApplicationMain(argc, argv, nil, nil); | |
} | |
@catch (NSException* exception) { | |
NSLog(@"Uncaught exception: %@", exception.description); | |
NSLog(@"Stack trace: %@", [exception callStackSymbols]); |
NewerOlder