ÿÿ Adapty Unity SDK v3.3 ã¸ã®ç§»è¡Œ | Adapty ドキュメント

Adapty Unity SDK ã‚’ v3.3 ã¸ç§»è¡Œã™ã‚‹

Adapty SDK 3.3.0 ã¯ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒªãƒªãƒ¼ã‚¹ã§ã‚りã€ã„ãã¤ã‹ã®æ”¹å–„ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ç§»è¡Œä½œæ¥­ãŒå¿…è¦ãªå ´åˆãŒã‚りã¾ã™ã€‚

  1. Adapty SDK v3.3.x ã¸ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã€‚
  2. Adapty SDK ã® Adapty モジュールãŠã‚ˆã³ AdaptyUI モジュールã§ã€è¤‡æ•°ã®ã‚¯ãƒ©ã‚¹ãƒ»ãƒ—ロパティ・メソッドã®åå‰ãŒå¤‰æ›´ã•れã¾ã—ãŸã€‚
  3. SetLogLevel メソッドãŒã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’引数ã¨ã—ã¦å—ã‘å–るよã†ã«ãªã‚Šã¾ã—ãŸã€‚
  4. PresentCodeRedemptionSheet メソッドãŒã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’引数ã¨ã—ã¦å—ã‘å–るよã†ã«ãªã‚Šã¾ã—ãŸã€‚
  5. ペイウォールビューã®ä½œæˆæ–¹æ³•を変更ã™ã‚‹ã€‚
  6. GetProductsIntroductoryOfferEligibility メソッドを削除ã™ã‚‹ã€‚
  7. フォールãƒãƒƒã‚¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚’プラットフォームã”ã¨ã«åˆ¥ã€…ã®ãƒ•ァイル(å„プラットフォーム1ファイル)ã¨ã—㦠Assets/StreamingAssets/ ã«ä¿å­˜ã—ã€ãã®ãƒ•ァイルåã‚’ SetFallbackPaywalls ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã€‚
  8. 購入処ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  9. ペイウォールビルダーã®ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  10. ペイウォールビルダーã®ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚¨ãƒ©ãƒ¼å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  11. Adjustã€Amplitudeã€AppMetricaã€Appsflyerã€Branchã€Firebase ãŠã‚ˆã³ Google Analyticsã€Mixpanelã€OneSignalã€Pushwoosh ã®ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³è¨­å®šã‚’æ›´æ–°ã™ã‚‹ã€‚
  12. Observer モードã®å®Ÿè£…ã‚’æ›´æ–°ã™ã‚‹ã€‚
  13. 明示的㪠Activate 呼ã³å‡ºã—ã§ Unity プラグインã®åˆæœŸåŒ–ã‚’æ›´æ–°ã™ã‚‹ã€‚

Adapty Unity SDK ã‚’ 3.3.x ã¸ã‚¢ãƒƒãƒ—グレードã™ã‚‹

ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¾ã§ã¯ã€Adapty SDK ãŒã‚¢ãƒ—リ内㧠Adapty を正常ã«å‹•作ã•ã›ã‚‹ãŸã‚ã®ã‚³ã‚¢ã‹ã¤å¿…須㮠SDK ã§ã‚りã€AdaptyUI SDK ã¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ãƒ“ルダーを使用ã™ã‚‹å ´åˆã«ã®ã¿å¿…è¦ãªã‚ªãƒ—ション㮠SDK ã§ã—ãŸã€‚

ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.0 以é™ã€AdaptyUI SDK ã¯éžæŽ¨å¥¨ã¨ãªã‚Šã€AdaptyUI 㯠Adapty SDK ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¨ã—ã¦çµ±åˆã•れã¾ã—ãŸã€‚ã“ã®å¤‰æ›´ã«ã‚ˆã‚Šã€AdaptyUISDK を削除ã—ã€AdaptySDK ã‚’å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚

  1. プロジェクトã‹ã‚‰ AdaptySDK 㨠AdaptyUISDK ã®ä¸¡æ–¹ã®ãƒ‘ッケージä¾å­˜é–¢ä¿‚を削除ã™ã‚‹ã€‚
  2. AdaptySDK フォルダー㨠AdaptyUISDK フォルダーを削除ã™ã‚‹ã€‚
  3. Adapty SDK installation & configuration for Unity ページã®èª¬æ˜Žã«å¾“ã£ã¦ã€AdaptySDK パッケージをå†åº¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ã€‚

åå‰å¤‰æ›´

  1. Adapty モジュールã§ã®åå‰å¤‰æ›´:

    æ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³
    Adapty.sdkVersionAdapty.SDKVersion
    Adapty.LogLevelAdaptyLogLevel
    Adapty.PaywallAdaptyPaywall
    Adapty.PaywallFetchPolicyAdaptyPaywallFetchPolicy
    PaywallProductAdaptyPaywallProduct
    Adapty.ProfileAdaptyProfile
    Adapty.ProfileParametersAdaptyProfileParameters
    ProfileGenderAdaptyProfileGender
    ErrorAdaptyError
  2. AdaptyUI モジュールã§ã®åå‰å¤‰æ›´:

    æ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³
    CreatePaywallViewCreateView
    PresentPaywallViewPresentView
    DismissPaywallViewDismissView
    AdaptyUI.ViewAdaptyUIView
    AdaptyUI.ActionAdaptyUIUserAction

SetLogLevel メソッドã®å¤‰æ›´

SetLogLevel メソッドãŒã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’引数ã¨ã—ã¦å—ã‘å–るよã†ã«ãªã‚Šã¾ã—ãŸã€‚

- Adapty.SetLogLevel(Adapty.LogLevel.Verbose);
+ Adapty.SetLogLevel(Adapty.LogLevel.Verbose, null); // or you can pass the callback to handle the possible error

PresentCodeRedemptionSheet メソッドã®å¤‰æ›´

PresentCodeRedemptionSheet メソッドãŒã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’引数ã¨ã—ã¦å—ã‘å–るよã†ã«ãªã‚Šã¾ã—ãŸã€‚

- Adapty.PresentCodeRedemptionSheet();
+ Adapty.PresentCodeRedemptionSheet(null); // or you can pass the callback to handle the possible error

ペイウォールビューã®ä½œæˆæ–¹æ³•を変更ã™ã‚‹

完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ãƒ“ルダーã§ä½œæˆã—ãŸãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã®ãƒ“ュー設定をå–å¾—ã™ã‚‹ ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

+ var parameters = new AdaptyUICreateViewParameters()
+   .SetPreloadProducts(true);

- AdaptyUI.CreatePaywallView(
+ AdaptyUI.CreateView(
   paywall, 
-  preloadProducts: true,
+  parameters,
  (view, error) => {
  // use the view
});

GetProductsIntroductoryOfferEligibility メソッドã®å‰Šé™¤

Adapty iOS SDK 3.3.0 よりå‰ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã‹ã©ã†ã‹ã«é–¢ã‚らãšã€ãƒ—ロダクトオブジェクトã«ã¯å¸¸ã«ã‚ªãƒ•ァーãŒå«ã¾ã‚Œã¦ã„ã¾ã—ãŸã€‚ãã®ãŸã‚ã€ã‚ªãƒ•ァーを使用ã™ã‚‹å‰ã«æ‰‹å‹•ã§å¯¾è±¡ç¢ºèªã‚’行ã†å¿…è¦ãŒã‚りã¾ã—ãŸã€‚

ç¾åœ¨ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã§ã‚ã‚‹å ´åˆã«ã®ã¿ãƒ—ロダクトオブジェクトã«ã‚ªãƒ•ァーãŒå«ã¾ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€å¯¾è±¡ç¢ºèªã¯ä¸è¦ã«ãªã‚Šã¾ã—㟠— オファーãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å¯¾è±¡ã§ã™ã€‚

フォールãƒãƒƒã‚¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã®æä¾›æ–¹æ³•ã‚’æ›´æ–°ã™ã‚‹

ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¾ã§ã¯ã€ãƒ•ォールãƒãƒƒã‚¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã¯ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れ㟠JSON ã¨ã—ã¦æ¸¡ã•れã¦ã„ã¾ã—ãŸã€‚v 3.3.0 以é™ã€ä»•組ã¿ãŒå¤‰æ›´ã•れã¾ã—ãŸã€‚

  1. フォールãƒãƒƒã‚¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚’ /Assets/StreamingAssets/ 内ã®ãƒ•ァイルã«ä¿å­˜ã™ã‚‹ï¼ˆAndroid 用㫠1 ファイルã€iOS 用㫠1 ファイル)。
  2. ファイルåã‚’ SetFallbackPaywalls ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã€‚

コードã®å¤‰æ›´ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚

using AdaptySDK;

void SetFallBackPaywalls() {

+ #if UNITY_IOS
+   var assetId = "adapty_fallback_ios.json";
+ #elif UNITY_ANDROID
+   var assetId = "adapty_fallback_android.json";
+ #else
+   var assetId = "";
+ #endif

-   Adapty.SetFallbackPaywalls("FALLBACK_PAYWALLS_JSON_STRING", (error) => {
+   Adapty.SetFallbackPaywalls(assetId, (error) => {
    // handle the error
  });
}

最終的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã¯ Unity ã§ãƒ•ォールãƒãƒƒã‚¯ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚’使用ã™ã‚‹ ページをå‚ç…§ã—ã¦ãã ã•ã„。

購入処ç†ã®æ›´æ–°

以å‰ã¯ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れãŸè³¼å…¥ã¨ä¿ç•™ä¸­ã®è³¼å…¥ã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦æ‰±ã‚れã€ãれãžã‚Œ PaymentCancelled 㨠PendingPurchase コードãŒè¿”ã•れã¦ã„ã¾ã—ãŸã€‚

æ–°ã—ã„ AdaptyPurchaseResultType クラスを使用ã—ã¦ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«æ¸ˆã¿ãƒ»æˆåŠŸãƒ»ä¿ç•™ä¸­ã®è³¼å…¥ã‚’処ç†ã—ã¾ã™ã€‚購入コードを次ã®ã‚ˆã†ã«æ›´æ–°ã—ã¦ãã ã•ã„。

using AdaptySDK;

void MakePurchase(AdaptyPaywallProduct product) {
- Adapty.MakePurchase(product, (profile, error) => {
-   // handle successfull purchase
+ Adapty.MakePurchase(product, (result, error) => {
+   switch (result.Type) {
+     case AdaptyPurchaseResultType.Pending:
+       // handle pending purchase
+       break;
+     case AdaptyPurchaseResultType.UserCancelled:
+       // handle purchase cancellation
+       break;
+     case AdaptyPurchaseResultType.Success:
+       var profile = result.Profile;
+       // handle successful purchase
+       break;
+     default:
+       break;
    }
  });
}

最終的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã¯ モãƒã‚¤ãƒ«ã‚¢ãƒ—リã§è³¼å…¥ã™ã‚‹ ページをå‚ç…§ã—ã¦ãã ã•ã„。

ペイウォールビルダーã®ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’æ›´æ–°ã™ã‚‹

キャンセルã•れãŸè³¼å…¥ã¨ä¿ç•™ä¸­ã®è³¼å…¥ã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦æ‰±ã‚れãªããªã‚Šã€ã“れらã®ã‚±ãƒ¼ã‚¹ã¯ã™ã¹ã¦ PaywallViewDidFinishPurchase メソッドã§å‡¦ç†ã•れã¾ã™ã€‚

  1. キャンセルã•れãŸè³¼å…¥ã‚¤ãƒ™ãƒ³ãƒˆã®å‡¦ç†ã‚’削除ã™ã‚‹ã€‚

  2. 購入æˆåŠŸã‚¤ãƒ™ãƒ³ãƒˆã®å‡¦ç†ã‚’次ã®ã‚ˆã†ã«æ›´æ–°ã™ã‚‹ã€‚

    - public void OnFinishPurchase(
    -   AdaptyUI.View view, 
    -   Adapty.PaywallProduct product, 
    -   Adapty.Profile profile
    - ) { }
    
    + public void PaywallViewDidFinishPurchase(
    +   AdaptyUIView view, 
    +   AdaptyPaywallProduct product, 
    +   AdaptyPurchaseResult purchasedResult
    + ) { }
  3. アクションã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnPerformAction( - AdaptyUI.View view, - AdaptyUI.Action action - ) { + public void PaywallViewDidPerformAction( + AdaptyUIView view, + AdaptyUIUserAction action + ) { switch (action.Type) { - case AdaptyUI.ActionType.Close: + case AdaptyUIUserActionType.Close: view.Dismiss(null); break; - case AdaptyUI.ActionType.OpenUrl: + case AdaptyUIUserActionType.OpenUrl: var urlString = action.Value; if (urlString != null { Application.OpenURL(urlString); } default: // handle other events break; } }
  4. 購入開始ã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnSelectProduct(
    -   AdaptyUI.View view, 
    -   Adapty.PaywallProduct product
    - ) { }
    
    + public void PaywallViewDidSelectProduct(
    +   AdaptyUIView view, 
    +   string productId
    + ) { }
  5. 購入失敗ã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnFailPurchase(
    -   AdaptyUI.View view, 
    -   Adapty.PaywallProduct product, 
    -   Adapty.Error error
    - ) { }
    
    + public void PaywallViewDidFailPurchase(
    +   AdaptyUIView view, 
    +   AdaptyPaywallProduct product, 
    +   AdaptyError error
    + ) { }
    
  6. リストアæˆåŠŸã‚¤ãƒ™ãƒ³ãƒˆã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnFailRestore(
    -   AdaptyUI.View view, 
    -   Adapty.Error error
    - ) { }
    
    + public void PaywallViewDidFailRestore(
    +   AdaptyUIView view, 
    +   AdaptyError error
    + ) { }
    

最終的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã¯ ペイウォールã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ ページをå‚ç…§ã—ã¦ãã ã•ã„。

ペイウォールビルダーã®ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚¨ãƒ©ãƒ¼å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹

エラーã®å‡¦ç†ã‚‚変更ã•れã¾ã—ãŸã€‚以下ã®ã‚¬ã‚¤ãƒ€ãƒ³ã‚¹ã«å¾“ã£ã¦ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。

  1. プロダクト読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnFailLoadingProducts(
    -   AdaptyUI.View view, 
    -   Adapty.Error error
    - ) { }
    
    + public void PaywallViewDidFailLoadingProducts(
    +   AdaptyUIView view, 
    +   AdaptyError error
    + ) { }
  2. レンダリングエラーã®å‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚

    - public void OnFailRendering(
    -   AdaptyUI.View view, 
    -   Adapty.Error error
    - ) { }
    
    + public void PaywallViewDidFailRendering(
    +   AdaptyUIView view, 
    +   AdaptyError error
    + ) { }

サードパーティインテグレーション SDK è¨­å®šã®æ›´æ–°

Adapty Unity SDK 3.3.0 以é™ã€updateAttribution メソッドã®ãƒ‘ブリック API ã‚’æ›´æ–°ã—ã¾ã—ãŸã€‚以å‰ã¯ [AnyHashable: Any] ディクショナリをå—ã‘å–りã€ã•ã¾ã–ã¾ãªã‚µãƒ¼ãƒ“スã‹ã‚‰ã‚¢ãƒˆãƒªãƒ“ューションオブジェクトを直接渡ã™ã“ã¨ãŒã§ãã¾ã—ãŸã€‚ç¾åœ¨ã¯ [String: any Sendable] ãŒå¿…è¦ãªãŸã‚ã€æ¸¡ã™å‰ã«ã‚¢ãƒˆãƒªãƒ“ューションオブジェクトを変æ›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚

Adapty Unity SDK 3.3.0 以é™ã§ã‚¤ãƒ³ãƒ†ã‚°ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒæ­£ã—ãæ©Ÿèƒ½ã™ã‚‹ã‚ˆã†ã€ä»¥ä¸‹ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«è¨˜è¼‰ã•れã¦ã„るインテグレーション㮠SDK 設定を更新ã—ã¦ãã ã•ã„。

Adjust

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Adjust インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

- using static AdaptySDK.Adapty;
 using AdaptySDK;

 Adjust.GetAdid((adid) => {
-   Adjust.GetAttribution((attribution) => {
-     Dictionary<String, object> data = new Dictionary<String, object>();
-
-     data["network"] = attribution.Network;
-     data["campaign"] = attribution.Campaign;
-     data["adgroup"] = attribution.Adgroup;
-     data["creative"] = attribution.Creative;
-
-     String attributionString = JsonUtility.ToJson(data);
-     Adapty.UpdateAttribution(attributionString, AttributionSource.Adjust, adid, (error) => {
-       // handle the error
-     });
+   if (adid != null) {
+     Adapty.SetIntegrationIdentifier(
+       "adjust_device_id", 
+       adid, 
+       (error) => {
+         // handle the error
+     });
    }
 });

 Adjust.GetAttribution((attribution) => {
   Dictionary<String, object> data = new Dictionary<String, object>();

   data["network"] = attribution.Network;
   data["campaign"] = attribution.Campaign;
   data["adgroup"] = attribution.Adgroup;
   data["creative"] = attribution.Creative;

   String attributionString = JsonUtility.ToJson(data);
    
-   Adapty.UpdateAttribution(attributionString, AttributionSource.Adjust, adid, (error) => {
+   Adapty.UpdateAttribution(attributionString, "adjust", (error) => {
       // handle the error
   });
 });

Amplitude

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Amplitude インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;
- var builder = new Adapty.ProfileParameters.Builder();
- builder.SetAmplitudeUserId("YOUR_AMPLITUDE_USER_ID");
- builder.SetAmplitudeDeviceId(amplitude.getDeviceId());

- Adapty.UpdateProfile(builder.Build(), (error) => {
-     // handle error
- });

+ Adapty.SetIntegrationIdentifier(
+   "amplitude_user_id", 
+   "YOUR_AMPLITUDE_USER_ID", 
+   (error) => {
+   // handle the error
+ });

+ Adapty.SetIntegrationIdentifier(
+   "amplitude_device_id", 
+   amplitude.getDeviceId(), 
+   (error) => {
+   // handle the error
+ });

AppMetrica

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€AppMetrica インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;

- var deviceId = AppMetrica.GetDeviceId();

- if (deviceId != null {
-   var builder = new Adapty.ProfileParameters.Builder();

-   builder.SetAppmetricaProfileId("YOUR_ADAPTY_CUSTOMER_USER_ID");
-   builder.SetAppmetricaDeviceId(deviceId);

-   Adapty.UpdateProfile(builder.Build(), (error) => {
-       // handle error
-   });
- }

+ var deviceId = AppMetrica.GetDeviceId();

+ if (deviceId != null {
+   Adapty.SetIntegrationIdentifier(
+     "appmetrica_device_id", 
+     deviceId, 
+     (error) => {
+     // handle the error
+   });
+   
+   Adapty.SetIntegrationIdentifier(
+     "appmetrica_profile_id", 
+     "YOUR_ADAPTY_CUSTOMER_USER_ID", 
+     (error) => {
+     // handle the error
+   });
+ }

AppsFlyer

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€AppsFlyer インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

 using AppsFlyerSDK;
 using AdaptySDK;

 // before SDK initialization
 AppsFlyer.getConversionData(this.name);

 // in your IAppsFlyerConversionData
 void onConversionDataSuccess(string conversionData) {
     // It's important to include the network user ID
-    string appsFlyerId = AppsFlyer.getAppsFlyerId();
-    Adapty.UpdateAttribution(conversionData, AttributionSource.Appsflyer, appsFlyerId, (error) => {
+    string appsFlyerId = AppsFlyer.getAppsFlyerId();
+    
+    Adapty.SetIntegrationIdentifier(
+      "appsflyer_id", 
+      appsFlyerId, 
+      (error) => {
         // handle the error
     });
+    
+    Adapty.UpdateAttribution(
+      conversionData, 
+      "appsflyer",
+      (error) => {
+        // handle the error
+      });
 }

Branch

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Branch インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;

- class YourBranchImplementation {
-     func initializeBranch() {
-         Branch.getInstance().initSession(launchOptions: launchOptions) { (data, error) in
-             if let data {
-                 Adapty.updateAttribution(data, source: .branch)
-             }
-         }
-     }
- }

+ Branch.initSession(delegate(Dictionary<string, object> parameters, string error) {
+     string attributionString = JsonUtility.ToJson(parameters);
+     
+     Adapty.UpdateAttribution(
+       attributionString, 
+       "branch", 
+       (error) => {
+         // handle the error
+       });
+ });

Firebase 㨠Google Analytics

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Firebase ãŠã‚ˆã³ Google Analytics インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

 // We suppose FirebaseAnalytics Unity Plugin is already installed

 using AdaptySDK;

 Firebase.Analytics
   .FirebaseAnalytics
   .GetAnalyticsInstanceIdAsync()
   .ContinueWithOnMainThread((task) => {
     if (!task.IsCompletedSuccessfully) {
       // handle error
       return;
     }

     var firebaseId = task.Result
     var builder = new Adapty.ProfileParameters.Builder();
     
-    builder.SetFirebaseAppInstanceId(firebaseId);
-
-    Adapty.UpdateProfile(builder.Build(), (error) => {
-        // handle error
   
+     Adapty.SetIntegrationIdentifier(
+       "firebase_app_instance_id", 
+       firebaseId, 
+       (error) => {
+         // handle the error
     });
   });

Mixpanel

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Mixpanel インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;

- var builder = new Adapty.ProfileParameters.Builder();
- builder.SetMixpanelUserId(Mixpanel.DistinctId);

- Adapty.UpdateProfile(builder.Build(), (error) => {
-     // handle error
- });

+ var distinctId = Mixpanel.DistinctId;

+ if (distinctId != null) {
+   Adapty.SetIntegrationIdentifier(
+     "mixpanel_user_id", 
+     distinctId, 
+     (error) => {
+       // handle the error
+   });
+ }

OneSignal

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€OneSignal インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;

- using OneSignalSDK;

- var pushUserId = OneSignal.Default.PushSubscriptionState.userId;

- var builder = new Adapty.ProfileParameters.Builder();
- builder.SetOneSignalPlayerId(pushUserId);

- Adapty.UpdateProfile(builder.Build(), (error) => {
-     // handle error
- });

+ var distinctId = Mixpanel.DistinctId;

+ if (distinctId != null) {
+   Adapty.SetIntegrationIdentifier(
+     "mixpanel_user_id", 
+     distinctId, 
+     (error) => {
+       // handle the error
+   });
+ }

Pushwoosh

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Pushwoosh インテグレーション㮠SDK 設定 ã‚’å‚ç…§ã—ã¦ãã ã•ã„。

using AdaptySDK;

- var builder = new Adapty.ProfileParameters.Builder();
- builder.SetPushwooshHWID(Pushwoosh.Instance.HWID);

- Adapty.UpdateProfile(builder.Build(), (error) => {
-     // handle error
- });

+ Adapty.SetIntegrationIdentifier(
+   "pushwoosh_hwid", 
+   Pushwoosh.Instance.HWID, 
+   (error) => {
+   // handle the error
+ });

Observer モードã®å®Ÿè£…ã‚’æ›´æ–°ã™ã‚‹

ペイウォールã¨ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ç´ä»˜ã‘方法を更新ã—ã¦ãã ã•ã„。以å‰ã¯ setVariationId メソッドを使用ã—㦠variationId を割り当ã¦ã¦ã„ã¾ã—ãŸã€‚ç¾åœ¨ã¯ã€æ–°ã—ã„ reportTransaction メソッドを使用ã—ã¦ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’記録ã™ã‚‹éš›ã« variationId を直接å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚最終的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã¯ Observer モードã§è³¼å…¥ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã«ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚’ç´ä»˜ã‘ã‚‹ ページをå‚ç…§ã—ã¦ãã ã•ã„。

 // every time when calling transaction.finish()
- Adapty.SetVariationForTransaction("<variationId>", "<transactionId>", (error) => { 
-     if(error != null) {
-         // handle the error
-         return;
-     }
-
-     // successful binding
- });

+ Adapty.ReportTransaction(
+   "YOUR_TRANSACTION_ID", 
+   "PAYWALL_VARIATION_ID", // optional
+   (error) => {
+   // handle the error
+ });

Unity プラグインã®åˆæœŸåŒ–ã‚’æ›´æ–°ã™ã‚‹

Adapty Unity SDK 3.3.0 以é™ã€ãƒ—ラグインã®åˆæœŸåŒ–時㫠Activate メソッドを明示的ã«å‘¼ã³å‡ºã™ã“ã¨ãŒå¿…é ˆã«ãªã‚Šã¾ã—ãŸã€‚

Adapty.Activate(builder.Build(), (error) => {
   if (error != null) {
       // handle the error
       return;
   }
});
ÿÿÿÿ