From: <unu...@us...> - 2012-06-17 19:14:24
|
Revision: 18674 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18674&view=rev Author: ununnilium Date: 2012-06-17 19:14:17 +0000 (Sun, 17 Jun 2012) Log Message: ----------- Move Dropbox cache to Library/Application Support/Dropbox and mark for no backup of contents Add precompiled DBSessionInit framework to obfuscate new "BibDesk Mobile" Dropbox app secret Switch to full Dropbox access with (currently) hardcoded "Papers" and "PapersSimulator" directories Fix problem where accented filenames were not correctly matched and resynced every time Disable automatic sync on app startup Update to Dropbox SDK version 1.2.2 Modified Paths: -------------- trunk/bibdesk_ios/BDSKAppDelegate.m trunk/bibdesk_ios/BDSKDropboxStore.m trunk/bibdesk_ios/BDSKLocalFile.h trunk/bibdesk_ios/BDSKLocalFile.m trunk/bibdesk_ios/BibDesk-Info.plist trunk/bibdesk_ios/BibDesk.xcodeproj/project.pbxproj trunk/bibdesk_ios/DropboxSDK.framework/DropboxSDK trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBAccountInfo.h trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBMetadata.h trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBRestClient.h trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession.h trunk/bibdesk_ios/DropboxSDK.framework/Headers/DropboxSDK.h trunk/bibdesk_ios/DropboxSDK.framework/Info.plist trunk/bibdesk_ios/en.lproj/MainStoryboard_iPad.storyboard Added Paths: ----------- trunk/bibdesk_ios/DBSessionInit.framework/ trunk/bibdesk_ios/DBSessionInit.framework/DBSessionInit trunk/bibdesk_ios/DBSessionInit.framework/Headers trunk/bibdesk_ios/DBSessionInit.framework/Resources trunk/bibdesk_ios/DBSessionInit.framework/Versions/ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/DBSessionInit trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Headers/ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Headers/DBSessionInit.h trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/Info.plist trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/en.lproj/ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/en.lproj/InfoPlist.strings trunk/bibdesk_ios/DBSessionInit.framework/Versions/Current trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBDeltaEntry.h trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession+iOS.h Modified: trunk/bibdesk_ios/BDSKAppDelegate.m =================================================================== --- trunk/bibdesk_ios/BDSKAppDelegate.m 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BDSKAppDelegate.m 2012-06-17 19:14:17 UTC (rev 18674) @@ -38,7 +38,9 @@ #import "BDSKAppDelegate.h" +#import <DBSessionInit/DBSessionInit.h> #import "BDSKDropboxStore.h" +#import "BDSKLocalFile.h" @interface BDSKAppDelegate () { NSString *relinkUserId; @@ -64,23 +66,28 @@ // Override point for customization after application launch. // Set these variables before launching the app - NSString* appKey = @"eq4q5w8c3389t6u"; - NSString* appSecret = @"ezbmorda4ycilxx"; - NSString *root = kDBRootAppFolder; // Should be set to either kDBRootAppFolder or kDBRootDropbox - - DBSession* session = - [[DBSession alloc] initWithAppKey:appKey appSecret:appSecret root:root]; + //NSString* appKey = @""; + //NSString* appSecret = @""; + //NSString *root = kDBRootDropbox; // Should be set to either kDBRootAppFolder or kDBRootDropbox + //DBSession* session = [[DBSession alloc] initWithAppKey:appKey appSecret:appSecret root:root]; + DBSession* session = NewDBSessionWithBibDeskMobile(); session.delegate = self; // DBSessionDelegate methods allow you to handle re-authenticating [DBSession setSharedSession:session]; [session release]; +#if TARGET_IPHONE_SIMULATOR + [BDSKLocalFile setDropboxRoot:@"/PapersSimulator"]; +#else + [BDSKLocalFile setDropboxRoot:@"/Papers"]; +#endif + [[BDSKDropboxStore sharedStore] addLocalFiles]; _dropboxLinked = [[DBSession sharedSession] isLinked]; - if (self.dropboxLinked) { - [[BDSKDropboxStore sharedStore] startSync]; - } + //if (self.dropboxLinked) { + // [[BDSKDropboxStore sharedStore] startSync]; + //} NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:@",:;", @"BDSKGroupFieldSeparatorCharactersKey", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; @@ -134,7 +141,7 @@ - (void)toggleDropboxLink { if (!self.dropboxLinked) { - [[DBSession sharedSession] link]; + [[DBSession sharedSession] linkFromController:self.window.rootViewController]; } else { [[DBSession sharedSession] unlinkAll]; [[[[UIAlertView alloc] @@ -194,7 +201,7 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)index { if (index != alertView.cancelButtonIndex) { - [[DBSession sharedSession] linkUserId:relinkUserId]; + [[DBSession sharedSession] linkUserId:relinkUserId fromController:self.window.rootViewController]; } [relinkUserId release]; relinkUserId = nil; Modified: trunk/bibdesk_ios/BDSKDropboxStore.m =================================================================== --- trunk/bibdesk_ios/BDSKDropboxStore.m 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BDSKDropboxStore.m 2012-06-17 19:14:17 UTC (rev 18674) @@ -163,7 +163,7 @@ for (NSString *filename in contents) { NSString *fullPath = [[BDSKLocalFile documentsRoot] stringByAppendingPathComponent:filename]; - NSLog(@"Adding Local File: %@", fullPath); + //NSLog(@"Adding Local File: %@", fullPath); [fileManager fileExistsAtPath:fullPath isDirectory:(BOOL *)&isDirectory]; NSString* extension = [[filename pathExtension] lowercaseString]; if (!isDirectory && [_bibExtensions indexOfObject:extension] != NSNotFound) { @@ -172,7 +172,7 @@ [newFile release]; } else if (!isDirectory && [_pdfExtensions indexOfObject:extension] != NSNotFound) { BDSKLocalFile *newFile = [[BDSKLocalFile alloc] initWithFullPath:fullPath]; - NSLog(@"Adding Path: %@", newFile.path); + //NSLog(@"Adding Path: %@", newFile.path); [_pdfFilePaths setObject:newFile forKey:newFile.pathWithoutLeadingSlash]; [pdfsProxy addObject:newFile]; [newFile release]; @@ -183,7 +183,8 @@ - (void)startSync { if (!_syncing) { - [self.restClient loadMetadata:@"/" withHash:_rootHash]; + NSString *rootPath = [[BDSKLocalFile dropboxRoot] length] ? [BDSKLocalFile dropboxRoot] : @"/"; + [self.restClient loadMetadata:rootPath withHash:_rootHash]; [self setSyncing:YES]; } } @@ -192,7 +193,8 @@ - (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata { - if ([metadata.path isEqualToString: @"/"]) { + NSString *rootPath = [[BDSKLocalFile dropboxRoot] length] ? [BDSKLocalFile dropboxRoot] : @"/"; + if ([metadata.path compare:rootPath] == NSOrderedSame) { [_rootHash release]; _rootHash = [metadata.hash retain]; @@ -210,7 +212,7 @@ BDSKLocalFile *newFile = [[BDSKLocalFile alloc] initWithDropboxPath:child.path lastModifiedDate:child.lastModifiedDate totalByets:child.totalBytes]; NSUInteger existingIndex = [_bibliographies indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { - return [((BDSKLocalFile *)obj).path isEqualToString:newFile.path]; + return [((BDSKLocalFile *)obj).path compare:newFile.path] == NSOrderedSame; }]; if (existingIndex == NSNotFound) { @@ -230,7 +232,7 @@ BDSKLocalFile *newFile = [[BDSKLocalFile alloc] initWithDropboxPath:child.path lastModifiedDate:child.lastModifiedDate totalByets:child.totalBytes]; NSUInteger existingIndex = [_pdfs indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { - return [((BDSKLocalFile *)obj).path isEqualToString:newFile.path]; + return ![((BDSKLocalFile *)obj).path compare:newFile.path]; }]; if (existingIndex == NSNotFound) { @@ -286,7 +288,8 @@ - (void)restClient:(DBRestClient*)client metadataUnchangedAtPath:(NSString*)path { - if ([path isEqualToString: @"/"]) { + NSString *rootPath = [[BDSKLocalFile dropboxRoot] length] ? [BDSKLocalFile dropboxRoot] : @"/"; + if ([path compare:rootPath] == NSOrderedSame) { [self setSyncing:NO]; } } @@ -320,7 +323,7 @@ } NSUInteger existingIndex = [arrayProxy indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { - return [((BDSKLocalFile *)obj).path isEqualToString:loadedFile.path]; + return [((BDSKLocalFile *)obj).path compare:loadedFile.path] == NSOrderedSame; }]; if (existingIndex == NSNotFound) { Modified: trunk/bibdesk_ios/BDSKLocalFile.h =================================================================== --- trunk/bibdesk_ios/BDSKLocalFile.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BDSKLocalFile.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -52,6 +52,8 @@ + (void)initialize; + (NSString *)documentsRoot; + (void)setDocumentsRoot:(NSString *)root; ++ (NSString *)dropboxRoot; ++ (void)setDropboxRoot:(NSString *)root; - (id)initWithFullPath:(NSString *)fullPath; - (id)initWithDropboxPath:(NSString *)dropboxPath lastModifiedDate:(NSDate *)date totalByets:(long long)bytes; Modified: trunk/bibdesk_ios/BDSKLocalFile.m =================================================================== --- trunk/bibdesk_ios/BDSKLocalFile.m 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BDSKLocalFile.m 2012-06-17 19:14:17 UTC (rev 18674) @@ -40,6 +40,7 @@ static NSString *documentsRoot = nil; +static NSString *dropboxRoot = nil; @interface BDSKLocalFile () @@ -53,10 +54,31 @@ + (void)initialize { - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - [BDSKLocalFile setDocumentsRoot:[paths objectAtIndex:0]]; + NSFileManager *fileManager = [NSFileManager defaultManager]; + NSError *error = nil; + BOOL success; - NSLog(@"Documents Root: %@", [paths objectAtIndex:0]); + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); + NSString *documentsPath = [paths objectAtIndex:0]; + + documentsPath = [documentsPath stringByAppendingPathComponent:@"Application Support/Dropbox"]; + success = [fileManager createDirectoryAtPath:documentsPath withIntermediateDirectories:YES attributes:nil error:&error]; + if (!success) { + NSLog(@"Error Creating Dropbox Sync Directory: %@", [error localizedDescription]); + } + + NSURL *documentsURL = [NSURL fileURLWithPath:documentsPath]; + success = [documentsURL setResourceValue:[NSNumber numberWithBool:YES] + forKey:NSURLIsExcludedFromBackupKey error:&error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", documentsURL, error); + } + + [BDSKLocalFile setDocumentsRoot:documentsPath]; + + NSLog(@"Documents Root: %@", documentsPath); + + [BDSKLocalFile setDropboxRoot:@""]; } + (NSString *)documentsRoot { @@ -71,6 +93,18 @@ documentsRoot = root; } ++ (NSString *)dropboxRoot { + + return dropboxRoot; +} + ++ (void)setDropboxRoot:(NSString *)root { + + [root retain]; + [dropboxRoot release]; + dropboxRoot = root; +} + - (id)initWithFullPath:(NSString *)fullPath { if (self = [super init]) { @@ -97,7 +131,8 @@ if (self = [super init]) { - self.path = dropboxPath; + NSUInteger dropboxLength = dropboxRoot ? [dropboxRoot length] : 0; + self.path = [dropboxPath substringFromIndex:dropboxLength]; self.lastModifiedDate = date; self.totalBytes = bytes; } @@ -120,6 +155,8 @@ - (NSString *)dropboxPath { + if (dropboxRoot) return [dropboxRoot stringByAppendingString:path]; + return path; } Modified: trunk/bibdesk_ios/BibDesk-Info.plist =================================================================== --- trunk/bibdesk_ios/BibDesk-Info.plist 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BibDesk-Info.plist 2012-06-17 19:14:17 UTC (rev 18674) @@ -38,7 +38,7 @@ <dict> <key>CFBundleURLSchemes</key> <array> - <string>db-eq4q5w8c3389t6u</string> + <string>db-rag4sqpb5ptxufb</string> </array> </dict> </array> Modified: trunk/bibdesk_ios/BibDesk.xcodeproj/project.pbxproj =================================================================== --- trunk/bibdesk_ios/BibDesk.xcodeproj/project.pbxproj 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/BibDesk.xcodeproj/project.pbxproj 2012-06-17 19:14:17 UTC (rev 18674) @@ -22,6 +22,8 @@ 3B1976461507B015005E3B0A /* NSAttributedString_BDSKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B1976451507B015005E3B0A /* NSAttributedString_BDSKExtensions.m */; }; 3B19764A1507B09D005E3B0A /* NSArray_BDSKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B1976491507B09D005E3B0A /* NSArray_BDSKExtensions.m */; }; 3B19764D1507B56D005E3B0A /* NSURL_BDSKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B19764C1507B56D005E3B0A /* NSURL_BDSKExtensions.m */; }; + 3B2847CC158C937F0009CAEF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2847CB158C937F0009CAEF /* QuartzCore.framework */; }; + 3B2847FD158CDEE70009CAEF /* DBSessionInit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2847FC158CDEE70009CAEF /* DBSessionInit.framework */; }; 3B2A554B150A67B2008A5F35 /* BibDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B97CE05150A5C7A00B82077 /* BibDocument.m */; }; 3B2A554F150B3C8E008A5F35 /* BDSKGroupTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A554E150B3C8E008A5F35 /* BDSKGroupTableViewController.m */; }; 3B2A5552150B88F1008A5F35 /* BDSKPubTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B2A5551150B88F1008A5F35 /* BDSKPubTableViewController.m */; }; @@ -134,6 +136,8 @@ 3B19764B1507B153005E3B0A /* BDSKTemplateParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BDSKTemplateParser.h; sourceTree = "<group>"; }; 3B19764C1507B56D005E3B0A /* NSURL_BDSKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURL_BDSKExtensions.m; sourceTree = "<group>"; }; 3B19764E1507B591005E3B0A /* NSURL_BDSKExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSURL_BDSKExtensions.h; sourceTree = "<group>"; }; + 3B2847CB158C937F0009CAEF /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 3B2847FC158CDEE70009CAEF /* DBSessionInit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DBSessionInit.framework; sourceTree = "<group>"; }; 3B2A554D150B3C8E008A5F35 /* BDSKGroupTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BDSKGroupTableViewController.h; sourceTree = "<group>"; }; 3B2A554E150B3C8E008A5F35 /* BDSKGroupTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BDSKGroupTableViewController.m; sourceTree = "<group>"; }; 3B2A5550150B88F0008A5F35 /* BDSKPubTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BDSKPubTableViewController.h; sourceTree = "<group>"; }; @@ -236,9 +240,11 @@ 3BBB1339150245A700F61870 /* UIKit.framework in Frameworks */, 3BBB133B150245A700F61870 /* Foundation.framework in Frameworks */, 3BBB133D150245A700F61870 /* CoreGraphics.framework in Frameworks */, + 3B2847CC158C937F0009CAEF /* QuartzCore.framework in Frameworks */, 3B79CF32150A19CC00E9C5F5 /* CoreImage.framework in Frameworks */, 3BBB135E15024A7C00F61870 /* Security.framework in Frameworks */, 3BBB135C150249E200F61870 /* DropboxSDK.framework in Frameworks */, + 3B2847FD158CDEE70009CAEF /* DBSessionInit.framework in Frameworks */, 3BDF396E150E98F70023EC36 /* BTParse.framework in Frameworks */, 3BDF3970150E98FC0023EC36 /* AGRegex.framework in Frameworks */, 3B79CF0C1509192A00E9C5F5 /* libz.dylib in Frameworks */, @@ -559,9 +565,11 @@ 3BBB1338150245A700F61870 /* UIKit.framework */, 3BBB133A150245A700F61870 /* Foundation.framework */, 3BBB133C150245A700F61870 /* CoreGraphics.framework */, + 3B2847CB158C937F0009CAEF /* QuartzCore.framework */, 3B79CF31150A19CB00E9C5F5 /* CoreImage.framework */, 3BBB135D15024A7C00F61870 /* Security.framework */, 3BBB135B150249E200F61870 /* DropboxSDK.framework */, + 3B2847FC158CDEE70009CAEF /* DBSessionInit.framework */, 3BDF396D150E98F70023EC36 /* BTParse.framework */, 3BDF396F150E98FC0023EC36 /* AGRegex.framework */, 3B3C59341508E71B00961DA4 /* libz.dylib */, @@ -810,6 +818,11 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = bibdesk/Bibdesk_Prefix.pch; INFOPLIST_FILE = "BibDesk-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -826,6 +839,11 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = bibdesk/Bibdesk_Prefix.pch; INFOPLIST_FILE = "BibDesk-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; Added: trunk/bibdesk_ios/DBSessionInit.framework/DBSessionInit =================================================================== --- trunk/bibdesk_ios/DBSessionInit.framework/DBSessionInit (rev 0) +++ trunk/bibdesk_ios/DBSessionInit.framework/DBSessionInit 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1 @@ +link Versions/Current/DBSessionInit \ No newline at end of file Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/DBSessionInit ___________________________________________________________________ Added: svn:special + * Added: trunk/bibdesk_ios/DBSessionInit.framework/Headers =================================================================== --- trunk/bibdesk_ios/DBSessionInit.framework/Headers (rev 0) +++ trunk/bibdesk_ios/DBSessionInit.framework/Headers 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1 @@ +link Versions/Current/Headers \ No newline at end of file Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Headers ___________________________________________________________________ Added: svn:special + * Added: trunk/bibdesk_ios/DBSessionInit.framework/Resources =================================================================== --- trunk/bibdesk_ios/DBSessionInit.framework/Resources (rev 0) +++ trunk/bibdesk_ios/DBSessionInit.framework/Resources 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1 @@ +link Versions/Current/Resources \ No newline at end of file Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Resources ___________________________________________________________________ Added: svn:special + * Added: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/DBSessionInit =================================================================== (Binary files differ) Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/DBSessionInit ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Headers/DBSessionInit.h =================================================================== --- trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Headers/DBSessionInit.h (rev 0) +++ trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Headers/DBSessionInit.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1,18 @@ +// +// DBSessionInit.h +// DBSessionInit +// +// Created by Colin Smith on 6/16/12. +// Copyright (c) 2012 Colin A. Smith. All rights reserved. +// + + +#import <DropboxSDK/DBSession.h> + +@interface DBSession (DBSessionInit) + +- (id)initWithBibDeskMobile; + +@end + +DBSession *NewDBSessionWithBibDeskMobile(); Added: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/Info.plist =================================================================== (Binary files differ) Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/Info.plist ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/en.lproj/InfoPlist.strings =================================================================== (Binary files differ) Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Versions/A/Resources/en.lproj/InfoPlist.strings ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/bibdesk_ios/DBSessionInit.framework/Versions/Current =================================================================== --- trunk/bibdesk_ios/DBSessionInit.framework/Versions/Current (rev 0) +++ trunk/bibdesk_ios/DBSessionInit.framework/Versions/Current 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1 @@ +link A \ No newline at end of file Property changes on: trunk/bibdesk_ios/DBSessionInit.framework/Versions/Current ___________________________________________________________________ Added: svn:special + * Modified: trunk/bibdesk_ios/DropboxSDK.framework/DropboxSDK =================================================================== (Binary files differ) Modified: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBAccountInfo.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBAccountInfo.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBAccountInfo.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -15,6 +15,7 @@ DBQuota* quota; NSString* userId; NSString* referralLink; + NSDictionary* original; } - (id)initWithDictionary:(NSDictionary*)dict; Added: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBDeltaEntry.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBDeltaEntry.h (rev 0) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBDeltaEntry.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1,21 @@ +// +// DBDeltaEntry.h +// DropboxSDK +// +// Created by Brian Smith on 3/25/12. +// Copyright (c) 2012 Dropbox. All rights reserved. +// + +#import "DBMetadata.h" + +@interface DBDeltaEntry : NSObject <NSCoding> { + NSString *lowercasePath; + DBMetadata *metadata; +} + +- (id)initWithArray:(NSArray *)array; + +@property (nonatomic, readonly) NSString *lowercasePath; +@property (nonatomic, readonly) DBMetadata *metadata; // nil if file has been deleted + +@end Modified: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBMetadata.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBMetadata.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBMetadata.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -11,6 +11,7 @@ BOOL thumbnailExists; long long totalBytes; NSDate* lastModifiedDate; + NSDate *clientMtime; // file's mtime for display purposes only NSString* path; BOOL isDirectory; NSArray* contents; @@ -30,6 +31,7 @@ @property (nonatomic, readonly) BOOL thumbnailExists; @property (nonatomic, readonly) long long totalBytes; @property (nonatomic, readonly) NSDate* lastModifiedDate; +@property (nonatomic, readonly) NSDate* clientMtime; @property (nonatomic, readonly) NSString* path; @property (nonatomic, readonly) BOOL isDirectory; @property (nonatomic, readonly) NSArray* contents; Modified: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBRestClient.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBRestClient.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBRestClient.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -29,7 +29,10 @@ - (id)initWithSession:(DBSession*)session; - (id)initWithSession:(DBSession *)session userId:(NSString *)userId; +/* Cancels all outstanding requests. No callback for those requests will be sent */ +- (void)cancelAllRequests; + /* Loads metadata for the object at the given root/path and returns the result to the delegate as a dictionary */ - (void)loadMetadata:(NSString*)path withHash:(NSString*)hash; @@ -39,7 +42,10 @@ /* This will load the metadata of a file at a given rev */ - (void)loadMetadata:(NSString *)path atRev:(NSString *)rev; +/* Loads a list of files (represented as DBDeltaEntry objects) that have changed since the cursor was generated */ +- (void)loadDelta:(NSString *)cursor; + /* Loads the file contents at the given root/path and stores the result into destinationPath */ - (void)loadFile:(NSString *)path intoPath:(NSString *)destinationPath; @@ -81,10 +87,13 @@ - (void)deletePath:(NSString*)path; -- (void)copyFrom:(NSString*)from_path toPath:(NSString *)to_path; +- (void)copyFrom:(NSString*)fromPath toPath:(NSString *)toPath; -- (void)moveFrom:(NSString*)from_path toPath:(NSString *)to_path; +- (void)createCopyRef:(NSString *)path; // Used to copy between Dropboxes +- (void)copyFromRef:(NSString*)copyRef toPath:(NSString *)toPath; // Takes copy ref created by above call +- (void)moveFrom:(NSString*)fromPath toPath:(NSString *)toPath; + - (void)loadAccountInfo; - (void)searchPath:(NSString*)path forKeyword:(NSString*)keyword; @@ -114,6 +123,9 @@ - (void)restClient:(DBRestClient*)client loadMetadataFailedWithError:(NSError*)error; // [error userInfo] contains the root and path of the call that failed +- (void)restClient:(DBRestClient*)client loadedDeltaEntries:(NSArray *)entries reset:(BOOL)shouldReset cursor:(NSString *)cursor hasMore:(BOOL)hasMore; +- (void)restClient:(DBRestClient*)client loadDeltaFailedWithError:(NSError *)error; + - (void)restClient:(DBRestClient*)client loadedAccountInfo:(DBAccountInfo*)info; - (void)restClient:(DBRestClient*)client loadAccountInfoFailedWithError:(NSError*)error; @@ -155,17 +167,20 @@ // [error userInfo] contains the root and path - (void)restClient:(DBRestClient*)client deletedPath:(NSString *)path; -// Folder is the metadata for the newly created folder - (void)restClient:(DBRestClient*)client deletePathFailedWithError:(NSError*)error; // [error userInfo] contains the root and path -- (void)restClient:(DBRestClient*)client copiedPath:(NSString *)from_path toPath:(NSString *)to_path; -// Folder is the metadata for the newly created folder +- (void)restClient:(DBRestClient*)client copiedPath:(NSString *)fromPath to:(DBMetadata *)to; - (void)restClient:(DBRestClient*)client copyPathFailedWithError:(NSError*)error; // [error userInfo] contains the root and path -// -- (void)restClient:(DBRestClient*)client movedPath:(NSString *)from_path toPath:(NSString *)to_path; -// Folder is the metadata for the newly created folder + +- (void)restClient:(DBRestClient*)client createdCopyRef:(NSString *)copyRef; +- (void)restClient:(DBRestClient*)client createCopyRefFailedWithError:(NSError *)error; + +- (void)restClient:(DBRestClient*)client copiedRef:(NSString *)copyRef to:(DBMetadata *)to; +- (void)restClient:(DBRestClient*)client copyFromRefFailedWithError:(NSError*)error; + +- (void)restClient:(DBRestClient*)client movedPath:(NSString *)from_path to:(DBMetadata *)result; - (void)restClient:(DBRestClient*)client movePathFailedWithError:(NSError*)error; // [error userInfo] contains the root and path Added: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession+iOS.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession+iOS.h (rev 0) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession+iOS.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -0,0 +1,22 @@ +// +// DBSession+iOS.h +// DropboxSDK +// +// Created by Brian Smith on 3/7/12. +// Copyright (c) 2012 Dropbox. All rights reserved. +// + +#import "DBSession.h" + +@interface DBSession (iOS) + ++ (NSDictionary*)parseURLParams:(NSString *)query; + +- (NSString *)appScheme; + +- (void)linkFromController:(UIViewController *)rootController; +- (void)linkUserId:(NSString *)userId fromController:(UIViewController *)rootController; + +- (BOOL)handleOpenURL:(NSURL *)url; + +@end Modified: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DBSession.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -28,6 +28,7 @@ @interface DBSession : NSObject { NSDictionary *baseCredentials; NSMutableDictionary *credentialStores; + MPOAuthCredentialConcreteStore *anonymousStore; NSString *root; id<DBSessionDelegate> delegate; } @@ -37,11 +38,7 @@ - (id)initWithAppKey:(NSString *)key appSecret:(NSString *)secret root:(NSString *)root; - (BOOL)isLinked; // Session must be linked before creating any DBRestClient objects -- (void)link; -- (void)linkUserId:(NSString *)userId; -- (BOOL)handleOpenURL:(NSURL *)url; - - (void)unlinkAll; - (void)unlinkUserId:(NSString *)userId; Modified: trunk/bibdesk_ios/DropboxSDK.framework/Headers/DropboxSDK.h =================================================================== --- trunk/bibdesk_ios/DropboxSDK.framework/Headers/DropboxSDK.h 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/DropboxSDK.framework/Headers/DropboxSDK.h 2012-06-17 19:14:17 UTC (rev 18674) @@ -15,4 +15,6 @@ #import "DBMetadata.h" #import "DBQuota.h" #import "DBError.h" -#import "NSString+Dropbox.h" \ No newline at end of file +#import "NSString+Dropbox.h" + +#import "DBSession+iOS.h" \ No newline at end of file Modified: trunk/bibdesk_ios/DropboxSDK.framework/Info.plist =================================================================== (Binary files differ) Modified: trunk/bibdesk_ios/en.lproj/MainStoryboard_iPad.storyboard =================================================================== --- trunk/bibdesk_ios/en.lproj/MainStoryboard_iPad.storyboard 2012-06-17 06:36:04 UTC (rev 18673) +++ trunk/bibdesk_ios/en.lproj/MainStoryboard_iPad.storyboard 2012-06-17 19:14:17 UTC (rev 18674) @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="5"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11E53" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="5"> <dependencies> <deployment defaultVersion="1296" identifier="iOS"/> <development defaultVersion="4200" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1179"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/> </dependencies> <scenes> <!--Navigation Controller--> @@ -129,7 +129,7 @@ <rect key="frame" x="0.0" y="0.0" width="320" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" id="cFo-ey-pav"> + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" id="cFo-ey-pav"> <rect key="frame" x="47" y="0.0" width="263" height="43"/> <autoresizingMask key="autoresizingMask"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="14"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |