Set up the CosyncStorage Sample App for iOS #
This sample app provides a simple iOS example of how to use the Cosync AssetLink module within a MongoDB Realm application. In order to get this example running, the developer will first have to configure a MongoDB Realm application with the Cosync AssetLink module as explained Cosync AssetLink/Configure Application section of this documentation. For the purposes of running the Sample Application, the developer should also configure a simple Email/Password authentication provider on the MongoDB Realm instance.
The CosyncStorageSample application is relatively simple. After the user signs up and logs in, he/she is presented with a scrollable view images that have been uploaded to the public partition.
To upload an image to the Amazon S3 storage bucket that has been configured by the developer for the Sample Application, the user should click on the cloud/arrow icon in the upper right hand corner.
As an image is uploaded, the sample application will show the upload progress in the top part of the user interface.
The CosyncStorageSample application supports both image and video asset types. Videos can be played directly within the scrollable asset view.
To actually compile the source code for the CosyncStorageSample application, the only thing the developer needs to do is copy the Realm App Id into the Constants.swift file as shown below in the Xcode project.
Everything else should run out of the box. The only Swift Package dependencies are the Realm SDK and the Kingfisher SDK for image preview.