The recent unveiling of iOS 8 introduced a new programming language: Swift.
Many are wondering when their favorite services will support this innovative new language. For CloudMine, that time is now. With the new CloudMine Swift library, it's easier than ever before to upload, download, and manage your data and access other CloudMine functionality.
To use our library in your Swift projects, import the header file into your project's bridge header.
You can download our library here, or install it using CocoaPods. A bridge header is a file that allows a developer to use Objective-C libraries in her Swift code. Be sure to designate this header in the Swift Compiler section of project's target. For a more complete discussion, see this StackOverflow answer.
Both Swift and CloudMine are based upon the principles of speed and simplicity. Here are some quick examples to get you up and running with CloudMine:
First, create a CloudMine object to facilitate the transfer of data:
This can be created wherever the object is needed.
In the past with Objective-C, this is how you would save an object:
To save an object with Swift you simply call the save method on your object:
Here's a shorter version:
Object retrieval in Objective-C:
The same in Swift:
It's as simple as that. In less than 10 lines of code you're on your way to building better apps, more easily, with CloudMine. Send us an email at email@example.com if you have any questions at all. We are always here to help.
Source: Hubspot Feed