<?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: SDK1.3.13 and Swift in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29774#M914</link>
    <description>&lt;P&gt;hello,&lt;BR /&gt;
thanks for your reply, I make some progress because i discovered an example (&lt;A href="https://github.com/tkunstek/elevenchat/tree/master/ElevenChat" rel="nofollow noreferrer"&gt;https://github.com/tkunstek/elevenchat/tree/master/ElevenChat&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;Now i am facing an issue when I try to loadmetadata&lt;BR /&gt;
loadedMetadata failed with error: Error Domain=dropbox.com Code=400 "The operation couldn’t be completed. (dropbox.com error 400.)" UserInfo=0x7fe6f1411c10 {path=/, error=App folder (sandbox) access attempt failed because this app is not configured to have an app folder.  Should your access type be 'dropbox' instead?}&lt;/P&gt;

&lt;P&gt;my code below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// dropbox rest client
private var dbRestClient: DBRestClient?

@IBAction func btconnect(sender: AnyObject) {
    if !DBSession.sharedSession().isLinked() {
        // should let use know why ayou are asking for dropbox permissions
        // now ask for permission
        DBSession.sharedSession().linkFromController(self)
    }
    if dbRestClient == nil {
        dbRestClient = DBRestClient(session: DBSession.sharedSession())
        dbRestClient!.delegate = self
    }
}

@IBAction func btList(sender: AnyObject) {
    dbRestClient?.loadMetadata("/")
}

func restClient(client: DBRestClient!, loadedMetadata metadata: DBMetadata!){
    if (metadata.isDirectory) {
        println("Folder \(metadata.path) contains:")

        for FILE in metadata.contents {
            println(" \(FILE.filename)");
        }
    }
}

func restClient(client: DBRestClient!, loadMetadataFailedWithError error: NSError!){
    println("loadedMetadata failed with error: \(error)")
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any idea ?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sébastien&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2015 04:41:22 GMT</pubDate>
    <dc:creator>Ricky B.5</dc:creator>
    <dc:date>2015-05-15T04:41:22Z</dc:date>
    <item>
      <title>SDK1.3.13 and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29772#M912</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I try to develop a very simple application connected with DropBox.&lt;BR /&gt;
I am looking for example in swift (not in objective C), could you please help me ?&lt;/P&gt;

&lt;P&gt;Need to connect, and retrieve list of files in a Dropbox folder.&lt;/P&gt;

&lt;P&gt;Many thanks,&lt;BR /&gt;
Sébastien&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:42:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29772#M912</guid>
      <dc:creator>Ricky B.5</dc:creator>
      <dc:date>2019-05-29T09:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: SDK1.3.13 and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29773#M913</link>
      <description>&lt;P&gt;We don't currently have a Swift sample app for the iOS Core SDK, but it should be possible to use it in a Swift app. There's a blog post here about how to use the Sync SDK in a Swift app:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://blogs.dropbox.com/developers/2014/09/swift-apps-with-dropbox/" rel="nofollow noreferrer"&gt;https://blogs.dropbox.com/developers/2014/09/swift-apps-with-dropbox/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I believe the same basic steps should work with the Core SDK.&lt;/P&gt;

&lt;P&gt;Once you have the SDK installed, you should be able to use it as expected. If you run into any specific issues, feel free to post the code and errors here.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 04:03:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29773#M913</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-15T04:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: SDK1.3.13 and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29774#M914</link>
      <description>&lt;P&gt;hello,&lt;BR /&gt;
thanks for your reply, I make some progress because i discovered an example (&lt;A href="https://github.com/tkunstek/elevenchat/tree/master/ElevenChat" rel="nofollow noreferrer"&gt;https://github.com/tkunstek/elevenchat/tree/master/ElevenChat&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;Now i am facing an issue when I try to loadmetadata&lt;BR /&gt;
loadedMetadata failed with error: Error Domain=dropbox.com Code=400 "The operation couldn’t be completed. (dropbox.com error 400.)" UserInfo=0x7fe6f1411c10 {path=/, error=App folder (sandbox) access attempt failed because this app is not configured to have an app folder.  Should your access type be 'dropbox' instead?}&lt;/P&gt;

&lt;P&gt;my code below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// dropbox rest client
private var dbRestClient: DBRestClient?

@IBAction func btconnect(sender: AnyObject) {
    if !DBSession.sharedSession().isLinked() {
        // should let use know why ayou are asking for dropbox permissions
        // now ask for permission
        DBSession.sharedSession().linkFromController(self)
    }
    if dbRestClient == nil {
        dbRestClient = DBRestClient(session: DBSession.sharedSession())
        dbRestClient!.delegate = self
    }
}

@IBAction func btList(sender: AnyObject) {
    dbRestClient?.loadMetadata("/")
}

func restClient(client: DBRestClient!, loadedMetadata metadata: DBMetadata!){
    if (metadata.isDirectory) {
        println("Folder \(metadata.path) contains:")

        for FILE in metadata.contents {
            println(" \(FILE.filename)");
        }
    }
}

func restClient(client: DBRestClient!, loadMetadataFailedWithError error: NSError!){
    println("loadedMetadata failed with error: \(error)")
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any idea ?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sébastien&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 04:41:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29774#M914</guid>
      <dc:creator>Ricky B.5</dc:creator>
      <dc:date>2015-05-15T04:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: SDK1.3.13 and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29775#M915</link>
      <description>&lt;P&gt;The error message is indicating that you have the wrong &lt;CODE&gt;root&lt;/CODE&gt; set. You set that when you construct your &lt;CODE&gt;DBSession&lt;/CODE&gt; using &lt;CODE&gt;DBSession:initWithAppKey:appSecret:root:&lt;/CODE&gt;. It sounds like you're supplying &lt;CODE&gt;kDBRootAppFolder&lt;/CODE&gt; when you should be supplying &lt;CODE&gt;kDBRootDropbox&lt;/CODE&gt; to match your app registration.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 05:15:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29775#M915</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-05-15T05:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: SDK1.3.13 and Swift</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29776#M916</link>
      <description>&lt;P&gt;many thanks, is was exactly my issue...&lt;/P&gt;

&lt;P&gt;func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&amp;gt; Bool {&lt;BR /&gt;
        // setup dropbox&lt;BR /&gt;
        let dbSession = DBSession(appKey: "blabla", appSecret: "blabla", root: kDBRootDropbox) //previous value kDBRootAppFolder&lt;BR /&gt;
        DBSession.setSharedSession(dbSession)&lt;BR /&gt;
        return true&lt;BR /&gt;
    }&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2015 14:51:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/SDK1-3-13-and-Swift/m-p/29776#M916</guid>
      <dc:creator>Ricky B.5</dc:creator>
      <dc:date>2015-05-16T14:51:11Z</dc:date>
    </item>
  </channel>
</rss>

