Read More
Read now

How to access iCloud Drive or Google Drive Data in application using Swift 3

Save

iCloud Drive or Google Drive

Some times we need to access the data in application like we need to upload the data to server or send to someone using the application so default iOS device provide only photo library to access but we need all types of file in one place due to this reason we need to access the google or iCloud drive.

iOS provide classes to use this functionality but respective drive application must be installed in the devices;

Follow this steps:

1: add this two delegate in class where you want to use.

like as:

2: Now create one button so you can click and access the data :

Here i have taken one button and write this code:

Note:

for documnetTypes:

Here I have mentioned only images so you have to pass all types of file extension whatever you need .

3: Now write their delegate so you can pick the selected data.

4: this delegate method will be called now, their methods definition

A: documentpicker: this method will called if have selected any file in drive then it will provide the url through which you can access the data and open in web service or share to other.

B:  documentPickerWasCancelled : when user did not select any items.

 

 

 

 

 

 

 

 

 

 

 

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home