NBCore
@interface NBCore : NSObject <NSCopying>
初期化クラス
アプリ全体の設定値のうち、起動時に一度だけ設定するパラメータを保持する。
-
アプリケーションID、アプリケーションキー、テナントIDの初期化を行う。
Declaration
Objective-C
+ (void)setUpWithAppId:(nonnull NSString *)appId appKey:(nonnull NSString *)appKey tenantId:(nonnull NSString *)tenantId;Swift
class func setUp(appId: String, appKey: String, tenantId: String)Parameters
appIdアプリケーションID
appKeyアプリケーションキー
tenantIdテナントID
-
エンドポイントURIを設定する。nilを設定するとクラウド用URIとなる。
Declaration
Objective-C
+ (void)setEndPointUri:(nonnull NSString *)endPointUri;Swift
class func set(endPointUri: String)Parameters
endPointUriエンドポイントURI
-
アプリケーションIDを取得する。
Declaration
Objective-C
+ (nonnull NSString *)appId;Swift
class func appId() -> StringReturn Value
アプリケーションID
-
アプリケーションキーを取得する。
Declaration
Objective-C
+ (nonnull NSString *)appKey;Swift
class func appKey() -> StringReturn Value
アプリケーションキー
-
テナントIDを取得する。
Declaration
Objective-C
+ (nonnull NSString *)tenantId;Swift
class func tenantId() -> StringReturn Value
テナントID
-
エンドポイントURIを取得する。
Declaration
Objective-C
+ (nonnull NSString *)endPointUri;Swift
class func endPointUri() -> StringReturn Value
エンドポイントURI
-
セッションの再生成およびcompletionHandlerの保存
UIApplicationDelegate handleEventsForBackgroundURLSessionでコールする必要がある。
Declaration
Objective-C
+ (void)recreateSessionWithIdentifier:(nonnull NSString *)identifier completionHandler:(nonnull void (^)(void))completionHandler;Swift
class func recreateSession(identifier: String, completaionHandler completionHandler: @escaping () -> Void)Parameters
identifier再生成するセッションのID
completionHandlerシステムへ完了を通知するcompletionHandler
NBCore Class Reference