Skip to content

Braze Flutter SDKについて

Braze Flutter SDKは、Brazeのメッセージング、分析、ユーザーエンゲージメント機能をアプリケーションに統合するのに役立ちます。

開始するには、以下のリソースを参照してください。

クイックスタート

1
flutter pub add braze_plugin

Android

1
2
3
4
5
6
<!-- android/res/values/braze.xml -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string translatable="false" name="com_braze_api_key">YOUR_APP_IDENTIFIER_API_KEY</string>
  <string translatable="false" name="com_braze_custom_endpoint">YOUR_CUSTOM_ENDPOINT_OR_CLUSTER</string>
</resources>
1
2
3
<!-- AndroidManifest.xml -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

iOS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// AppDelegate.swift
import BrazeKit
import braze_plugin

class AppDelegate: UIResponder, UIApplicationDelegate {
  static var braze: Braze? = nil

  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
  ) -> Bool {
    // Setup Braze
    let configuration = Braze.Configuration(
      apiKey: "<BRAZE_API_KEY>",
      endpoint: "<BRAZE_ENDPOINT>"
    )
    // - Enable logging or customize configuration here
    configuration.logger.level = .info
    let braze = BrazePlugin.initBraze(configuration)
    AppDelegate.braze = braze

    return true
  }
}

Dart

1
2
3
4
5
6
7
import 'package:braze_plugin/braze_plugin.dart';

// ...
_braze = new BrazePlugin();

// ...
_braze.changeUser("Jane Doe");

高度な統合オプションについては、Braze開発者ガイドを参照してください。

バージョンサポート

ツール サポートされる最小バージョン
Dart 2.17.0+
Flutter(CocoaPods経由の統合) 1.10.0+
Flutter(CocoaPodsまたはSwift Package Manager経由の統合) 3.24.0+
iOSデプロイメントターゲット 12.0+

このSDKは、基盤となるBrazeネイティブSDKの要件も継承します。braze-inc/braze-android-sdkおよびbraze-inc/braze-swift-sdkで定義されているバージョンサポート情報にも準拠してください。

サンプルアプリ

/exampleフォルダには、このパッケージのAPIを統合して使用する方法を示すサンプルアプリが含まれています。

お問い合わせ

ご質問がある場合は、[email protected]までお問い合わせください。

リポジトリの詳細とサンプルプロジェクトについては、https://github.com/braze-inc/braze-flutter-sdkを参照してください。

New Stuff!