NubrickSDK
定義
public enum NubrickSDK {
@MainActor
public static func initialize(
projectId: String,
onEvent: (@Sendable (_ event: ComponentEvent) -> Void)? = nil,
httpRequestInterceptor: NubrickHttpRequestInterceptor? = nil,
onDispatch: ((_ event: NubrickEvent) -> Void)? = nil,
trackCrashes: Bool = true
)
public nonisolated static func dispatch(_ event: NubrickEvent)
@MainActor public static func overlayViewController() -> UIViewController
@MainActor public static func overlay() -> some View
@MainActor
public static func embedding(
_ id: String,
arguments: NubrickArguments? = nil,
onEvent: ((_ event: ComponentEvent) -> Void)? = nil,
onSizeChange: ((_ width: NubrickSize, _ height: NubrickSize) -> Void)? = nil
) -> some View
@MainActor
public static func embedding<V: View>(
_ id: String,
arguments: NubrickArguments? = nil,
onEvent: ((_ event: ComponentEvent) -> Void)? = nil,
@ViewBuilder content: @escaping (_ phase: SwiftUIEmbeddingPhase) -> V,
onSizeChange: ((_ width: NubrickSize, _ height: NubrickSize) -> Void)? = nil
) -> some View
@MainActor
public static func embeddingUIView(
_ id: String,
arguments: NubrickArguments? = nil,
onEvent: ((_ event: ComponentEvent) -> Void)? = nil,
onSizeChange: ((_ width: NubrickSize, _ height: NubrickSize) -> Void)? = nil
) -> UIView
@MainActor
public static func embeddingUIView(
_ id: String,
arguments: NubrickArguments? = nil,
onEvent: ((_ event: ComponentEvent) -> Void)? = nil,
content: @escaping (_ phase: UIKitEmbeddingPhase) -> UIView,
onSizeChange: ((_ width: NubrickSize, _ height: NubrickSize) -> Void)? = nil
) -> UIView
public static func remoteConfig(
_ id: String,
phase: @escaping (@Sendable (_ phase: RemoteConfigPhase) -> Void)
)
@MainActor
public static func remoteConfigAsView<V: View>(
_ id: String,
@ViewBuilder phase: @escaping ((_ phase: RemoteConfigPhase) -> V)
) -> some View
@MainActor public static func setUserProperties(_ properties: [String: Any])
@MainActor public static func setUserProperty(_ key: String, value: Any)
@MainActor public static func setUserId(_ id: String)
@MainActor public static func getUserProperty(_ key: String) -> String?
@MainActor public static func getUserId() -> String?
@MainActor public static func getUserProperties() -> [String: String]
}
public typealias NubrickArguments = [String: any Sendable]
public typealias NubrickHttpRequestInterceptor = @Sendable (_ request: URLRequest) -> URLRequest
@frozen
public enum NubrickSize: Sendable {
case fixed(CGFloat)
case fill
}初期化
イベント送信
埋め込み(SwiftUI)
埋め込み(UIKit)
埋め込みサイズの取得
Remote Config
ユーザープロパティ
ビルトインのユーザープロパティ
Key
Description
補足
Last updated