iOS SDK Authentication and UploadProgress Delegates
Hello! For a long time, our CloudRail SDK helped a lot of developers to easily integrate their APIs (especially multiple ones) into their projects. We are always trying to improve the SDK, especially when receiving some awesome feedback from our customers. In the software architecture matter our SDKs where developed using the same core engine and the same principles, even being aware that in some cases it would not be perfectly fit for a specific platform, this approach allowed us to quickly and easily maintain and scale all the CloudRail SDK platforms (even develop new ones, like the new PHP and dotNet versions).
After receiving feedback from different users, we’ve decided to implement more features that use the delegation (Protocol-Delegate) approach that is so much common among iOS developers. This article gives you an example of an implementation that uses our Protocols and also demonstrates
their functionality so far.
As seen in the AuthenticationDelegate protocol, now it is possible to use the delegation during the authentication flow. Below there is a sample View controller that intends to Perform the authentication and upload an image to a Dropbox account. At the end of the class you can check the use of the methods declared by the
We have already written an example of how to track the upload progress of a file using CloudRail, you can check the post here. As requested by customers we added the method didCancelUpload, you can use this delegate whenever you wish to cancel the upload progress (especially during big files upload).
For now, as for the internal engine limitations. It still necessary to wrap the calls in a Try Catch, or DoCatch block, to avoid uncultured exceptions. In the future, we plan to completely separate the patterns so it will be possible to use both sync and async CloudRail.
This is one of the first features of many to come, your feedback is very important to us. Tell us through our email (firstname.lastname@example.org), how do you like our new approach and suggestions for new features.