via Cross-platform syncing for Sublime Text editor settings and plugins with Dropbox.
Between my day job as an ASP.NET developer and my freelancing and writing, I bounce around among computers quite a bit. I currently split time among my MacBook Air and a Windows 7 PC, as well as various Linux and Windows virtual machines.
After setting up Sublime for the second or third time, I realized that I needed to automate the process of installing packages and tweaking configs.
via How to Use Dropbox API to Upload Files in iOS Apps.
Finding integrated cloud services into an iOS application some time ago was something quite rare. There were not many services offering APIs to do that, and moreover just a small percentage out of the total users had a constant Internet connection (3G/4G connections, or constant access to Wifi networks). Nowadays things have dramatically changed, as technology has improved significantly and all the previous problems have been overcome. So, implementing cloud-related features in applications is now a common task, and users expect to see such features more and more to existing and new applications.
Not so long time ago I had written a tutorial about the CloudKit, the cloud solution provided by Apple. This time, I am going to present you another API that it can be used for dealing with files in the cloud, and this is not other than the Dropbox API. I really doubt if there’s even one computer or mobile device user that hasn’t heard of the Dropbox, a well-known platform allowing to keep files on the cloud. If you are not a Dropbox user, then it’s a good chance to give it a try now, as it consists of a good option for having files online, share them with other people and do even more tasks. Dropbox can be used directly in the web by using a browser, by installing a desktop application to the computer, or as a mobile app.
Using Objective-C sources and frameworks with Swift is made possible through Interoperability. The compiler has all the magic built in that allows us to call Objective-C methods as if they were Swift functions. However, Objective-C and Swift are very different languages and what works well in Objective-C might not be the best for Swift. Let’s look at using an Objective-C API, the Dropbox Sync API, with Swift to keep your app’s files synced with the cloud.
The Dropbox Sync SDK is a precompiled framework that you can download and add to your Xcode project. Carefully follow the instructions on the download page to install the SDK and setup a Dropbox App to obtain a Key and Secret. You can follow the tutorial online to implement the SDK and have files syncing rather quickly. Interoperability allows us to use this Objective-C API in Swift, but let’s see how we can abstract this SDK and sprinkle in some Functional Programming concepts to make it easier to use.