diff --git a/examples/LiveSDKTestBed/LiveSDKTestBed.xcodeproj/project.pbxproj b/examples/LiveSDKTestBed/LiveSDKTestBed.xcodeproj/project.pbxproj index 2efa99d..4d580e1 100644 --- a/examples/LiveSDKTestBed/LiveSDKTestBed.xcodeproj/project.pbxproj +++ b/examples/LiveSDKTestBed/LiveSDKTestBed.xcodeproj/project.pbxproj @@ -485,7 +485,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_ARC = YES; INFOPLIST_FILE = LiveSDKTestBed/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -497,7 +497,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_ARC = YES; INFOPLIST_FILE = LiveSDKTestBed/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.h b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.h index 3f328d5..de810fd 100644 --- a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.h +++ b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.h @@ -30,6 +30,6 @@ @property (strong, nonatomic) UIWindow *window; -- (UIViewController *) initUIViewController; +- (UIViewController *) ini_tUIViewController; @end diff --git a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.m b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.m index 2e8bee1..cbc235d 100644 --- a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.m +++ b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveAppDelegate.m @@ -32,20 +32,14 @@ @implementation LiveAppDelegate @synthesize window = _window; -- (void)dealloc -{ - [_window release]; - [super dealloc]; -} - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; - UIViewController * myViewController = [self initUIViewController]; + UIViewController * myViewController = [self ini_tUIViewController]; [self.window setRootViewController: myViewController]; [self.window makeKeyAndVisible]; @@ -91,16 +85,16 @@ - (void)applicationWillTerminate:(UIApplication *)application */ } -- (UIViewController *) initUIViewController +- (UIViewController *) ini_tUIViewController { NSString *device = [[UIDevice currentDevice] model]; if ([device hasPrefix:@"iPad"]) { - return [[[LiveServiceViewController_iPad alloc] initWithNibName:nil bundle:nil] autorelease]; + return [[LiveServiceViewController_iPad alloc] initWithNibName:nil bundle:nil]; } else { - return [[[LiveServiceViewController_iPhone alloc] initWithNibName:nil bundle:nil] autorelease]; + return [[LiveServiceViewController_iPhone alloc] initWithNibName:nil bundle:nil]; } } diff --git a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveServiceViewController.m b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveServiceViewController.m index 0705842..2fe9284 100644 --- a/examples/LiveSDKTestBed/LiveSDKTestBed/LiveServiceViewController.m +++ b/examples/LiveSDKTestBed/LiveSDKTestBed/LiveServiceViewController.m @@ -41,19 +41,6 @@ - (void)didReceiveMemoryWarning // Release any cached data, images, etc that aren't in use. } -- (void)dealloc -{ - [liveClient release]; - [outputView release]; - [signInButton release]; - [scopesTextField release]; - [pathTextField release]; - [destinationTextField release]; - [jsonBodyTextView release]; - [imgView release]; - [super dealloc]; -} - #pragma mark - Output handling - (void) handleException:(id)exception context:(NSString *)context @@ -117,11 +104,10 @@ - (void) configureLiveClientWithScopes:(NSString *)scopeText [NSException raise:NSInvalidArgumentException format:@"The CLIENT_ID value must be specified."]; } - self.liveClient = [[[LiveConnectClient alloc] initWithClientId:CLIENT_ID + self.liveClient = [[LiveConnectClient alloc] initWithClientId:CLIENT_ID scopes:[scopeText componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] delegate:self - userState:@"init"] - autorelease ]; + userState:@"init"]; } - (void) loginWithScopes:(NSString *)scopeText @@ -246,7 +232,7 @@ - (IBAction)onClickUploadButton:(id)sender NSString *path = [[NSBundle mainBundle] pathForResource:@"volvo_c70" ofType:@"jpg"]; - NSData *data = [[[NSData alloc]initWithContentsOfFile:path] autorelease]; + NSData *data = [[NSData alloc]initWithContentsOfFile:path]; NSString *uploadPath = self.pathTextField.text; if ([uploadPath isEqual:@""] || diff --git a/examples/PhotoSky/PhotoSky.xcodeproj/project.pbxproj b/examples/PhotoSky/PhotoSky.xcodeproj/project.pbxproj index 3817638..10e1246 100644 --- a/examples/PhotoSky/PhotoSky.xcodeproj/project.pbxproj +++ b/examples/PhotoSky/PhotoSky.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 4ECBAC420D212305B6DCA072 /* libPods-PhotoSky.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A8E5798FAFB664E7A1A4B43 /* libPods-PhotoSky.a */; }; 5207731F14FD4ADA007E3059 /* PSSkyPhotoViewer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5207731D14FD4ADA007E3059 /* PSSkyPhotoViewer.m */; }; 5207732014FD4ADA007E3059 /* PSSkyPhotoViewer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5207731E14FD4ADA007E3059 /* PSSkyPhotoViewer.xib */; }; 5207732514FD4DD5007E3059 /* PSMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5207732314FD4DD5007E3059 /* PSMainViewController.m */; }; @@ -23,11 +22,33 @@ 5248D13F14FE3DF80096720F /* PSSkyDriveFolderPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 5248D13D14FE3DF80096720F /* PSSkyDriveFolderPicker.m */; }; 5248D14014FE3DF80096720F /* PSSkyDriveFolderPicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5248D13E14FE3DF80096720F /* PSSkyDriveFolderPicker.xib */; }; 526B94A617692BD0000E29D2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 526B94A517692BD0000E29D2 /* Default-568h@2x.png */; }; + A2EF33BC1B521327006CE39D /* JsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33831B521327006CE39D /* JsonParser.m */; }; + A2EF33BD1B521327006CE39D /* JsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33851B521327006CE39D /* JsonWriter.m */; }; + A2EF33BE1B521327006CE39D /* LiveApiHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33871B521327006CE39D /* LiveApiHelper.m */; }; + A2EF33BF1B521327006CE39D /* LiveAuthHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33891B521327006CE39D /* LiveAuthHelper.m */; }; + A2EF33C01B521327006CE39D /* LiveConnectionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF338C1B521327006CE39D /* LiveConnectionHelper.m */; }; + A2EF33C11B521327006CE39D /* StreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF338E1B521327006CE39D /* StreamReader.m */; }; + A2EF33C21B521327006CE39D /* StringHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33901B521327006CE39D /* StringHelper.m */; }; + A2EF33C31B521327006CE39D /* UrlHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33921B521327006CE39D /* UrlHelper.m */; }; + A2EF33C41B521327006CE39D /* LiveAuthDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33941B521327006CE39D /* LiveAuthDialog.m */; }; + A2EF33C51B521327006CE39D /* LiveAuthDialog_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = A2EF33951B521327006CE39D /* LiveAuthDialog_iPad.xib */; }; + A2EF33C61B521327006CE39D /* LiveAuthDialog_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = A2EF33961B521327006CE39D /* LiveAuthDialog_iPhone.xib */; }; + A2EF33C71B521327006CE39D /* LiveAuthRefreshRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33991B521327006CE39D /* LiveAuthRefreshRequest.m */; }; + A2EF33C81B521327006CE39D /* LiveAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF339B1B521327006CE39D /* LiveAuthRequest.m */; }; + A2EF33C91B521327006CE39D /* LiveAuthStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF339D1B521327006CE39D /* LiveAuthStorage.m */; }; + A2EF33CA1B521327006CE39D /* LiveConnectClientCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF339F1B521327006CE39D /* LiveConnectClientCore.m */; }; + A2EF33CB1B521327006CE39D /* LiveDownloadOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33A21B521327006CE39D /* LiveDownloadOperationCore.m */; }; + A2EF33CC1B521327006CE39D /* LiveOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33A51B521327006CE39D /* LiveOperationCore.m */; }; + A2EF33CD1B521327006CE39D /* LiveUploadOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33A81B521327006CE39D /* LiveUploadOperationCore.m */; }; + A2EF33CE1B521327006CE39D /* backArrow_black.png in Resources */ = {isa = PBXBuildFile; fileRef = A2EF33AA1B521327006CE39D /* backArrow_black.png */; }; + A2EF33CF1B521327006CE39D /* LiveConnectClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33AE1B521327006CE39D /* LiveConnectClient.m */; }; + A2EF33D01B521327006CE39D /* LiveConnectSession.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33B01B521327006CE39D /* LiveConnectSession.m */; }; + A2EF33D11B521327006CE39D /* LiveDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33B31B521327006CE39D /* LiveDownloadOperation.m */; }; + A2EF33D21B521327006CE39D /* LiveOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33B61B521327006CE39D /* LiveOperation.m */; }; + A2EF33D31B521327006CE39D /* LiveOperationProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = A2EF33B91B521327006CE39D /* LiveOperationProgress.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 2D0F2C182BE02721B87D582D /* Pods-PhotoSky.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PhotoSky.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PhotoSky/Pods-PhotoSky.debug.xcconfig"; sourceTree = ""; }; - 3A8E5798FAFB664E7A1A4B43 /* libPods-PhotoSky.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PhotoSky.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 5207731C14FD4ADA007E3059 /* PSSkyPhotoViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSSkyPhotoViewer.h; sourceTree = ""; }; 5207731D14FD4ADA007E3059 /* PSSkyPhotoViewer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSSkyPhotoViewer.m; sourceTree = ""; }; 5207731E14FD4ADA007E3059 /* PSSkyPhotoViewer.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PSSkyPhotoViewer.xib; sourceTree = ""; }; @@ -51,7 +72,62 @@ 5248D13D14FE3DF80096720F /* PSSkyDriveFolderPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSSkyDriveFolderPicker.m; sourceTree = ""; }; 5248D13E14FE3DF80096720F /* PSSkyDriveFolderPicker.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PSSkyDriveFolderPicker.xib; sourceTree = ""; }; 526B94A517692BD0000E29D2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - EFD5686BE4FDE0EB71259F6C /* Pods-PhotoSky.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PhotoSky.release.xcconfig"; path = "Pods/Target Support Files/Pods-PhotoSky/Pods-PhotoSky.release.xcconfig"; sourceTree = ""; }; + A2EF33821B521327006CE39D /* JsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JsonParser.h; sourceTree = ""; }; + A2EF33831B521327006CE39D /* JsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JsonParser.m; sourceTree = ""; }; + A2EF33841B521327006CE39D /* JsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JsonWriter.h; sourceTree = ""; }; + A2EF33851B521327006CE39D /* JsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JsonWriter.m; sourceTree = ""; }; + A2EF33861B521327006CE39D /* LiveApiHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveApiHelper.h; sourceTree = ""; }; + A2EF33871B521327006CE39D /* LiveApiHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveApiHelper.m; sourceTree = ""; }; + A2EF33881B521327006CE39D /* LiveAuthHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthHelper.h; sourceTree = ""; }; + A2EF33891B521327006CE39D /* LiveAuthHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAuthHelper.m; sourceTree = ""; }; + A2EF338A1B521327006CE39D /* LiveConnectionCreatorDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectionCreatorDelegate.h; sourceTree = ""; }; + A2EF338B1B521327006CE39D /* LiveConnectionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectionHelper.h; sourceTree = ""; }; + A2EF338C1B521327006CE39D /* LiveConnectionHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveConnectionHelper.m; sourceTree = ""; }; + A2EF338D1B521327006CE39D /* StreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamReader.h; sourceTree = ""; }; + A2EF338E1B521327006CE39D /* StreamReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamReader.m; sourceTree = ""; }; + A2EF338F1B521327006CE39D /* StringHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; + A2EF33901B521327006CE39D /* StringHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; + A2EF33911B521327006CE39D /* UrlHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UrlHelper.h; sourceTree = ""; }; + A2EF33921B521327006CE39D /* UrlHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UrlHelper.m; sourceTree = ""; }; + A2EF33931B521327006CE39D /* LiveAuthDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthDialog.h; sourceTree = ""; }; + A2EF33941B521327006CE39D /* LiveAuthDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAuthDialog.m; sourceTree = ""; }; + A2EF33951B521327006CE39D /* LiveAuthDialog_iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LiveAuthDialog_iPad.xib; sourceTree = ""; }; + A2EF33961B521327006CE39D /* LiveAuthDialog_iPhone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LiveAuthDialog_iPhone.xib; sourceTree = ""; }; + A2EF33971B521327006CE39D /* LiveAuthDialogDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthDialogDelegate.h; sourceTree = ""; }; + A2EF33981B521327006CE39D /* LiveAuthRefreshRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthRefreshRequest.h; sourceTree = ""; }; + A2EF33991B521327006CE39D /* LiveAuthRefreshRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAuthRefreshRequest.m; sourceTree = ""; }; + A2EF339A1B521327006CE39D /* LiveAuthRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthRequest.h; sourceTree = ""; }; + A2EF339B1B521327006CE39D /* LiveAuthRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAuthRequest.m; sourceTree = ""; }; + A2EF339C1B521327006CE39D /* LiveAuthStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthStorage.h; sourceTree = ""; }; + A2EF339D1B521327006CE39D /* LiveAuthStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAuthStorage.m; sourceTree = ""; }; + A2EF339E1B521327006CE39D /* LiveConnectClientCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectClientCore.h; sourceTree = ""; }; + A2EF339F1B521327006CE39D /* LiveConnectClientCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveConnectClientCore.m; sourceTree = ""; }; + A2EF33A01B521327006CE39D /* LiveConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConstants.h; sourceTree = ""; }; + A2EF33A11B521327006CE39D /* LiveDownloadOperationCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveDownloadOperationCore.h; sourceTree = ""; }; + A2EF33A21B521327006CE39D /* LiveDownloadOperationCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveDownloadOperationCore.m; sourceTree = ""; }; + A2EF33A31B521327006CE39D /* LiveDownloadOperationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveDownloadOperationInternal.h; sourceTree = ""; }; + A2EF33A41B521327006CE39D /* LiveOperationCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveOperationCore.h; sourceTree = ""; }; + A2EF33A51B521327006CE39D /* LiveOperationCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveOperationCore.m; sourceTree = ""; }; + A2EF33A61B521327006CE39D /* LiveOperationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveOperationInternal.h; sourceTree = ""; }; + A2EF33A71B521327006CE39D /* LiveUploadOperationCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveUploadOperationCore.h; sourceTree = ""; }; + A2EF33A81B521327006CE39D /* LiveUploadOperationCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveUploadOperationCore.m; sourceTree = ""; }; + A2EF33AA1B521327006CE39D /* backArrow_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = backArrow_black.png; sourceTree = ""; }; + A2EF33AC1B521327006CE39D /* LiveAuthDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAuthDelegate.h; sourceTree = ""; }; + A2EF33AD1B521327006CE39D /* LiveConnectClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectClient.h; sourceTree = ""; }; + A2EF33AE1B521327006CE39D /* LiveConnectClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveConnectClient.m; sourceTree = ""; }; + A2EF33AF1B521327006CE39D /* LiveConnectSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectSession.h; sourceTree = ""; }; + A2EF33B01B521327006CE39D /* LiveConnectSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveConnectSession.m; sourceTree = ""; }; + A2EF33B11B521327006CE39D /* LiveConnectSessionStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveConnectSessionStatus.h; sourceTree = ""; }; + A2EF33B21B521327006CE39D /* LiveDownloadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveDownloadOperation.h; sourceTree = ""; }; + A2EF33B31B521327006CE39D /* LiveDownloadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveDownloadOperation.m; sourceTree = ""; }; + A2EF33B41B521327006CE39D /* LiveDownloadOperationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveDownloadOperationDelegate.h; sourceTree = ""; }; + A2EF33B51B521327006CE39D /* LiveOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveOperation.h; sourceTree = ""; }; + A2EF33B61B521327006CE39D /* LiveOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveOperation.m; sourceTree = ""; }; + A2EF33B71B521327006CE39D /* LiveOperationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveOperationDelegate.h; sourceTree = ""; }; + A2EF33B81B521327006CE39D /* LiveOperationProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveOperationProgress.h; sourceTree = ""; }; + A2EF33B91B521327006CE39D /* LiveOperationProgress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveOperationProgress.m; sourceTree = ""; }; + A2EF33BA1B521327006CE39D /* LiveUploadOperationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveUploadOperationDelegate.h; sourceTree = ""; }; + A2EF33BB1B521327006CE39D /* LiveUploadOverwriteOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveUploadOverwriteOption.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,29 +138,19 @@ 520C9CE914FD46BB002BF021 /* UIKit.framework in Frameworks */, 520C9CEB14FD46BB002BF021 /* Foundation.framework in Frameworks */, 520C9CED14FD46BB002BF021 /* CoreGraphics.framework in Frameworks */, - 4ECBAC420D212305B6DCA072 /* libPods-PhotoSky.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 07540E27C035B049820B8EBC /* Pods */ = { - isa = PBXGroup; - children = ( - 2D0F2C182BE02721B87D582D /* Pods-PhotoSky.debug.xcconfig */, - EFD5686BE4FDE0EB71259F6C /* Pods-PhotoSky.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; 520C9CD914FD46BB002BF021 = { isa = PBXGroup; children = ( + A2EF337F1B521327006CE39D /* Library */, 520C9CEE14FD46BB002BF021 /* PhotoSky */, 520C9CE714FD46BB002BF021 /* Frameworks */, 520C9CE514FD46BB002BF021 /* Products */, - 07540E27C035B049820B8EBC /* Pods */, ); sourceTree = ""; }; @@ -102,7 +168,6 @@ 520C9CE814FD46BB002BF021 /* UIKit.framework */, 520C9CEA14FD46BB002BF021 /* Foundation.framework */, 520C9CEC14FD46BB002BF021 /* CoreGraphics.framework */, - 3A8E5798FAFB664E7A1A4B43 /* libPods-PhotoSky.a */, ); name = Frameworks; sourceTree = ""; @@ -141,6 +206,102 @@ name = "Supporting Files"; sourceTree = ""; }; + A2EF337F1B521327006CE39D /* Library */ = { + isa = PBXGroup; + children = ( + A2EF33801B521327006CE39D /* Internal */, + A2EF33AB1B521327006CE39D /* Public */, + ); + name = Library; + path = ../../src/LiveSDK/Library; + sourceTree = ""; + }; + A2EF33801B521327006CE39D /* Internal */ = { + isa = PBXGroup; + children = ( + A2EF33811B521327006CE39D /* Helpers */, + A2EF33931B521327006CE39D /* LiveAuthDialog.h */, + A2EF33941B521327006CE39D /* LiveAuthDialog.m */, + A2EF33951B521327006CE39D /* LiveAuthDialog_iPad.xib */, + A2EF33961B521327006CE39D /* LiveAuthDialog_iPhone.xib */, + A2EF33971B521327006CE39D /* LiveAuthDialogDelegate.h */, + A2EF33981B521327006CE39D /* LiveAuthRefreshRequest.h */, + A2EF33991B521327006CE39D /* LiveAuthRefreshRequest.m */, + A2EF339A1B521327006CE39D /* LiveAuthRequest.h */, + A2EF339B1B521327006CE39D /* LiveAuthRequest.m */, + A2EF339C1B521327006CE39D /* LiveAuthStorage.h */, + A2EF339D1B521327006CE39D /* LiveAuthStorage.m */, + A2EF339E1B521327006CE39D /* LiveConnectClientCore.h */, + A2EF339F1B521327006CE39D /* LiveConnectClientCore.m */, + A2EF33A01B521327006CE39D /* LiveConstants.h */, + A2EF33A11B521327006CE39D /* LiveDownloadOperationCore.h */, + A2EF33A21B521327006CE39D /* LiveDownloadOperationCore.m */, + A2EF33A31B521327006CE39D /* LiveDownloadOperationInternal.h */, + A2EF33A41B521327006CE39D /* LiveOperationCore.h */, + A2EF33A51B521327006CE39D /* LiveOperationCore.m */, + A2EF33A61B521327006CE39D /* LiveOperationInternal.h */, + A2EF33A71B521327006CE39D /* LiveUploadOperationCore.h */, + A2EF33A81B521327006CE39D /* LiveUploadOperationCore.m */, + A2EF33A91B521327006CE39D /* Resources */, + ); + path = Internal; + sourceTree = ""; + }; + A2EF33811B521327006CE39D /* Helpers */ = { + isa = PBXGroup; + children = ( + A2EF33821B521327006CE39D /* JsonParser.h */, + A2EF33831B521327006CE39D /* JsonParser.m */, + A2EF33841B521327006CE39D /* JsonWriter.h */, + A2EF33851B521327006CE39D /* JsonWriter.m */, + A2EF33861B521327006CE39D /* LiveApiHelper.h */, + A2EF33871B521327006CE39D /* LiveApiHelper.m */, + A2EF33881B521327006CE39D /* LiveAuthHelper.h */, + A2EF33891B521327006CE39D /* LiveAuthHelper.m */, + A2EF338A1B521327006CE39D /* LiveConnectionCreatorDelegate.h */, + A2EF338B1B521327006CE39D /* LiveConnectionHelper.h */, + A2EF338C1B521327006CE39D /* LiveConnectionHelper.m */, + A2EF338D1B521327006CE39D /* StreamReader.h */, + A2EF338E1B521327006CE39D /* StreamReader.m */, + A2EF338F1B521327006CE39D /* StringHelper.h */, + A2EF33901B521327006CE39D /* StringHelper.m */, + A2EF33911B521327006CE39D /* UrlHelper.h */, + A2EF33921B521327006CE39D /* UrlHelper.m */, + ); + path = Helpers; + sourceTree = ""; + }; + A2EF33A91B521327006CE39D /* Resources */ = { + isa = PBXGroup; + children = ( + A2EF33AA1B521327006CE39D /* backArrow_black.png */, + ); + path = Resources; + sourceTree = ""; + }; + A2EF33AB1B521327006CE39D /* Public */ = { + isa = PBXGroup; + children = ( + A2EF33AC1B521327006CE39D /* LiveAuthDelegate.h */, + A2EF33AD1B521327006CE39D /* LiveConnectClient.h */, + A2EF33AE1B521327006CE39D /* LiveConnectClient.m */, + A2EF33AF1B521327006CE39D /* LiveConnectSession.h */, + A2EF33B01B521327006CE39D /* LiveConnectSession.m */, + A2EF33B11B521327006CE39D /* LiveConnectSessionStatus.h */, + A2EF33B21B521327006CE39D /* LiveDownloadOperation.h */, + A2EF33B31B521327006CE39D /* LiveDownloadOperation.m */, + A2EF33B41B521327006CE39D /* LiveDownloadOperationDelegate.h */, + A2EF33B51B521327006CE39D /* LiveOperation.h */, + A2EF33B61B521327006CE39D /* LiveOperation.m */, + A2EF33B71B521327006CE39D /* LiveOperationDelegate.h */, + A2EF33B81B521327006CE39D /* LiveOperationProgress.h */, + A2EF33B91B521327006CE39D /* LiveOperationProgress.m */, + A2EF33BA1B521327006CE39D /* LiveUploadOperationDelegate.h */, + A2EF33BB1B521327006CE39D /* LiveUploadOverwriteOption.h */, + ); + path = Public; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -148,11 +309,9 @@ isa = PBXNativeTarget; buildConfigurationList = 520C9D0514FD46BB002BF021 /* Build configuration list for PBXNativeTarget "PhotoSky" */; buildPhases = ( - 3D901B39CF6FA1515FB5805F /* Check Pods Manifest.lock */, 520C9CE014FD46BB002BF021 /* Sources */, - 520C9CE114FD46BB002BF021 /* Frameworks */, 520C9CE214FD46BB002BF021 /* Resources */, - B42AE604C36B0797D76AB1FD /* Copy Pods Resources */, + 520C9CE114FD46BB002BF021 /* Frameworks */, ); buildRules = ( ); @@ -195,49 +354,19 @@ buildActionMask = 2147483647; files = ( 520C9CF314FD46BB002BF021 /* InfoPlist.strings in Resources */, + A2EF33C51B521327006CE39D /* LiveAuthDialog_iPad.xib in Resources */, 5207732014FD4ADA007E3059 /* PSSkyPhotoViewer.xib in Resources */, + A2EF33CE1B521327006CE39D /* backArrow_black.png in Resources */, 5207732614FD4DD5007E3059 /* PSMainViewController.xib in Resources */, 5207732914FD4EA4007E3059 /* skydrive.jpeg in Resources */, 5248D14014FE3DF80096720F /* PSSkyDriveFolderPicker.xib in Resources */, + A2EF33C61B521327006CE39D /* LiveAuthDialog_iPhone.xib in Resources */, 526B94A617692BD0000E29D2 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 3D901B39CF6FA1515FB5805F /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - B42AE604C36B0797D76AB1FD /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PhotoSky/Pods-PhotoSky-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 520C9CE014FD46BB002BF021 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -245,10 +374,31 @@ files = ( 520C9CF514FD46BB002BF021 /* main.m in Sources */, 520C9CF914FD46BB002BF021 /* PSAppDelegate.m in Sources */, + A2EF33C41B521327006CE39D /* LiveAuthDialog.m in Sources */, + A2EF33D21B521327006CE39D /* LiveOperation.m in Sources */, + A2EF33C91B521327006CE39D /* LiveAuthStorage.m in Sources */, 5207731F14FD4ADA007E3059 /* PSSkyPhotoViewer.m in Sources */, + A2EF33D01B521327006CE39D /* LiveConnectSession.m in Sources */, 5207732514FD4DD5007E3059 /* PSMainViewController.m in Sources */, 5207733414FDA851007E3059 /* PSSkyDriveObject.m in Sources */, + A2EF33CD1B521327006CE39D /* LiveUploadOperationCore.m in Sources */, + A2EF33C81B521327006CE39D /* LiveAuthRequest.m in Sources */, + A2EF33CB1B521327006CE39D /* LiveDownloadOperationCore.m in Sources */, 5248D13F14FE3DF80096720F /* PSSkyDriveFolderPicker.m in Sources */, + A2EF33BE1B521327006CE39D /* LiveApiHelper.m in Sources */, + A2EF33D31B521327006CE39D /* LiveOperationProgress.m in Sources */, + A2EF33C01B521327006CE39D /* LiveConnectionHelper.m in Sources */, + A2EF33C21B521327006CE39D /* StringHelper.m in Sources */, + A2EF33C31B521327006CE39D /* UrlHelper.m in Sources */, + A2EF33CF1B521327006CE39D /* LiveConnectClient.m in Sources */, + A2EF33C11B521327006CE39D /* StreamReader.m in Sources */, + A2EF33CC1B521327006CE39D /* LiveOperationCore.m in Sources */, + A2EF33BD1B521327006CE39D /* JsonWriter.m in Sources */, + A2EF33D11B521327006CE39D /* LiveDownloadOperation.m in Sources */, + A2EF33C71B521327006CE39D /* LiveAuthRefreshRequest.m in Sources */, + A2EF33CA1B521327006CE39D /* LiveConnectClientCore.m in Sources */, + A2EF33BC1B521327006CE39D /* JsonParser.m in Sources */, + A2EF33BF1B521327006CE39D /* LiveAuthHelper.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -289,6 +439,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -305,6 +456,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../src/**", + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + ); IPHONEOS_DEPLOYMENT_TARGET = 5.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -327,6 +483,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -336,6 +493,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../src/**", + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + ); IPHONEOS_DEPLOYMENT_TARGET = 5.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; @@ -346,7 +508,6 @@ }; 520C9D0614FD46BB002BF021 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2D0F2C182BE02721B87D582D /* Pods-PhotoSky.debug.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -363,7 +524,6 @@ }; 520C9D0714FD46BB002BF021 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EFD5686BE4FDE0EB71259F6C /* Pods-PhotoSky.release.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/examples/PhotoSky/PhotoSky/PSMainViewController.h b/examples/PhotoSky/PhotoSky/PSMainViewController.h index dbf9909..3c35441 100644 --- a/examples/PhotoSky/PhotoSky/PSMainViewController.h +++ b/examples/PhotoSky/PhotoSky/PSMainViewController.h @@ -25,7 +25,7 @@ #import -#import +#import "LiveConnectClient.h" // #import @interface PSMainViewController : UIViewController { diff --git a/examples/PhotoSky/PhotoSky/PSSkyDriveObject.h b/examples/PhotoSky/PhotoSky/PSSkyDriveObject.h index 811ec76..054b8d7 100644 --- a/examples/PhotoSky/PhotoSky/PSSkyDriveObject.h +++ b/examples/PhotoSky/PhotoSky/PSSkyDriveObject.h @@ -25,7 +25,7 @@ #import -#import +#import "LiveConnectClient.h" // #import @class PSSkyDriveObject; diff --git a/examples/PhotoSky/PhotoSky/PSSkyPhotoViewer.m b/examples/PhotoSky/PhotoSky/PSSkyPhotoViewer.m index 72d7c44..65f2d6e 100644 --- a/examples/PhotoSky/PhotoSky/PSSkyPhotoViewer.m +++ b/examples/PhotoSky/PhotoSky/PSSkyPhotoViewer.m @@ -41,6 +41,17 @@ @implementation PSSkyPhotoViewer @synthesize currentFolder; @synthesize currentModal; ++ (void) setEdgesForExtendedLayout:(UIViewController *)ctrl { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" +#pragma clang diagnostic ignored "-Wdeprecated" + // http://www.ifun.cc/blog/2014/02/08/gua-pei-ios7kai-fa-1/ + if ([ctrl respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { + [ctrl setEdgesForExtendedLayout:UIRectEdgeNone]; + } +#pragma clang diagnostic pop +} + - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; @@ -63,6 +74,8 @@ - (void)didReceiveMemoryWarning - (void)viewDidLoad { [super viewDidLoad]; + + [[self class] setEdgesForExtendedLayout:self]; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone diff --git a/src/LiveSDK.xcodeproj/project.pbxproj b/src/LiveSDK.xcodeproj/project.pbxproj index 24c1677..bcdf08e 100755 --- a/src/LiveSDK.xcodeproj/project.pbxproj +++ b/src/LiveSDK.xcodeproj/project.pbxproj @@ -27,24 +27,6 @@ 5210CF86149290E400C525F3 /* StreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 52AB74BB148D5548004FC55A /* StreamReader.m */; }; 5210CF87149290E400C525F3 /* LiveOperationProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B4944C1487625C001EA573 /* LiveOperationProgress.m */; }; 5210CF881492912100C525F3 /* LiveApiHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 52F76E90147A308500DA0A46 /* LiveApiHelper.m */; }; - 5210CF9D14954C0A00C525F3 /* LiveApiHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 52F76E90147A308500DA0A46 /* LiveApiHelper.m */; }; - 5210CF9E14954C5300C525F3 /* JsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 5285175B1471FFFE009E8BD6 /* JsonParser.m */; }; - 5210CF9F14954C5300C525F3 /* JsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5285175D1471FFFF009E8BD6 /* JsonWriter.m */; }; - 5210CFA014954C5300C525F3 /* LiveAuthHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6FC146E36CA000973C1 /* LiveAuthHelper.m */; }; - 5210CFA114954C5300C525F3 /* StringHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6E2146C761C000973C1 /* StringHelper.m */; }; - 5210CFA214954C5300C525F3 /* UrlHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6E4146C761C000973C1 /* UrlHelper.m */; }; - 5210CFA314954C5300C525F3 /* StreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 52AB74BB148D5548004FC55A /* StreamReader.m */; }; - 5210CFA414954CA800C525F3 /* LiveConnectSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6D2146C7550000973C1 /* LiveConnectSession.m */; }; - 52559D911506EC7100F0DF04 /* LiveAuthHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D6E1506EA7400F0DF04 /* LiveAuthHelperTests.m */; }; - 52559D921506EC7100F0DF04 /* LiveAuthStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D701506EA7400F0DF04 /* LiveAuthStorageTests.m */; }; - 52559D931506EC7100F0DF04 /* LiveConnectClientApiTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D721506EA7400F0DF04 /* LiveConnectClientApiTests.m */; }; - 52559D941506EC7100F0DF04 /* LiveConnectClientAuthTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D741506EA7400F0DF04 /* LiveConnectClientAuthTests.m */; }; - 52559D951506EC7100F0DF04 /* LiveConnectClientListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D761506EA7400F0DF04 /* LiveConnectClientListener.m */; }; - 52559D961506EC7100F0DF04 /* MockFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D781506EA7400F0DF04 /* MockFactory.m */; }; - 52559D971506EC7100F0DF04 /* MockResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D7A1506EA7400F0DF04 /* MockResponse.m */; }; - 52559D981506EC7100F0DF04 /* MockUrlConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D7C1506EA7400F0DF04 /* MockUrlConnection.m */; }; - 52559D991506EC7100F0DF04 /* StringHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D7E1506EA7400F0DF04 /* StringHelperTests.m */; }; - 52559D9A1506EC7100F0DF04 /* UrlHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 52559D801506EA7400F0DF04 /* UrlHelperTests.m */; }; 5285183B14728292009E8BD6 /* LiveAuthDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 529DB6CE146C7550000973C1 /* LiveAuthDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5285183C14728292009E8BD6 /* LiveConnectClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 529DB6CF146C7550000973C1 /* LiveConnectClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5285183D14728292009E8BD6 /* LiveConnectSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 529DB6D1146C7550000973C1 /* LiveConnectSession.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -76,27 +58,11 @@ 5285185C147282E8009E8BD6 /* LiveOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6D7146C7550000973C1 /* LiveOperation.m */; }; 5285185E147282F8009E8BD6 /* LiveAuthDialog_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 529DB6F8146DFAC1000973C1 /* LiveAuthDialog_iPhone.xib */; settings = {ATTRIBUTES = (Public, ); }; }; 528518A91473BF59009E8BD6 /* LiveConnectSessionStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 528518A61473BE78009E8BD6 /* LiveConnectSessionStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5297DDF6145E102B005B463E /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5297DDF5145E102B005B463E /* SenTestingKit.framework */; }; - 5297DDF7145E102B005B463E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5297DDDD145E102B005B463E /* UIKit.framework */; }; - 5297DDF8145E102B005B463E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5297DDDF145E102B005B463E /* Foundation.framework */; }; 529AD7A4159D8CD3004A195B /* LiveUploadOverwriteOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 5297B269159A51F400ABFB6A /* LiveUploadOverwriteOption.h */; settings = {ATTRIBUTES = (Public, ); }; }; 52A497E6149F16A50034BE79 /* LiveConnectionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 52C47500149B24F1007E646F /* LiveConnectionHelper.m */; }; 52A497E8149F174D0034BE79 /* backArrow_black.png in Resources */ = {isa = PBXBuildFile; fileRef = 52C474EE1499E7F0007E646F /* backArrow_black.png */; }; 52A497E9149F178D0034BE79 /* LiveConnectionHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 52C474FF149B24F1007E646F /* LiveConnectionHelper.h */; settings = {ATTRIBUTES = (Private, ); }; }; 52A497EA149F178D0034BE79 /* LiveConnectionCreatorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 52C47502149B2E40007E646F /* LiveConnectionCreatorDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 52B54AEC1491074E001E1E17 /* LiveAuthStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B54AE514909F16001E1E17 /* LiveAuthStorage.m */; }; - 52C4750B149B38D1007E646F /* LiveAuthRefreshRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B54AEE14912DB8001E1E17 /* LiveAuthRefreshRequest.m */; }; - 52C4750C149B38D1007E646F /* LiveAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB712146F5809000973C1 /* LiveAuthRequest.m */; }; - 52C4750D149B38D1007E646F /* LiveConnectClientCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6EF146C7AEE000973C1 /* LiveConnectClientCore.m */; }; - 52C4750E149B38D1007E646F /* LiveDownloadOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B494521488BDF5001EA573 /* LiveDownloadOperationCore.m */; }; - 52C4750F149B38D1007E646F /* LiveOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6EC146C7A39000973C1 /* LiveOperationCore.m */; }; - 52C47510149B38D1007E646F /* LiveUploadOperationCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B4946E148B7D67001EA573 /* LiveUploadOperationCore.m */; }; - 52C47511149B38D1007E646F /* LiveConnectionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 52C47500149B24F1007E646F /* LiveConnectionHelper.m */; }; - 52C47512149B38D1007E646F /* LiveConnectClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6D0146C7550000973C1 /* LiveConnectClient.m */; }; - 52C47513149B38D1007E646F /* LiveDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6D4146C7550000973C1 /* LiveDownloadOperation.m */; }; - 52C47514149B38D1007E646F /* LiveOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 529DB6D7146C7550000973C1 /* LiveOperation.m */; }; - 52C47515149B38D1007E646F /* LiveOperationProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = 52B4944C1487625C001EA573 /* LiveOperationProgress.m */; }; - 52C47518149B390F007E646F /* LiveAuthDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 5210CF951494445E00C525F3 /* LiveAuthDialog.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -136,7 +102,6 @@ 5297DDDD145E102B005B463E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 5297DDDF145E102B005B463E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 5297DDE1145E102B005B463E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 5297DDF4145E102B005B463E /* LiveSDKTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LiveSDKTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 5297DDF5145E102B005B463E /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; 5299273D14BE3A3F0075376C /* LiveSDK_framework-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "LiveSDK_framework-Info.plist"; path = "LiveSDK_framework/LiveSDK_framework-Info.plist"; sourceTree = SOURCE_ROOT; }; 5299273E14BE3A3F0075376C /* LiveSDK_framework-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "LiveSDK_framework-Prefix.pch"; path = "LiveSDK_framework/LiveSDK_framework-Prefix.pch"; sourceTree = SOURCE_ROOT; }; @@ -199,16 +164,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5297DDF0145E102B005B463E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5297DDF6145E102B005B463E /* SenTestingKit.framework in Frameworks */, - 5297DDF7145E102B005B463E /* UIKit.framework in Frameworks */, - 5297DDF8145E102B005B463E /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -254,7 +209,6 @@ 5297DDDA145E102B005B463E /* Products */ = { isa = PBXGroup; children = ( - 5297DDF4145E102B005B463E /* LiveSDKTests.octest */, 5285182E14727FE6009E8BD6 /* LiveSDK.framework */, ); name = Products; @@ -469,24 +423,6 @@ productReference = 5285182E14727FE6009E8BD6 /* LiveSDK.framework */; productType = "com.apple.product-type.bundle"; }; - 5297DDF3145E102B005B463E /* LiveSDKTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5297DE09145E102B005B463E /* Build configuration list for PBXNativeTarget "LiveSDKTests" */; - buildPhases = ( - 5297DDEF145E102B005B463E /* Sources */, - 5297DDF0145E102B005B463E /* Frameworks */, - 5297DDF1145E102B005B463E /* Resources */, - 5297DDF2145E102B005B463E /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = LiveSDKTests; - productName = LiveSDKTests; - productReference = 5297DDF4145E102B005B463E /* LiveSDKTests.octest */; - productType = "com.apple.product-type.bundle.ocunit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -508,7 +444,6 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 5297DDF3145E102B005B463E /* LiveSDKTests */, 5285182D14727FE6009E8BD6 /* LiveSDK */, ); }; @@ -525,31 +460,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5297DDF1145E102B005B463E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 5297DDF2145E102B005B463E /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 5285182A14727FE6009E8BD6 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -579,44 +491,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5297DDEF145E102B005B463E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 52C47518149B390F007E646F /* LiveAuthDialog.m in Sources */, - 52C4750B149B38D1007E646F /* LiveAuthRefreshRequest.m in Sources */, - 52C4750C149B38D1007E646F /* LiveAuthRequest.m in Sources */, - 52C4750D149B38D1007E646F /* LiveConnectClientCore.m in Sources */, - 52C4750E149B38D1007E646F /* LiveDownloadOperationCore.m in Sources */, - 52C4750F149B38D1007E646F /* LiveOperationCore.m in Sources */, - 52C47510149B38D1007E646F /* LiveUploadOperationCore.m in Sources */, - 52C47511149B38D1007E646F /* LiveConnectionHelper.m in Sources */, - 52C47512149B38D1007E646F /* LiveConnectClient.m in Sources */, - 52C47513149B38D1007E646F /* LiveDownloadOperation.m in Sources */, - 52C47514149B38D1007E646F /* LiveOperation.m in Sources */, - 52C47515149B38D1007E646F /* LiveOperationProgress.m in Sources */, - 5210CFA414954CA800C525F3 /* LiveConnectSession.m in Sources */, - 5210CF9E14954C5300C525F3 /* JsonParser.m in Sources */, - 5210CF9F14954C5300C525F3 /* JsonWriter.m in Sources */, - 5210CFA014954C5300C525F3 /* LiveAuthHelper.m in Sources */, - 5210CFA114954C5300C525F3 /* StringHelper.m in Sources */, - 5210CFA214954C5300C525F3 /* UrlHelper.m in Sources */, - 5210CFA314954C5300C525F3 /* StreamReader.m in Sources */, - 5210CF9D14954C0A00C525F3 /* LiveApiHelper.m in Sources */, - 52B54AEC1491074E001E1E17 /* LiveAuthStorage.m in Sources */, - 52559D911506EC7100F0DF04 /* LiveAuthHelperTests.m in Sources */, - 52559D921506EC7100F0DF04 /* LiveAuthStorageTests.m in Sources */, - 52559D931506EC7100F0DF04 /* LiveConnectClientApiTests.m in Sources */, - 52559D941506EC7100F0DF04 /* LiveConnectClientAuthTests.m in Sources */, - 52559D951506EC7100F0DF04 /* LiveConnectClientListener.m in Sources */, - 52559D961506EC7100F0DF04 /* MockFactory.m in Sources */, - 52559D971506EC7100F0DF04 /* MockResponse.m in Sources */, - 52559D981506EC7100F0DF04 /* MockUrlConnection.m in Sources */, - 52559D991506EC7100F0DF04 /* StringHelperTests.m in Sources */, - 52559D9A1506EC7100F0DF04 /* UrlHelperTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -688,6 +562,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -725,6 +600,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -752,36 +628,6 @@ }; name = Release; }; - 5297DE0A145E102B005B463E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "LiveSDK/LiveSDK-Prefix.pch"; - INFOPLIST_FILE = "UnitTests/LiveSDKTests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - 5297DE0B145E102B005B463E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "LiveSDK/LiveSDK-Prefix.pch"; - INFOPLIST_FILE = "UnitTests/LiveSDKTests-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = octest; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -803,15 +649,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5297DE09145E102B005B463E /* Build configuration list for PBXNativeTarget "LiveSDKTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5297DE0A145E102B005B463E /* Debug */, - 5297DE0B145E102B005B463E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 5297DDD0145E102B005B463E /* Project object */; diff --git a/src/LiveSDK/Library/Internal/Helpers/JsonParser.h b/src/LiveSDK/Library/Internal/Helpers/JsonParser.h index 2dcffc4..80ca80c 100644 --- a/src/LiveSDK/Library/Internal/Helpers/JsonParser.h +++ b/src/LiveSDK/Library/Internal/Helpers/JsonParser.h @@ -66,8 +66,6 @@ NSError *_error; BOOL _skipJavascriptComments; BOOL _supportJSONLight; - Class _collectionClass; - Class _objectClass; } + (id) parseText:(NSString*)text error:(NSError**)error; diff --git a/src/LiveSDK/Library/Internal/Helpers/JsonParser.m b/src/LiveSDK/Library/Internal/Helpers/JsonParser.m index d9406f1..f38153a 100644 --- a/src/LiveSDK/Library/Internal/Helpers/JsonParser.m +++ b/src/LiveSDK/Library/Internal/Helpers/JsonParser.m @@ -81,13 +81,13 @@ + (void) initialize { s_initialized = YES; s_CharacterSetNumericStartChars = - [[NSCharacterSet characterSetWithCharactersInString:@"-0123456789"] retain]; + [NSCharacterSet characterSetWithCharactersInString:@"-0123456789"]; s_CharacterSetIdentifierStartChars = - [[NSCharacterSet characterSetWithCharactersInString:@"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"] retain]; + [NSCharacterSet characterSetWithCharactersInString:@"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]; s_CharacterSetIdentifierChars = - [[NSCharacterSet characterSetWithCharactersInString:@"_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"] retain]; + [NSCharacterSet characterSetWithCharactersInString:@"_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"]; s_CharacterSetBackslashAndQuote = - [[NSCharacterSet characterSetWithCharactersInString:@"\\\""] retain]; + [NSCharacterSet characterSetWithCharactersInString:@"\\\""]; } } @@ -110,10 +110,7 @@ + (id) parseText:(NSString*)text error:(NSError**)error // If there is no result, then get the error code (if the caller wants it) if (!result && error) - (*error) = [[parser.error retain] autorelease]; - - // Clean up - [parser release]; + (*error) = parser.error; return result; } @@ -138,10 +135,7 @@ + (id) parseJSONLightText:(NSString*)text error:(NSError**)error // If there is no result, then get the error code (if the caller wants it) if (!result && error) - (*error) = [[parser.error retain] autorelease]; - - // Clean up - [parser release]; + (*error) = parser.error; return result; } @@ -157,7 +151,6 @@ - (id) initWithText:(NSString*)text if (!_scanner) { // Out of memory? - [self release]; return nil; } @@ -171,23 +164,13 @@ - (id) initWithText:(NSString*)text // a dot "." as the decimal separator). NSLocale *localeUS = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; [_scanner setLocale:localeUS]; - [localeUS release]; - - _collectionClass = [[NSMutableArray class] retain]; - _objectClass = [[NSMutableDictionary class] retain]; + + _collectionClass = [NSMutableArray class]; + _objectClass = [NSMutableDictionary class]; } return self; } -- (void) dealloc -{ - [_collectionClass release]; - [_objectClass release]; - [_scanner release]; - [_error release]; - [super dealloc]; -} - - (NSString*) memberNameForString:(NSString*)name { return name; @@ -210,11 +193,11 @@ - (id) parse id value = nil; // Wrap this call in its own autorelease pool to clean up as much as possible - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + @autoreleasepool { @try { // Do the real work (retain the value temporarily so that it won't go away with the autorelease pool) - value = [[self parseValue] retain]; + value = [self parseValue]; // Make sure that we have reached the end of the JSON text [self skipWhitespace]; @@ -224,7 +207,6 @@ - (id) parse @catch (NSException *ex) { // An exception occurred, clear the parsed object - [value release]; value = nil; // Capture the exception information in the parse error object @@ -248,11 +230,10 @@ - (id) parse } @finally { - // Clean up the autorelease pool - [pool drain]; } + } - return [value autorelease]; + return value; } - (NSUInteger) lineNumberForParseLocation:(NSUInteger)location column:(NSUInteger*)col @@ -428,7 +409,7 @@ - (NSString*) parseStringValue } // Create the mutable string value - NSMutableString *value = [[[NSMutableString alloc] init] autorelease]; + NSMutableString *value = [[NSMutableString alloc] init]; if (!value) [self raiseError:MSJSONErrorOutOfMemory reason:@"Error creating mutable string - out of memory?"]; while (true) @@ -513,7 +494,7 @@ - (id) parseCollection ScanCharacter('['); // Create the collection object and verify that it supports the 'addObject:' selector - id collection = [[[_collectionClass alloc] init] autorelease]; + id collection = [[_collectionClass alloc] init]; if (!collection) [self raiseError:MSJSONErrorOutOfMemory reason:@"Error creating collection - out of memory?"]; // MSDbgCheck([collection respondsToSelector:@selector(addObject:)] || [collection respondsToSelector:@selector(addJSONObject:)]); @@ -562,7 +543,7 @@ - (id) parseObject ScanCharacter('{'); // Create and initialize the object - id object = [[[_objectClass alloc] init] autorelease]; + id object = [[_objectClass alloc] init]; if (!object) [self raiseError:MSJSONErrorOutOfMemory reason:@"Error creating object - out of memory?"]; // Check to see if this object supports the custom setter @@ -646,7 +627,6 @@ + (id) dateWithJSONStringValue:(NSString*)value return nil; // Get the date for this time value (adjusted to seconds) - [self release]; date = [NSDate dateWithTimeIntervalSince1970:(timeValue / 1000.0)]; return date; } diff --git a/src/LiveSDK/Library/Internal/Helpers/JsonWriter.m b/src/LiveSDK/Library/Internal/Helpers/JsonWriter.m index cd74d7c..7262d99 100644 --- a/src/LiveSDK/Library/Internal/Helpers/JsonWriter.m +++ b/src/LiveSDK/Library/Internal/Helpers/JsonWriter.m @@ -44,7 +44,7 @@ + (NSString*) textForValue:(id)value } @finally { - [writer release]; + //[writer release]; } return text; } @@ -66,7 +66,7 @@ + (NSString*) escapeStringValue:(NSString*)value // escaped. NSCharacterSet *validCharacters = [NSCharacterSet characterSetWithCharactersInString: @" !#$%&'()*+,-.0123456789:;<=>?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/"]; - sInvalidStringCharacters = [[validCharacters invertedSet] retain]; + sInvalidStringCharacters = [validCharacters invertedSet]; } } } @@ -76,7 +76,7 @@ + (NSString*) escapeStringValue:(NSString*)value if (searchRange.location == NSNotFound) return value; - NSMutableString *result = [[[NSMutableString alloc] init] autorelease]; + NSMutableString *result = [[NSMutableString alloc] init]; if (!result) return nil; // out of memory? NSUInteger strLen = [value length]; @@ -148,23 +148,14 @@ - (id) initWithValue:(id)value memberInfo:(id)schema self = [super init]; if (self) { - _root = [value retain]; - _rootSchema = [schema retain]; + _root = value; + _rootSchema = schema; _objectStack = [[NSMutableArray alloc] init]; _memberKeysSelector = NULL; } return self; } -- (void) dealloc -{ - [_root release]; - [_rootSchema release]; - [_text release]; - [_objectStack release]; - [super dealloc]; -} - - (NSString*) JSONText { if (!_text) @@ -176,7 +167,7 @@ - (NSString*) JSONText [self appendValue:_root]; // MSDbgCheck([_objectStack count] == 0); } - return [[_text retain] autorelease]; + return _text; } - (void) pushIndentLevel @@ -210,7 +201,8 @@ - (void) appendValue:(id)value } else if (_memberKeysSelector && [value respondsToSelector:_memberKeysSelector]) { - id schema = [value performSelector:_memberKeysSelector]; + //id schema = [value performSelector:_memberKeysSelector]; + id schema = ((id (*)(id, SEL))[value methodForSelector:_memberKeysSelector])(value, _memberKeysSelector); [self appendObject:value withMemberInfo:schema]; } else if ([value respondsToSelector:@selector(JSONMemberKeys)]) @@ -369,7 +361,7 @@ - (NSString*) JSONDescription // When an NSNumber value is initialized with +numberWithBool: it generates a // CFBooleanRef value (class == NSCFBoolean). This is the safest test to determine // if this NSNumber value is actually a boolean value - if (CFGetTypeID(self) == CFBooleanGetTypeID()) + if (CFGetTypeID((__bridge CFTypeRef)(self)) == CFBooleanGetTypeID()) return [self boolValue] ? @"true" : @"false"; // Force the locale for the text generation to en_US to match the JSON spec @@ -378,7 +370,6 @@ - (NSString*) JSONDescription { NSLocale *localeUS = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; NSString *numberString = [self descriptionWithLocale:localeUS]; - [localeUS release]; return numberString; } else diff --git a/src/LiveSDK/Library/Internal/Helpers/LiveApiHelper.m b/src/LiveSDK/Library/Internal/Helpers/LiveApiHelper.m index d2aaa8d..714bcf8 100644 --- a/src/LiveSDK/Library/Internal/Helpers/LiveApiHelper.m +++ b/src/LiveSDK/Library/Internal/Helpers/LiveApiHelper.m @@ -111,10 +111,9 @@ + (void) parseApiResponse:(NSData *)data return; } - *textResponse = [[[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding] - autorelease]; - + *textResponse = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; + *response = [MSJSONParser parseText:*textResponse error:error ]; diff --git a/src/LiveSDK/Library/Internal/Helpers/LiveAuthHelper.m b/src/LiveSDK/Library/Internal/Helpers/LiveAuthHelper.m index a9dd7c6..10df40d 100644 --- a/src/LiveSDK/Library/Internal/Helpers/LiveAuthHelper.m +++ b/src/LiveSDK/Library/Internal/Helpers/LiveAuthHelper.m @@ -176,9 +176,8 @@ + (NSError *) createAuthError:(NSInteger)code + (id) readAuthResponse:(NSData *)data { - NSString* responseString = [[[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding] - autorelease]; + NSString* responseString = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; NSError *error = nil; NSDictionary *params = [MSJSONParser parseText:responseString error:&error ]; @@ -194,13 +193,12 @@ + (id) readAuthResponse:(NSData *)data NSTimeInterval expiresIn = [expiresInStr doubleValue]; NSDate *expires = [NSDate dateWithTimeIntervalSinceNow:expiresIn]; - LiveConnectSession *session = [[[LiveConnectSession alloc] initWithAccessToken:accessToken + LiveConnectSession *session = [[LiveConnectSession alloc] initWithAccessToken:accessToken authenticationToken:authenticationToken refreshToken:refreshToken scopes:scopes expires:expires - userId:userId] - autorelease]; + userId:userId]; return session; } else diff --git a/src/LiveSDK/Library/Internal/Helpers/LiveConnectionHelper.m b/src/LiveSDK/Library/Internal/Helpers/LiveConnectionHelper.m index 5135ef8..1a693f9 100644 --- a/src/LiveSDK/Library/Internal/Helpers/LiveConnectionHelper.m +++ b/src/LiveSDK/Library/Internal/Helpers/LiveConnectionHelper.m @@ -32,7 +32,7 @@ @implementation LiveConnectionHelper + (void) setLiveConnectCreator:(id)creator { - overrideCreator = [creator retain]; + overrideCreator = creator; } + (id) createConnectionWithRequest:(NSURLRequest *)request diff --git a/src/LiveSDK/Library/Internal/Helpers/StreamReader.m b/src/LiveSDK/Library/Internal/Helpers/StreamReader.m index 58ad124..9650ca3 100644 --- a/src/LiveSDK/Library/Internal/Helpers/StreamReader.m +++ b/src/LiveSDK/Library/Internal/Helpers/StreamReader.m @@ -40,21 +40,13 @@ - (id)initWithStream:(NSInputStream *)stream self = [super init]; if (self) { - _stream = [stream retain]; + _stream = stream; _delegate = delegate; } return self; } -- (void)dealloc -{ - [_stream release]; - [data release]; - - [super dealloc]; -} - - (void)start { _stream.delegate = self; diff --git a/src/LiveSDK/Library/Internal/Helpers/UrlHelper.m b/src/LiveSDK/Library/Internal/Helpers/UrlHelper.m index 965af8e..7a8d017 100644 --- a/src/LiveSDK/Library/Internal/Helpers/UrlHelper.m +++ b/src/LiveSDK/Library/Internal/Helpers/UrlHelper.m @@ -47,7 +47,7 @@ + (NSString *) encodeUrlParameters: (NSDictionary *)params + (NSDictionary *) decodeUrlParameters: (NSString *)paramStr { - NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; NSArray *kvStrs = [paramStr componentsSeparatedByString: @"&"]; for (NSString *kvStr in kvStrs) diff --git a/src/LiveSDK/Library/Internal/LiveAuthDialog.m b/src/LiveSDK/Library/Internal/LiveAuthDialog.m index ea3eba2..3025b29 100644 --- a/src/LiveSDK/Library/Internal/LiveAuthDialog.m +++ b/src/LiveSDK/Library/Internal/LiveAuthDialog.m @@ -41,8 +41,8 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:nibBundleOrNil]; if (self) { - _startUrl = [startUrl retain]; - _endUrl = [endUrl retain]; + _startUrl = startUrl; + _endUrl = endUrl; _delegate = delegate; canDismiss = NO; } @@ -50,15 +50,6 @@ - (id)initWithNibName:(NSString *)nibNameOrNil return self; } -- (void)dealloc -{ - [_startUrl release]; - [_endUrl release]; - [webView release]; - - [super dealloc]; -} - - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. @@ -91,8 +82,8 @@ - (void)viewDidLoad forControlEvents:UIControlEventTouchUpInside]; //create a UIBarButtonItem with the button as a custom view - self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] - initWithCustomView:button]autorelease]; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] + initWithCustomView:button]; //Load the Url request in the UIWebView. NSURLRequest *requestObj = [NSURLRequest requestWithURL:_startUrl]; diff --git a/src/LiveSDK/Library/Internal/LiveAuthRefreshRequest.m b/src/LiveSDK/Library/Internal/LiveAuthRefreshRequest.m index c3b9f66..f689413 100644 --- a/src/LiveSDK/Library/Internal/LiveAuthRefreshRequest.m +++ b/src/LiveSDK/Library/Internal/LiveAuthRefreshRequest.m @@ -46,11 +46,11 @@ - (id)initWithClientId:(NSString *)clientId self = [super init]; if (self) { - _clientId = [clientId retain]; - _scopes = [scopes retain]; - _refreshToken = [refreshToken retain]; + _clientId = clientId; + _scopes = scopes; + _refreshToken = refreshToken; _delegate = delegate; - _userState = [userState retain]; + _userState = userState; _client = client; } @@ -60,15 +60,6 @@ - (id)initWithClientId:(NSString *)clientId - (void) dealloc { [tokenConnection cancel]; - - [_clientId release]; - [_scopes release]; - [_refreshToken release]; - [_userState release]; - [tokenConnection release]; - [tokenResponseData release]; - - [super dealloc]; } - (void) execute @@ -122,7 +113,7 @@ - (void)connection:(NSURLConnection *)connection } else { - self.tokenResponseData = [[[NSMutableData alloc] init] autorelease]; + self.tokenResponseData = [[NSMutableData alloc] init]; } } diff --git a/src/LiveSDK/Library/Internal/LiveAuthRequest.m b/src/LiveSDK/Library/Internal/LiveAuthRequest.m index 418d5d2..254bdba 100644 --- a/src/LiveSDK/Library/Internal/LiveAuthRequest.m +++ b/src/LiveSDK/Library/Internal/LiveAuthRequest.m @@ -55,9 +55,9 @@ - (id) initWithClient:(LiveConnectClientCore *)client { _client = client; _scopes = [scopes copy]; - _currentViewController = [currentViewController retain]; + _currentViewController = currentViewController; _delegate = delegate; - _userState = [userState retain]; + _userState = userState; _status = AuthNotStarted; } @@ -68,19 +68,6 @@ - (void)dealloc { _authViewController.delegate = nil; [_tokenConnection cancel]; - - [_scopes release]; - [_userState release]; - - [_authCode release]; - [_session release]; - [_error release]; - [_currentViewController release]; - [_authViewController release]; - [_tokenConnection release]; - [_tokenResponseData release]; - - [super dealloc]; } - (BOOL)isUserInvolved @@ -182,8 +169,7 @@ - (void)authorize delegate:self]; // Create a Navigation controller - UINavigationController *modalDialog = [[[UINavigationController alloc]initWithRootViewController:self.authViewController] - autorelease]; + UINavigationController *modalDialog = [[UINavigationController alloc]initWithRootViewController:self.authViewController]; [self.currentViewController presentViewController:modalDialog animated:YES @@ -295,7 +281,7 @@ - (void)connection:(NSURLConnection *)connection } else { - self.tokenResponseData = [[[NSMutableData alloc] init] autorelease]; + self.tokenResponseData = [[NSMutableData alloc] init]; } } diff --git a/src/LiveSDK/Library/Internal/LiveAuthStorage.m b/src/LiveSDK/Library/Internal/LiveAuthStorage.m index fe13d30..3310497 100644 --- a/src/LiveSDK/Library/Internal/LiveAuthStorage.m +++ b/src/LiveSDK/Library/Internal/LiveAuthStorage.m @@ -44,8 +44,8 @@ - (id) initWithClientId:(NSString *)clientId { // Find the file path NSString *libDirectory = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - _filePath = [[libDirectory stringByAppendingPathComponent:@"LiveService_auth.plist"] retain]; - _clientId = [clientId retain]; + _filePath = [libDirectory stringByAppendingPathComponent:@"LiveService_auth.plist"]; + _clientId = clientId; // If file exist, load the file if ([[NSFileManager defaultManager] fileExistsAtPath:_filePath]) @@ -55,7 +55,7 @@ - (id) initWithClientId:(NSString *)clientId NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:_filePath]; if ([clientId isEqualToString:[dictionary valueForKey: LIVE_AUTH_CLIENTID]]) { - _refreshToken = [[dictionary valueForKey:LIVE_AUTH_REFRESH_TOKEN] retain]; + _refreshToken = [dictionary valueForKey:LIVE_AUTH_REFRESH_TOKEN]; } else { @@ -69,15 +69,6 @@ - (id) initWithClientId:(NSString *)clientId return self; } -- (void) dealloc -{ - [_filePath release]; - [_clientId release]; - [_refreshToken release]; - - [super dealloc]; -} - - (void) save { NSMutableDictionary *data = [[NSMutableDictionary alloc] init]; @@ -85,13 +76,11 @@ - (void) save [data setValue:_refreshToken forKey:LIVE_AUTH_REFRESH_TOKEN]; [data writeToFile:_filePath atomically:YES]; - [data release]; } - (void) setRefreshToken:(NSString *)refreshToken { - [_refreshToken release]; - _refreshToken = [refreshToken retain]; + _refreshToken = refreshToken; [self save]; } diff --git a/src/LiveSDK/Library/Internal/LiveConnectClientCore.m b/src/LiveSDK/Library/Internal/LiveConnectClientCore.m index 2c50c82..1169ee7 100644 --- a/src/LiveSDK/Library/Internal/LiveConnectClientCore.m +++ b/src/LiveSDK/Library/Internal/LiveConnectClientCore.m @@ -72,15 +72,6 @@ - (void)dealloc // dealloced. when we set the authRefreshRequest to nil it will be autoreleased [self.authRefreshRequest cancel]; self.authRefreshRequest = nil; - - - [_clientId release]; - [_scopes release]; - [_session release]; - [_authRequest release]; - [_storage release]; - - [super dealloc]; } #pragma mark Auth methods @@ -98,13 +89,11 @@ - (void) login:(UIViewController *)currentViewController return; } - LiveAuthRequest *authRequest = [[[LiveAuthRequest alloc] initWithClient:self + LiveAuthRequest *authRequest = [[LiveAuthRequest alloc] initWithClient:self scopes:scopes currentViewController:currentViewController delegate:delegate - userState:userState] - autorelease]; - + userState:userState]; self.authRequest = authRequest; [authRequest execute]; @@ -140,8 +129,7 @@ - (void) sendAuthCompletedMessage:(NSArray *)eventArgs - (void) setSession:(LiveConnectSession *)session { - [_session release]; - _session = [session retain]; + _session = session; if (_session == nil) { @@ -162,12 +150,12 @@ - (void) refreshSessionWithDelegate:(id)delegate if ([LiveAuthHelper shouldRefreshToken:_session refreshToken:_storage.refreshToken]) { - self.authRefreshRequest = [[[LiveAuthRefreshRequest alloc] initWithClientId:_clientId + self.authRefreshRequest = [[LiveAuthRefreshRequest alloc] initWithClientId:_clientId scope:_scopes refreshToken:_storage.refreshToken delegate:delegate userState:userState - clientStub:self] autorelease]; + clientStub:self]; [self.authRefreshRequest execute]; } @@ -192,30 +180,28 @@ - (LiveOperation *) sendRequestWithMethod:(NSString *)method userState:(id) userState { NSData *bodyData = [jsonBody dataUsingEncoding:NSUTF8StringEncoding]; - LiveOperationCore *operation = [[[LiveOperationCore alloc] initWithMethod:method + LiveOperationCore *operation = [[LiveOperationCore alloc] initWithMethod:method path:path requestBody:bodyData delegate:delegate userState:userState - liveClient:self] - autorelease]; - [operation execute]; + liveClient:self]; + [operation execute]; - return [[[LiveOperation alloc] initWithOpCore:operation] autorelease]; + return [[LiveOperation alloc] initWithOpCore:operation]; } - (LiveDownloadOperation *) downloadFromPath:(NSString *)path delegate:(id )delegate userState:(id)userState { - LiveDownloadOperationCore *operation = [[[LiveDownloadOperationCore alloc] initWithPath:path + LiveDownloadOperationCore *operation = [[LiveDownloadOperationCore alloc] initWithPath:path delegate:delegate userState:userState - liveClient:self] - autorelease]; + liveClient:self]; [operation execute]; - return [[[LiveDownloadOperation alloc] initWithOpCore:operation] autorelease]; + return [[LiveDownloadOperation alloc] initWithOpCore:operation]; } - (LiveOperation *) uploadToPath:(NSString *)path @@ -225,18 +211,17 @@ - (LiveOperation *) uploadToPath:(NSString *)path delegate:(id )delegate userState:(id)userState { - LiveUploadOperationCore *operation = [[[LiveUploadOperationCore alloc] initWithPath:path + LiveUploadOperationCore *operation = [[LiveUploadOperationCore alloc] initWithPath:path fileName:fileName data:data overwrite:overwrite delegate:delegate userState:userState - liveClient:self] - autorelease]; + liveClient:self]; [operation execute]; - return [[[LiveOperation alloc] initWithOpCore:operation] autorelease]; + return [[LiveOperation alloc] initWithOpCore:operation]; } - (LiveOperation *) uploadToPath:(NSString *)path @@ -246,17 +231,16 @@ - (LiveOperation *) uploadToPath:(NSString *)path delegate:(id )delegate userState:(id)userState { - LiveUploadOperationCore *operation = [[[LiveUploadOperationCore alloc] initWithPath:path + LiveUploadOperationCore *operation = [[LiveUploadOperationCore alloc] initWithPath:path fileName:fileName inputStream:inputStream overwrite:overwrite delegate:delegate userState:userState - liveClient:self] - autorelease]; + liveClient:self]; [operation execute]; - return [[[LiveOperation alloc] initWithOpCore:operation] autorelease]; + return [[LiveOperation alloc] initWithOpCore:operation]; } @end diff --git a/src/LiveSDK/Library/Internal/LiveDownloadOperationCore.m b/src/LiveSDK/Library/Internal/LiveDownloadOperationCore.m index 8f10fbf..9772d73 100644 --- a/src/LiveSDK/Library/Internal/LiveDownloadOperationCore.m +++ b/src/LiveSDK/Library/Internal/LiveDownloadOperationCore.m @@ -115,12 +115,11 @@ - (void) operationReceivedData:(NSData *)data contentLength = [[self.httpResponse.allHeaderFields valueForKey:@"Content-Length"] intValue]; } - LiveOperationProgress *progress = [[[LiveOperationProgress alloc] + LiveOperationProgress *progress = [[LiveOperationProgress alloc] initWithBytesTransferred:self.responseData.length - totalBytes:contentLength] - autorelease]; + totalBytes:contentLength]; - [self.delegate liveDownloadOperationProgressed:progress + [self.delegate liveDownloadOperationProgressed:progress data:data operation:self.publicOperation]; } diff --git a/src/LiveSDK/Library/Internal/LiveOperationCore.m b/src/LiveSDK/Library/Internal/LiveOperationCore.m index ba54f44..a85252a 100644 --- a/src/LiveSDK/Library/Internal/LiveOperationCore.m +++ b/src/LiveSDK/Library/Internal/LiveOperationCore.m @@ -67,10 +67,10 @@ - (id) initWithMethod:(NSString *)method { _method = [method copy]; _path = [path copy]; - _requestBody = [requestBody retain]; + _requestBody = requestBody ; _delegate = delegate; - _userState = [userState retain]; - _liveClient = [liveClient retain]; + _userState = userState ; + _liveClient = liveClient; httpError = nil; completed = NO; } @@ -90,37 +90,16 @@ - (id) initWithMethod:(NSString *)method { _method = [method copy]; _path = [path copy]; - _inputStream = [inputStream retain]; + _inputStream = inputStream; _delegate = delegate; - _userState = [userState retain]; - _liveClient = [liveClient retain]; + _userState = userState; + _liveClient = liveClient; completed = NO; } return self; } -- (void)dealloc -{ - [_method release]; - [_path release]; - [_requestBody release]; - [_userState release]; - [_liveClient release]; - [_inputStream release]; - [streamReader release]; - [request release]; - [rawResult release]; - [result release]; - [connection release]; - [responseData release]; - [publicOperation release]; - [httpResponse release]; - [httpError release]; - - [super dealloc]; -} - - (void) execute { [_liveClient refreshSessionWithDelegate:self @@ -167,9 +146,8 @@ - (void) setRequestContentType - (void) readInputStream { - self.streamReader = [[[StreamReader alloc]initWithStream:_inputStream - delegate:self] - autorelease ]; + self.streamReader = [[StreamReader alloc]initWithStream:_inputStream + delegate:self]; [self.streamReader start]; } diff --git a/src/LiveSDK/Library/Internal/LiveUploadOperationCore.m b/src/LiveSDK/Library/Internal/LiveUploadOperationCore.m index 68d2859..005a4fe 100644 --- a/src/LiveSDK/Library/Internal/LiveUploadOperationCore.m +++ b/src/LiveSDK/Library/Internal/LiveUploadOperationCore.m @@ -79,15 +79,6 @@ - (id) initWithPath:(NSString *)path return self; } -- (void)dealloc -{ - [_fileName release]; - [_queryUploadLocationOp release]; - [_uploadPath release]; - - [super dealloc]; -} - #pragma mark override methods - (NSURL *)requestUrl @@ -138,9 +129,8 @@ - (void)connection:(NSURLConnection *)connection totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { - LiveOperationProgress *progress = [[[LiveOperationProgress alloc] initWithBytesTransferred:totalBytesWritten - totalBytes:totalBytesExpectedToWrite] - autorelease]; + LiveOperationProgress *progress = [[LiveOperationProgress alloc] initWithBytesTransferred:totalBytesWritten + totalBytes:totalBytesExpectedToWrite]; if ([self.delegate respondsToSelector:@selector(liveUploadOperationProgressed:operation:)]) { @@ -158,23 +148,22 @@ - (void)queryUploadLocation if ([UrlHelper isFullUrl:self.path]) { - _uploadPath = [self.path retain]; + _uploadPath = self.path; [self sendRequest]; } else { - _queryUploadLocationOp = [[self.liveClient sendRequestWithMethod:@"GET" + _queryUploadLocationOp = [self.liveClient sendRequestWithMethod:@"GET" path:self.path jsonBody:nil delegate:self - userState:@"QUERY_UPLOAD_LOCATION"] - retain]; + userState:@"QUERY_UPLOAD_LOCATION"]; }; } - (void)liveOperationSucceeded:(LiveOperation *)operation { - _uploadPath = [[operation.result valueForKey:@"upload_location"] retain]; + _uploadPath = [operation.result valueForKey:@"upload_location"]; if ([StringHelper isNullOrEmpty:_uploadPath]) { diff --git a/src/LiveSDK/Library/Public/LiveConnectClient.m b/src/LiveSDK/Library/Public/LiveConnectClient.m index 998d745..c435242 100644 --- a/src/LiveSDK/Library/Public/LiveConnectClient.m +++ b/src/LiveSDK/Library/Public/LiveConnectClient.m @@ -99,13 +99,6 @@ - (id) initWithClientId:(NSString *)clientId return self; } -- (void)dealloc -{ - [_liveClientCore release]; - - [super dealloc]; -} - #pragma mark Parameter validation - (void) validateInit diff --git a/src/LiveSDK/Library/Public/LiveConnectSession.m b/src/LiveSDK/Library/Public/LiveConnectSession.m index 6e512f3..43ce2c7 100644 --- a/src/LiveSDK/Library/Public/LiveConnectSession.m +++ b/src/LiveSDK/Library/Public/LiveConnectSession.m @@ -45,27 +45,15 @@ - (id) initWithAccessToken:(NSString *)accessToken self = [super init]; if (self) { - _accessToken = [accessToken retain]; - _authenticationToken = [authenticationToken retain]; - _refreshToken = [refreshToken retain]; - _scopes = [scopes retain]; - _expires = [expires retain]; - _userId = [userId retain]; + _accessToken = accessToken; + _authenticationToken = authenticationToken; + _refreshToken = refreshToken; + _scopes = scopes; + _expires = expires; + _userId = userId; } return self; } -- (void)dealloc -{ - [_accessToken release]; - [_authenticationToken release]; - [_refreshToken release]; - [_scopes release]; - [_expires release]; - [_userId release]; - - [super dealloc]; -} - @end diff --git a/src/LiveSDK/Library/Public/LiveDownloadOperation.m b/src/LiveSDK/Library/Public/LiveDownloadOperation.m index 6049bf0..f5957f6 100644 --- a/src/LiveSDK/Library/Public/LiveDownloadOperation.m +++ b/src/LiveSDK/Library/Public/LiveDownloadOperation.m @@ -41,11 +41,4 @@ - (NSData *)data return self.liveOpCore.responseData; } -- (void)dealloc -{ - [data release]; - - [super dealloc]; -} - @end diff --git a/src/LiveSDK/Library/Public/LiveOperation.m b/src/LiveSDK/Library/Public/LiveOperation.m index 94b27f1..0980186 100644 --- a/src/LiveSDK/Library/Public/LiveOperation.m +++ b/src/LiveSDK/Library/Public/LiveOperation.m @@ -35,7 +35,7 @@ - (id) initWithOpCore:(LiveOperationCore *)opCore self = [super init]; if (self) { - liveOpCore = [opCore retain]; + liveOpCore = opCore; liveOpCore.publicOperation = self; } @@ -45,9 +45,6 @@ - (id) initWithOpCore:(LiveOperationCore *)opCore - (void)dealloc { liveOpCore.publicOperation = nil; - [liveOpCore release]; - - [super dealloc]; } - (NSString *)path