<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help migrating from v1 to v2 Objective C in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200389#M9387</link>
    <description>&lt;P&gt;The&amp;nbsp;canOpenURL error would just indicate that the application being looked for (i.e., the official&amp;nbsp;Dropbox app in this case) isn't found. That's expected on the simulator, or on a device without the official device installed. This error is safe to ignore, as the SDK will fall back to using the browser.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share the steps to reproduce, code, and output/error for the isue with it not remembering the user?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2017 21:25:43 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-01-03T21:25:43Z</dc:date>
    <item>
      <title>Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200383#M9382</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not very familiar with Dropbox API, though I got version 1 working just fine on my app. &amp;nbsp;But I am not really following the path from V1 to V2 all that well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attempting to do some very simple things, but find this new API hard to digest I thought I would ask.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;App Delegate Code went from this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DBSession *dbSession = [[DBSession alloc]
initWithAppKey:@"my key"
appSecret:@"my secret"
root:kDBRootAppFolder]; // either kDBRootAppFolder or kDBRootDropbox
[DBSession setSharedSession:dbSession];&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To This:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;[DropboxClientsManager setupWithAppKey:@"my key"];&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially I did the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if ([[DBSession sharedSession] isLinked]) {
&amp;nbsp; [self.restClient loadMetadata:@"/"];
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I replaced with this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if([DropboxClientsManager authorizedClient] != nil ) {
&amp;nbsp; &amp;nbsp; [[client.filesRoutes getMetadata:@"/"]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) {}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if I missed anything, but I can't seem to get back from that, it it always thinks it's not approved in the ios simulator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My original calls are this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;restClient loadMetadata&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:@&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"/"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;restClient uploadFile&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fileName toPath&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;destDir withParentRev&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;rev fromPath&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;path&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;
&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;restClient loadFile&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:@&lt;/SPAN&gt;&lt;SPAN class="str"&gt;""&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; into&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;localpath&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However after the first link, it doesn't seem to stick...&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:27:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200383#M9382</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2019-05-29T09:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200386#M9384</link>
      <description>&lt;P&gt;Did you follow all of the instructions for setting up the app authorization flow?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c#handling-the-authorization-flow" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-obj-c#handling-the-authorization-flow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, what error(s) are you getting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few notes from what you shared so far though:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In API v2, the&amp;nbsp;Dropbox root folder is identified by the empty string "", not "/".&lt;/LI&gt;
&lt;LI&gt;The &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESRoutes.html#/c:objc(cs)DBFILESRoutes(im)getMetadata:" target="_self"&gt;getMetadata&lt;/A&gt;&amp;nbsp;method doesn't supported the root folder. In API v2, you should use &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESRoutes.html#/c:objc(cs)DBFILESRoutes(im)listFolder:" target="_self"&gt;listFolder&lt;/A&gt;[&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESRoutes.html#/c:objc(cs)DBFILESRoutes(im)listFolderContinue:" target="_self"&gt;Continue&lt;/A&gt;] to list the contents of folders.&lt;/LI&gt;
&lt;LI&gt;You can use &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DropboxClientsManager.html#/c:objc(cs)DropboxClientsManager(cm)reauthorizeClient:" target="_self"&gt;reauthorizeClient&lt;/A&gt;&amp;nbsp;to retrieve a previously authorized client.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 03 Jan 2017 20:52:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200386#M9384</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-03T20:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200388#M9386</link>
      <description>&lt;P&gt;From what I can tell - yes....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the exception being thrown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;2017-01-03 13:59:38.192 ServiceReport[14621:705002] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
&amp;nbsp; &amp;nbsp; //Set up dropbox link
&amp;nbsp; &amp;nbsp; [DropboxClientsManager setupWithAppKey:@"mykey"];&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; return YES;
}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
            options:(NSDictionary&amp;lt;UIApplicationOpenURLOptionsKey,id&amp;gt; *)options {
    DBOAuthResult *authResult = [DropboxClientsManager handleRedirectURL:url];
    if (authResult != nil) {
        if ([authResult isSuccess]) {
            NSLog(@"Success! User is logged into Dropbox.");
        } else if ([authResult isCancel]) {
            NSLog(@"Authorization flow was manually canceled by user!");
        } else if ([authResult isError]) {
            NSLog(@"Error: %@", authResult);
        }
    }
    return NO;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the window to log in and get success but then it doesn't remember it next time I launch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My baisc use case is pretty simple&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Check to see if I am linked to dropbox.&lt;/P&gt;&lt;P&gt;2) Check to see if 3 specific files exsit (if not I assume no backup was done)&lt;/P&gt;&lt;P&gt;3) Provide an option to link to DB&lt;/P&gt;&lt;P&gt;4) Provide an option to perform a back up - this just copies three files up&lt;/P&gt;&lt;P&gt;5) Provide an option to restore from a backup - this just copies the three files down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was pretty straight forward before, but I am getting lost in the translation to the new API.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 21:11:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200388#M9386</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-03T21:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200389#M9387</link>
      <description>&lt;P&gt;The&amp;nbsp;canOpenURL error would just indicate that the application being looked for (i.e., the official&amp;nbsp;Dropbox app in this case) isn't found. That's expected on the simulator, or on a device without the official device installed. This error is safe to ignore, as the SDK will fall back to using the browser.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share the steps to reproduce, code, and output/error for the isue with it not remembering the user?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 21:25:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200389#M9387</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-03T21:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200391#M9388</link>
      <description>&lt;P&gt;Thanks - that makes sense. &amp;nbsp;I was trying to scale back my dropbox controller to post - which I will if I can make sense of it. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the basics of what I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;- (void)viewDidLoad{
    [super viewDidLoad];
}
- (void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    // Do any additional setup after loading the view.
    // Reference after programmatic auth flow
    self.restClient = [DropboxClientsManager authorizedClient];
    if (!networkLost) {
        [self checkForBackups];
    }
}
- (void) checkForBackups {
    //Determine if backup exists
    if(self.restClient != nil ) {
        _loadingView = [LoadingView loadingViewInView:[self.view.window.subviews objectAtIndex:0] withMessage:@"Checking for existing backup...."];
       
        [[self.restClient.filesRoutes getMetadata:@""]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) {
            if(result != nil){
                if ([result isKindOfClass:[DBFILESFolderMetadata class]]){
                    //NewObj* pNew = (NewObj*)oldObj;
                    DBFILESFolderMetadata * meta = (DBFILESFolderMetadata *)result;
                    files = [[NSMutableArray alloc]init];
                }
                [_loadingView removeView];
                
                
                //check to see if there is a backup to restore
                /*
                for (DBMetadata *file in files) {
                    if([file.path isEqualToString:@"/ServiceReport.sqlite"]){
                        hasSQLBackup = YES;
                    }
                    if([file.path isEqualToString:@"/ServiceReport.sqlite-shm"]){
                        hasSHMBackup = YES;
                    }
                    if([file.path isEqualToString:@"/ServiceReport.sqlite-wal"]){
                        hasWALBackup = YES;
                    }
                }
                 */
            }
    
        }];
        
    }
}&lt;/PRE&gt;&lt;P&gt;This call seems to crash the app - but I get no error. &amp;nbsp;Then when I run it again, it wants to link the account again.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 21:42:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200391#M9388</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-03T21:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200392#M9389</link>
      <description>&lt;P&gt;This I think is the basics of what I am attempting -&amp;nbsp;hopefully it makes sense. &amp;nbsp;I am simply uploading the SQLITE db and files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#import "AppDelegate.h"
#import "DropBoxViewController.h"
#import "LoadingView.h"
#import "ConvertNSDateToString.h"
//#import &amp;lt;DropboxSDK/DropboxSDK.h&amp;gt;

#import &amp;lt;ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h&amp;gt;

@interface DropBoxViewController ()  &amp;lt;UIAlertViewDelegate&amp;gt;

//@property (nonatomic, strong) DBRestClient *restClient;
@property (nonatomic, strong) DropboxClient *restClient;
@property (nonatomic, weak) LoadingView *loadingView;


@end

NSMutableArray *files = nil;

@implementation DropBoxViewController

- (void)viewDidLoad{
    [super viewDidLoad];
}
- (void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.restClient = [DropboxClientsManager authorizedClient];

    //self.restClient.delegate = self;
    if (!networkLost) {
        [self checkForBackups];
    }
}
- (void) checkForBackups {
    //Determine if backup exists
    if([DropboxClientsManager authorizedClient] != nil ) {      
        DropboxClient *client = [DropboxClientsManager authorizedClient];
        [[client.filesRoutes getMetadata:@""]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) {
			//NOT SURE HOW TO CHECK THIS…
            //USED to be loadedMetadata
        }];
        [_loadingView removeView];
    }
}


- (IBAction)linkToDropBox:(id)sender {
    [DropboxClientsManager authorizeFromController:[UIApplication sharedApplication]
                                 controller:self
                                 openURL:^(NSURL *url) {
                                 	[[UIApplication sharedApplication] openURL:url];
                                 }
                                 browserAuth:YES];
    [self checkForBackups];
}
//TODO - FIX THIS COMMENT
/*
- (void)restClient:(DBRestClient *)client loadedMetadata:(DBMetadata *)metadata {
    if (metadata.isDirectory) {
        files = [[NSMutableArray alloc]init];
        for (DBMetadata *file in metadata.contents) {
            [files addObject:file];
        }
    }
    
    //check to see if there is a backup to restore
    for (DBMetadata *file in files) {
        if([file.path isEqualToString:@"/ServiceReport.sqlite"]){
            hasSQLBackup = YES;
        }
    }
    [self displayDropboxButtons];
}
*/

- (void) startBackUp {
    _loadingView = [LoadingView loadingViewInView:[self.view.window.subviews objectAtIndex:0] withMessage:@"Backing up data to Dropbox...."];
    [self uploadFileToDropbox:@"ServiceReport.sqlite"];
}

- (void) uploadFileToDropbox:(NSString*)fileName {
    NSString *rev = nil;
    //check to see if there is a backup to to overwrite
    
    //TODO - FIX THIS COMMENT
    /*
    for (DBMetadata *file in files) {
        if([file.filename isEqualToString:fileName]){
            rev = file.rev;
            break;
        }
    }
    
    NSString *localDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
    NSString *dbPath = [localDir stringByAppendingPathComponent:fileName];
    NSString *destDir = @"/";
    [self.restClient uploadFile:fileName toPath:destDir withParentRev:rev fromPath:dbPath];
     */
}

//TODO - FIX THIS COMMENT
/*
- (void)restClient:(DBRestClient *)client uploadedFile:(NSString *)destPath from:(NSString *)srcPath metadata:(DBMetadata *)metadata {
    NSLog(@"File uploaded successfully to path: %@", metadata.path);
}
 */

//This is the call to query for the file to restore and its call backs
//TODO - FIX THIS COMMENT

/*
- (void) startTheRestoreProcess {
    _loadingView = [LoadingView loadingViewInView:[self.view.window.subviews objectAtIndex:0] withMessage:@"Restoring from backup...."];
    //create the local path
    NSString *localDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
    NSString *localPath = [localDir stringByAppendingPathComponent:@"ServiceReport.bak"];
    [self.restClient loadFile:@"/ServiceReport.sqlite" intoPath:localPath];
}
- (void)restClient:(DBRestClient *)client loadedFile:(NSString *)localPath contentType:(NSString *)contentType metadata:(DBMetadata *)metadata {
    NSLog(@"File loaded into path: %@", localPath);
}
 */

/*
 This is the error handling form Dropbox Callbacks
 */
//TODO - FIX THIS COMMENT
/*
- (void)restClient:(DBRestClient *)client loadMetadataFailedWithError:(NSError *)error {
    NSLog(@"Error loading metadata: %@", error);
    [self showErrorMessage:error];
}
- (void)restClient:(DBRestClient *)client uploadFileFailedWithError:(NSError *)error {
    NSLog(@"File upload failed with error: %@", error);
    [self showErrorMessage:error];
}
- (void)restClient:(DBRestClient *)client loadFileFailedWithError:(NSError *)error {
    if (error.code == 404) {
        NSLog(@"Your file was not found");
        [self showErrorMessage:error];
    }else if (error.code == 401) {
        NSLog(@"Your account is no longer authorized.");
        [self showAccountNotLinked];
        
    }else {
        NSLog(@"NSError ** : %@", [error userInfo]);
        [self showErrorMessage:error];
    }
}
 */
- (void) relinkToDropbox {
    /*
    [[DBSession sharedSession] unlinkAll];
     */
    [DropboxClientsManager unlinkClients];
    _restClient = nil;
    [self linkToDropBox:nil];
}

@end&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2017 21:48:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200392#M9389</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-03T21:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200398#M9393</link>
      <description>&lt;P&gt;The app shouldn't be crashing without some sort of error. Can you double check the console in Xcode?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 22:24:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200398#M9393</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-03T22:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200401#M9395</link>
      <description>&lt;P&gt;It's weird - The only error I show is the one noted above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This always returns nil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;restClient&lt;/SPAN&gt;&lt;SPAN&gt; = [&lt;/SPAN&gt;&lt;SPAN&gt;DropboxClientsManager&lt;/SPAN&gt; &lt;SPAN&gt;authorizedClient&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 22:37:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200401#M9395</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-03T22:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200406#M9397</link>
      <description>If authorizedClient is nil, that would be why your app doesn't seem to "remember" the user. That's presumably related to the crash you're getting. Perhaps the app is crashing before the access token is being stored. Can you step through in the debugger to at least see where the crash is occurring?</description>
      <pubDate>Tue, 03 Jan 2017 23:00:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200406#M9397</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-03T23:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200407#M9398</link>
      <description>&lt;P&gt;I have tried - but the weird thing is once it hands back control to my application, it has disconnected from the debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried the following to force it to log something, but it doesn't.&lt;/P&gt;&lt;PRE&gt;- (void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.restClient = [DropboxClientsManager authorizedClient];

    if (!networkLost) {
        [self checkForBackups];
    }
}
- (void) checkForBackups {
    //Determine if backup exists
    NSLog(@"trying to check for backups");
    
    if(self.restClient != nil ) {
        //_loadingView = [LoadingView loadingViewInView:[self.view.window.subviews objectAtIndex:0] withMessage:@"Checking for existing backup...."];        
        NSLog(@"You are linked: %@", self.restClient);
        
       
        [[self.restClient.filesRoutes getMetadata:@""]response:^(DBFILESMetadata * _Nullable result, DBFILESGetMetadataError * _Nullable routeError, DBRequestError * _Nullable error) {
            if(result != nil){
            }
            if(error != nil || routeError != nil){
                 NSLog(@"Error: %@", error);
                 NSLog(@"Error: %@", routeError);
            }
    
        }];
        
    }

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So while I am in the same instance -&amp;nbsp;when I open this after linking, it crashes. &amp;nbsp;I have placed log statements - but they aren't fired. &amp;nbsp;It's just odd..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 23:07:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200407#M9398</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-03T23:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200477#M9407</link>
      <description>&lt;P&gt;So I upgraded my XCODE and was able to debug it - seems the getmeta data was killing me. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now able to have my instance cached once set.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 15:54:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/200477#M9407</guid>
      <dc:creator>purringpigeon</dc:creator>
      <dc:date>2017-01-04T15:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/224394#M12116</link>
      <description>&lt;P&gt;I am getting the same, disconnect from debugger 30 seconds after i get:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;2017-06-05 15:39:08.116 DecadeFiveRecorderPlus[579:16632] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;2017-06-05 15:39:08.118 DecadeFiveRecorderPlus[579:16632] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "(null)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My plist:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;key&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;CFBundleURLTypes&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/key&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;array&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;dict&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;key&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;CFBundleURLName&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/key&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;string&amp;gt;&amp;lt;/string&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;key&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;CFBundleURLSchemes&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/key&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;array&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;string&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;another one&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/string&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;string&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;db-&amp;lt;app here here&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/string&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/array&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/dict&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/array&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i install the dropbox app, it launches it for login.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some setup on my 6s plus that could be causing it not to launch safari?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 19:40:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/224394#M12116</guid>
      <dc:creator>opp</dc:creator>
      <dc:date>2017-06-05T19:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help migrating from v1 to v2 Objective C</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/224410#M12127</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/411554"&gt;@opp&lt;/a&gt;&amp;nbsp;You seem to be getting slightly different output that was previously shared on this thread. I.e., you're getting&amp;nbsp;error: "(null)" which should actually indicate that nothing went wrong with the canOpenURL call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That being the case, please &lt;A href="https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014" target="_self"&gt;open a new thread&lt;/A&gt;&amp;nbsp;with the details (i.e., steps to reproduce, the code, and the version of the SDK you're using) so we can help you with it without spamming anyone else on this old thread.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 20:18:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Help-migrating-from-v1-to-v2-Objective-C/m-p/224410#M12127</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-05T20:18:25Z</dc:date>
    </item>
  </channel>
</rss>

