百度智能云

All Product Document

          Object Storage

          SDK Installation

          Installation Steps

          1.Download the SDK package on the Official Website. 2.Decompress to obtain frameworks. Frameworks consist of Basic, BOS and STS, where Basic and BOS are mandatory, and STS is optional based on temporary authorization. 3.Copy frameworks to your Xcode project directory as needed, such as lib directory. 4.Right click project in Xcode > Add files to "Your project", and import the frameworks you copied. 5.ObjC needs to be added in Other Linker Flags option of Build Settings.

          Configure App Transport Security (ATS)

          Note: If BOS uses https endpoint, ATS related configuration is not needed, and info.plist needs to be configured only when http endpoint is used.

          Starting from iOS 9.0 and OS X v10.11, the function of pp Transport Security (ATS) is enabled by default. ATS uses HTTPS to access to Web service mandatorily, and it must use version above TLS v1.2 to ensure communication security. See the following for detailed need of ATS: Requirements for Connecting

          If App supports iOS 9.0, and needs to access to Web service not meeting the requirements above, NSAppTransportSecurity element must be used in info.plist file to add exceptional processing rule. See the following for use method of NSAppTransportSecurity: App Transport Security

          SDK's Directory Structure

          Baidu-BOS-SDK-iOS-v1.0.0
          | _BaiduBCEBasic.framework                   // Basic module 
          | | ____Headers 
          |   | ____BCEClient.h                        // BCE service base class 
          |   | ____BCEClientConfiguration.h           // BCE service configuration base class 
          |   | ____BCECredentials.h                   // BCE AK, SK signature class 
          |   | ____BCEError.h                         // BCE's general error code 
          |   | ____BCERegion.h                        // BCE's service region 
          |   | ____BCERequest.h                       // BCE network request class 
          |   | ____BCEResponse.h                      // BCE network response class 
          |   | ____BCEResponseMetadata.h              // BCE network response metadata class 
          |   | ____BCESTSCredentials.h                // BCE temporarily authorized signature class 
          |   | ____BCETask.h                          // BCE universal task class 
          | 
          | _BaiduBCEBOS.framework                     // BOS module 
          | | ____Headers 
          |   | ____BOSClient.h                        // BOS client entry class 
          |   | ____BOSClientConfiguration.h           // BOS-specific Client configuration 
          |   | ____BOSListBucketModel.h               // List bucket related class 
          |   | ____BOSGetOBjectModel.h                // Download object related class 
          |   | ____ . 
          |   | ____ .                                 // ... 
          |   | ____ . 
          |   | ____BOSPutobjectModel.h                // Upload object related class 
          | 
          | _BaiduBCESTS.framework                     // STS authorized module 
          | | ____Headers 
          |   | ____STSClient.h                        // STS service entry class 
          |   | ____STSClientConfiguration.h           // STS-specific Client configuration 
          |   | ____STSGetSessionTokenModel.h          // Obtain token related class
          Previous
          Overview
          Next
          Initialization