PGPlugin Class Reference

Inherits from NSObject
Conforms to PGPluginAuthorize
Declared in PGPlugin.h

Overview

PDR插件基类 扩展插件都应该从该类继承

  JSFrameContext

插件运行的窗口对象
参考: PDRCoreAppFrame

@property (nonatomic, assign) PDRCoreAppFrame *JSFrameContext

Discussion

插件运行的窗口对象
参考: PDRCoreAppFrame

Declared In

PGPlugin.h

  appContext

插件运行的应用对象
参考: PDRCoreApp

@property (nonatomic, assign) PDRCoreApp *appContext

Discussion

插件运行的应用对象
参考: PDRCoreApp

Declared In

PGPlugin.h

  errorURL

插件错误码参考地址

@property (nonatomic, copy) NSString *errorURL

Discussion

插件错误码参考地址

Declared In

PGPlugin.h

  name

插件名字

@property (nonatomic, copy) NSString *name

Discussion

插件名字

Declared In

PGPlugin.h

  content

插件描述

@property (nonatomic, copy) NSString *content

Discussion

插件描述

Declared In

PGPlugin.h

– toSyncCallback:withReslut:

同步调用JavaScript回调函数 参考:toCallback:withReslut:

- (void)toSyncCallback:(NSString *)callbackId withReslut:(NSString *)message

Declared In

PGPlugin.h

– toCallback:withReslut:

异步调用JavaScript回调函数

- (void)toCallback:(NSString *)callbackId withReslut:(NSString *)message

Parameters

callbackId

回调ID

message

JSON格式结果 参考:toJSONString

Return Value

void

Declared In

PGPlugin.h

– toErrorCallback:withCode:

调用JS层错误回调

- (void)toErrorCallback:(NSString *)callbackId withCode:(int)errorCode

Discussion

调用JS层错误回调

Declared In

PGPlugin.h

– toErrorCallback:withNSError:

将OC NSError转化为H5+Error

- (void)toErrorCallback:(NSString *)callbackId withNSError:(NSError *)error

Discussion

将OC NSError转化为H5+Error

Declared In

PGPlugin.h

– toErrorCallback:withSDKError:withMessage:

封装插件使用的SDK产生的错误信息 code:-100 message:[self.name self.contexnt:errorCode]message,self.sdkErrorURL

- (void)toErrorCallback:(NSString *)callbackId withSDKError:(int)errorCode withMessage:(NSString *)message

Discussion

封装插件使用的SDK产生的错误信息 code:-100 message:[self.name self.contexnt:errorCode]message,self.sdkErrorURL

Declared In

PGPlugin.h