You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
4 years ago
|
//
|
||
|
// DCUniMPInstance.h
|
||
|
// DCUniMP
|
||
|
//
|
||
|
// Created by XHY on 2020/1/14.
|
||
|
// Copyright © 2020 DCloud. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import <Foundation/Foundation.h>
|
||
|
#import "DCUniMPConfiguration.h"
|
||
|
|
||
|
/// 方法执行回调block
|
||
|
/// @param success 是否执行成功
|
||
|
/// @param error 失败信息
|
||
|
typedef void(^DCUniMPResultBlock)(BOOL success, NSError *_Nullable error);
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
@interface DCUniMPInstance : NSObject
|
||
|
|
||
|
@property (nonatomic, copy, readonly) NSString *appid; /**< 小程序的 appid */
|
||
|
@property (nonatomic, strong) DCUniMPConfiguration *configuration; /**< 小程序应用的配置信息 */
|
||
|
|
||
|
/// 将小程序显示到前台
|
||
|
/// @param completion 方法执行回调
|
||
|
- (void)showWithCompletion:(DCUniMPResultBlock)completion;
|
||
|
|
||
|
/// 将小程序隐藏到后台
|
||
|
/// @param completion 方法执行回调
|
||
|
- (void)hideWithCompletion:(DCUniMPResultBlock)completion;
|
||
|
|
||
|
/// 关闭小程序
|
||
|
/// @param completion 方法执行回调
|
||
|
- (void)closeWithCompletion:(DCUniMPResultBlock)completion;
|
||
|
|
||
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|