ARGear SDK Documentations
  • Introduction
  • Android
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARCore Connect API
    • 14. API Reference
  • iOS
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARKit Connect API
    • 14. API Reference
  • Unity
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Plugin Overview
    • 4. ARGearManager
    • 5. ARGearCamera
    • 6. CMS Service
    • 7. Download Contents
    • 8. Set Contents
    • 9. Switch Camera Face
    • 10. Enable Debugging Mode
    • 11. API Reference
Powered by GitBook
On this page

Was this helpful?

  1. iOS

8. Download Contents

Previous7. CMS ServiceNext9. Set Contents

Last updated 5 years ago

Was this helpful?

You can download contents zip_files through the REST API, using each item's zip_file URL. To download the zip_file, you first need to request a signed URL through the ARGAuth member of an initialized .

The sample code below shows how to obtain a Signed URL by passing an item's zip_file URL, title, type, and the implemented to the requestSignedUrl function.

// Sample Code. Download Contents by Requesting Singed URL

ARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];
 
ARGAuthCallback callback;
callback.Success = ^(NSString *url) {
    // Download Contents from Signed URL
};
    
callback.Error = ^(ARGStatusCode code) {
};
 
[[argSession auth] requestSignedUrlWithUrl:fileUrl itemTitle:title itemType:type completion:callback];
// Sample Code. Download Contents by Requesting Singed URL

let callback: ARGAuthCallback = ARGAuthCallback(Success: { (url: String?) in
    // Download Contents from Signed URL
}) { (code: ARGStatusCode) in
    // error with status code
}

if let session = argSession, let auth = session.auth {
    auth.requestSignedUrl(withUrl: zipFileUrl, itemTitle: title, itemType: type, completion: callback)
}

ARGSession
ARGAuthCallback
ARGAuth