Last Updated on : 2024-10-31 08:28:05download
Value-added services v1.0 use H5 pages, and UI BizBundle only provides cloud storage capabilities, with only a few categories. Value-Added Services v2.0 extends to multiple categories and adopts the miniapp architecture. It is strongly recommended that you upgrade to v2.0 and choose the miniapp page. H5 pages will no longer be iterated in the future.
Objective-C
#import <ThingModuleServices/ThingCameraCloudServiceProtocol.h>
Swift
Add the following content to the bridging header file xxx_Bridging-Header.h
:
#import <ThingModuleServices/ThingCameraCloudServiceProtocol.h>
API description
Before the API call, make sure that the user has logged in to the app.
Each subscription to the Cloud Storage for Videos service is mapped to a unique device. To get the cloud storage service page, ThingSmartDeviceModel
of the device is required.
The Cloud Storage for Videos service page is returned as UIViewController
. UINavigationController
must be used to call the push
or present
method.
Example
Objective-C
id<ThingCameraCloudServiceProtocol> impl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingCameraCloudServiceProtocol)];
[impl requestCloudServicePageWithDevice:self.deviceModel completionBlock:^(__kindof UIViewController *page, NSError *error) {
if (page) {
[self.navigationController pushViewController:page animated:YES];
}
}];
Swift
let impl = ThingSmartBizCore.sharedInstance().service(of: ThingCameraCloudServiceProtocol.self)
(impl as? ThingCameraCloudServiceProtocol)?.requestCloudServicePage(deviceModel, completionBlock: { (page, error) in
guard let cloudServiceVc = page {
print("\(error!)")
return
}
yourNaviController.pushViewController(cloudServiceVc, animated: true)
})
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback