{"id":4275,"url":"https://github.com/tinycreative/react-native-dropbox-chooser","last_synced_at":"2025-08-04T01:31:47.125Z","repository":{"id":57336641,"uuid":"46130330","full_name":"tinycreative/react-native-dropbox-chooser","owner":"tinycreative","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-04T16:34:06.000Z","size":1026,"stargazers_count":23,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-09T03:49:02.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinycreative.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-13T15:34:30.000Z","updated_at":"2023-07-05T06:35:15.000Z","dependencies_parsed_at":"2022-09-11T09:00:11.338Z","dependency_job_id":null,"html_url":"https://github.com/tinycreative/react-native-dropbox-chooser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinycreative%2Freact-native-dropbox-chooser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinycreative%2Freact-native-dropbox-chooser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinycreative%2Freact-native-dropbox-chooser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinycreative%2Freact-native-dropbox-chooser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinycreative","download_url":"https://codeload.github.com/tinycreative/react-native-dropbox-chooser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228582487,"owners_count":17940587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:06.590Z","updated_at":"2024-12-07T08:30:27.182Z","avatar_url":"https://github.com/tinycreative.png","language":"Objective-C","readme":"# react-native-dropbox-chooser\n\n## What is this?\n\nFor more details check out [https://www.dropbox.com/developers/chooser#ios](https://www.dropbox.com/developers/chooser#ios) for an explanation.\n\n## Only Works On Device\n\nThis will only work on Device. This will open up a window prompting you to install the Dropbox app on the Simulator.\n\n## Install\n\n`npm install react-native-dropbox-chooser --save`\n\n## Sign up \n\nYou'll need to sign up and get an app key from Dropbox.\n\nFirst go here [https://www.dropbox.com/developers/apps/create](https://www.dropbox.com/developers/apps/create).\n\n* Select \"Dropbox API\"\n* Select what you need access to\n* Name your app\n* Agree to TOS\n* Submit\n\nYou'll see a section where it says \"App key\" and a series of numbers/letters. We'll need this in a second.\n\n\n## Setup\n\nFirst off add it to your project. How to link native modules can be found here. [http://facebook.github.io/react-native/docs/linking-libraries-ios.html#content](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#content). \n\nThis will use LinkingIOS so we'll need to add this code to your `AppDelegate.m`\n\nAt the top of the file you will need to add `#import \"RCTLinkingManager.h\"`\n\nShould look like \n\n```\n#import \"AppDelegate.h\"\n\n#import \"RCTRootView.h\"\n#import \"RCTLinkingManager.h\"\n```\n\nThen before the `@end` you need to add this code.\n\n```\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {\n  return [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];\n}\n```\nExplanation can be found here [https://facebook.github.io/react-native/docs/linkingios.html#content](https://facebook.github.io/react-native/docs/linkingios.html#content).\n\nThis will now start complaining that `RCTLinkingManager` doesn't exist.\n\nWe'll need to add header search paths for the Libraries.\nGo to `Build Settings`, find `Header Search Paths`, and add `$(SRCROOT)/../node_modules/react-native/Libraries`. Set it to `recursive`.\n\nBecause we are using the chooser we'll need to add the below configuration to the `Info.plist`\nWhat this will allow us to do is throw over the the Dropbox app and have it send us the links back.\n\n```\n\u003ckey\u003eLSApplicationQueriesSchemes\u003c/key\u003e\n\u003carray\u003e\n  \u003cstring\u003edbapi-1\u003c/string\u003e\n  \u003cstring\u003edbapi-3\u003c/string\u003e\n\u003c/array\u003e\n```\n\nNow go to the `Info` tab.\n\nAt the bottom it will have a section called `URL Types`.\nOpen it and press the `+`.\n\nAdd `db-APPKEYHERE` into the `URL Schemes` input box.\n\n## How to use\n\nRequire the module.\n\n```\nvar DropboxClient = require('react-native-dropbox-chooser');\n```\n\n```\n  componentDidMount() {\n    DropboxClient.init({\n      appId: 'YOURAPPIDHERE',\n      onFiles: this.handleFiles //Callback that receives file(s) when they are selected\n    });\n  },\n\n  componentWillUnmount() {\n    DropboxClient.remove(); //Don't forge to remove it\n  },\n ```\n\n## Done\n\nWe should be good to go!","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinycreative%2Freact-native-dropbox-chooser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinycreative%2Freact-native-dropbox-chooser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinycreative%2Freact-native-dropbox-chooser/lists"}