我已经编辑了info.pList
- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions{#warning Potentially incomplete method implementation. Fill in your DropBox credentials!#warning NB: you must also update the URL scheme Listed under the CFBundleURLTypes key in GSDropBoxDemoApp-Info.pList Nsstring *dropBoxAppKey = @"sxxxxxxxxxx"; Nsstring *dropBoxAppSecret = @"cxxxxxxxxx"; Nsstring *dropBoxRoot = @"kDbrootAppFolder"; // either kDbrootAppFolder or kDbrootDropBox DBSession* dbSession = [[DBSession alloc] initWithAppKey:dropBoxAppKey appSecret:dropBoxAppSecret root:dropBoxRoot]; [DBSession setSharedSession:dbSession]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // OverrIDe point for customization after application launch. self.vIEwController = [[GSVIEwController alloc] initWithNibname:@"GSVIEwController" bundle:nil]; self.window.rootVIEwController = self.vIEwController; [self.window makeKeyAndVisible]; return YES;}- (BOol)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(Nsstring *)sourceApplication annotation:(ID)annotation{ if ([[DBSession sharedSession] handleOpenURL:url]) { if ([[DBSession sharedSession] islinked]) { NSLog(@"App linked to DropBox successfully"); } else { NSLog(@"App not linked to DropBox!"); } return YES; } return NO;}
错误信息
GSDropBoxDemoApp[4674:907] [WARNING] Dropboxsdk: error making request to /1/Metadata/kDbrootAppFolder - (400) Expected a root of either 'dropBox' or 'sandBox',got 'kDbrootAppFolder'解决方法 您应该使用常量,如下所示:
Nsstring *dropBoxRoot = kDbrootAppFolder; // either kDbrootAppFolder or kDbrootDropBox
使用常量,这样您就不必担心实际值本身.
总结以上是内存溢出为你收集整理的Dropbox在iPhone应用程序中的集成错误400全部内容,希望文章能够帮你解决Dropbox在iPhone应用程序中的集成错误400所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)