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

Adapty React Native SDK ã‚’ v3.3 ã«ç§»è¡Œã™ã‚‹

Adapty SDK 3.3.1 ã¯ãƒ¡ã‚¸ãƒ£ãƒ¼ãƒªãƒªãƒ¼ã‚¹ã§ã‚りã€ã„ãã¤ã‹ã®æ”¹å–„ãŒåŠ ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚移行作業ãŒå¿…è¦ãªå ´åˆãŒã‚りã¾ã™ã€‚

  1. Adapty SDK v3.3.x ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã€‚
  2. モデルを更新ã™ã‚‹ã€‚
  3. getProductsIntroductoryOfferEligibility メソッドを削除ã™ã‚‹ã€‚
  4. 購入処ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  5. ペイウォールビルダーã®ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«è¡¨ç¤ºã‚’æ›´æ–°ã™ã‚‹ã€‚
  6. 開発者定義タイマーã®å®Ÿè£…を修正ã™ã‚‹ã€‚
  7. ペイウォールビルダーã®è³¼å…¥ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  8. ペイウォールビルダーã®ã‚«ã‚¹ã‚¿ãƒ ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆå‡¦ç†ã‚’æ›´æ–°ã™ã‚‹ã€‚
  9. onProductSelected コールãƒãƒƒã‚¯ã‚’修正ã™ã‚‹ã€‚
  10. updateProfile メソッドã‹ã‚‰ã‚µãƒ¼ãƒ‰ãƒ‘ーティ連æºãƒ‘ラメーターを削除ã™ã‚‹ã€‚
  11. Adjustã€AirBridgeã€Amplitudeã€AppMetricaã€Appsflyerã€Branchã€Facebook Adsã€Firebase 㨠Google Analyticsã€Mixpanelã€OneSignalã€Pushwoosh ã®é€£æºè¨­å®šã‚’æ›´æ–°ã™ã‚‹ã€‚
  12. オブザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã®å®Ÿè£…ã‚’æ›´æ–°ã™ã‚‹ã€‚

Adapty React Native SDK ã‚’ 3.3.x ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹

ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 よりå‰ã¯ã€react-native-adapty SDK ãŒã‚¢ãƒ—リ㧠Adapty ã‚’æ­£ã—ã動作ã•ã›ã‚‹ãŸã‚ã®ã‚³ã‚¢ã‹ã¤å¿…須㮠SDK ã§ã—ãŸã€‚@adapty/react-native-ui SDK ã¯ã‚ªãƒ—ションã§ã‚りã€Adapty ペイウォールビルダーを使用ã™ã‚‹å ´åˆã«ã®ã¿å¿…è¦ã§ã—ãŸã€‚

ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 以é™ã€@adapty/react-native-ui SDK ã¯éžæŽ¨å¥¨ã¨ãªã‚Šã€ãã®æ©Ÿèƒ½ã¯ react-native-adapty SDK ã«çµ±åˆã•れã¾ã—ãŸã€‚ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 ã«ã‚¢ãƒƒãƒ—グレードã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„。

  1. react-native-adapty パッケージをãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 ã«æ›´æ–°ã™ã‚‹ã€‚
  2. プロジェクトã®ä¾å­˜é–¢ä¿‚ã‹ã‚‰ @adapty/react-native-ui パッケージを削除ã™ã‚‹ã€‚
  3. プロジェクトã®ä¾å­˜é–¢ä¿‚ã‚’åŒæœŸã—ã¦å¤‰æ›´ã‚’é©ç”¨ã™ã‚‹ã€‚

モデルã®å¤‰æ›´ç‚¹

æ–°ã—ã„モデル

  1. AdaptySubscriptionOffer:

    export interface AdaptySubscriptionOffer {
      readonly identifier: AdaptySubscriptionOfferId;
    
      phases: AdaptyDiscountPhase[];
    
      android?: {
        offerTags?: string[];
      };
    }
  2. AdaptySubscriptionOfferId:

    export type AdaptySubscriptionOfferId =
      | { id?: string; type: 'introductory'; }
      | { id: string; type: 'promotional' | 'win_back'; };

変更ã•れãŸãƒ¢ãƒ‡ãƒ«

  1. AdaptyPaywallProduct:

    • subscriptionDetails プロパティを subscription ã«åå‰å¤‰æ›´ã—ã¾ã—ãŸã€‚

    -  subscriptionDetails?: AdaptySubscriptionDetails; 
    +  subscription?: AdaptySubscriptionDetails;
  2. AdaptySubscriptionDetails:

    • promotionalOffer ã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚プロモーションオファーã¯ã€åˆ©ç”¨å¯èƒ½ãªå ´åˆã«ã®ã¿ offer ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£çµŒç”±ã§æä¾›ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚ã“ã®å ´åˆã€offer?.identifier?.type 㯠'promotional' ã«ãªã‚Šã¾ã™ã€‚

    • introductoryOfferEligibility ã¯å‰Šé™¤ã•れã¾ã—ãŸï¼ˆã‚ªãƒ•ァーã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã®å ´åˆã®ã¿è¿”ã•れã¾ã™ï¼‰ã€‚

    • offerId ã¯å‰Šé™¤ã•れã¾ã—ãŸã€‚オファー ID 㯠AdaptySubscriptionOffer.identifier ã«æ ¼ç´ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚

    • offerTags 㯠AdaptySubscriptionOffer.android ã«ç§»å‹•ã•れã¾ã—ãŸã€‚

    -  introductoryOffers?: AdaptyDiscountPhase[];
    +  offer?: AdaptySubscriptionOffer;
    
       ios?: {
    -    promotionalOffer?: AdaptyDiscountPhase;
         subscriptionGroupIdentifier?: string;
       };
    
       android?: {
    -    offerId?: string;
         basePlanId: string;
    -    introductoryOfferEligibility: OfferEligibility;
    -    offerTags?: string[];
         renewalType?: 'prepaid' | 'autorenewable';
       };
     }
  3. AdaptyDiscountPhase:

    • identifier フィールド㌠AdaptyDiscountPhase モデルã‹ã‚‰å‰Šé™¤ã•れã¾ã—ãŸã€‚オファー識別å­ã¯ AdaptySubscriptionOffer.identifier ã«æ ¼ç´ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚

    -  ios?: {
    -    readonly identifier?: string;
    -  };

削除ã•れãŸãƒ¢ãƒ‡ãƒ«

  1. AttributionSource:
    • AttributionSource ãŒä»¥å‰ä½¿ç”¨ã•れã¦ã„ãŸç®‡æ‰€ã§ã¯ã€æ–‡å­—列ãŒä½¿ç”¨ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚
  2. OfferEligibility:
    • ã“ã®ãƒ¢ãƒ‡ãƒ«ã¯ä¸è¦ã«ãªã£ãŸãŸã‚削除ã•れã¾ã—ãŸã€‚オファーã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã®å ´åˆã«ã®ã¿è¿”ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚

getProductsIntroductoryOfferEligibility メソッドを削除ã™ã‚‹

Adapty SDK 3.3.1 よりå‰ã¯ã€ãƒ—ロダクトオブジェクトã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡å¤–ã§ã‚ã£ã¦ã‚‚オファーãŒå¸¸ã«å«ã¾ã‚Œã¦ã„ã¾ã—ãŸã€‚ãã®ãŸã‚ã€ã‚ªãƒ•ァーを使用ã™ã‚‹å‰ã«æ‰‹å‹•ã§å¯¾è±¡è³‡æ ¼ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚りã¾ã—ãŸã€‚

ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 以é™ã€ãƒ—ロダクトオブジェクトã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã®å ´åˆã«ã®ã¿ã‚ªãƒ•ァーãŒå«ã¾ã‚Œã¾ã™ã€‚ã“れã«ã‚ˆã‚Šã€ã‚ªãƒ•ァーãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå¯¾è±¡ã§ã‚ã‚‹ã¨ä»®å®šã§ãã‚‹ãŸã‚ã€å‡¦ç†ãŒç°¡ç´ åŒ–ã•れã¾ã™ã€‚

購入処ç†ã‚’æ›´æ–°ã™ã‚‹

以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れãŸè³¼å…¥ã¨ä¿ç•™ä¸­ã®è³¼å…¥ã¯ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦æ‰±ã‚れã€ãれãžã‚Œã‚³ãƒ¼ãƒ‰ 2: 'paymentCancelled' 㨠25: 'pendingPurchase' ãŒè¿”ã•れã¦ã„ã¾ã—ãŸã€‚

ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 3.3.1 以é™ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れãŸè³¼å…¥ã¨ä¿ç•™ä¸­ã®è³¼å…¥ã¯æˆåŠŸã—ãŸçµæžœã¨ã—ã¦æ‰±ã‚れã€ãれã«å¿œã˜ã¦å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚

try {
    const purchaseResult = await adapty.makePurchase(product);
    switch (purchaseResult.type) {
      case 'success':
        const isSubscribed = purchaseResult.profile?.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;

        if (isSubscribed) {
          // Grant access to the paid features
        }
        break;
      case 'user_cancelled':
        // Handle the case where the user canceled the purchase
        break;
      case 'pending':
        // Handle deferred purchases (e.g., the user will pay offline with cash)
        break;
    }
} catch (error) {
    // Handle the error
}

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

æ›´æ–°ã•れãŸã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€React Native ã§ã®ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ãƒ“ルダーペイウォールã®è¡¨ç¤ºãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ã”å‚ç…§ãã ã•ã„。

- import { createPaywallView } from '@adapty/react-native-ui';
+ import { createPaywallView } from 'react-native-adapty/dist/ui';

const view = await createPaywallView(paywall);

view.registerEventHandlers(); // handle close press, etc

try {
  await view.present();
} catch (error) {
  // handle the error
}

開発者定義タイマーã®å®Ÿè£…ã‚’æ›´æ–°ã™ã‚‹

timerInfo パラメーターを customTimers ã«åå‰å¤‰æ›´ã—ã¦ãã ã•ã„。

- let timerInfo = { 'CUSTOM_TIMER_NY': new Date(2025, 0, 1) }
+ let customTimers = { 'CUSTOM_TIMER_NY': new Date(2025, 0, 1) }
 //and then you can pass it to createPaywallView as follows:
- view = await createPaywallView(paywall, { timerInfo })
+ view = await createPaywallView(paywall, { customTimers })

ペイウォールビルダーã®è³¼å…¥ã‚¤ãƒ™ãƒ³ãƒˆã‚’修正ã™ã‚‹

以å‰ã®å‹•作:

  • キャンセルã•れãŸè³¼å…¥ã¯ onPurchaseCancelled コールãƒãƒƒã‚¯ã‚’トリガーã—ã¦ã„ã¾ã—ãŸã€‚
  • ä¿ç•™ä¸­ã®è³¼å…¥ã¯ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ 25: 'pendingPurchase' ã‚’è¿”ã—ã¦ã„ã¾ã—ãŸã€‚

ç¾åœ¨ã®å‹•作:

  • 両方ã¨ã‚‚ onPurchaseCompleted コールãƒãƒƒã‚¯ã§å‡¦ç†ã•れã¾ã™ã€‚

移行手順:

  1. onPurchaseCancelled コールãƒãƒƒã‚¯ã‚’削除ã™ã‚‹ã€‚
  2. 25: 'pendingPurchase' ã®ã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰å‡¦ç†ã‚’削除ã™ã‚‹ã€‚
  3. onPurchaseCompleted コールãƒãƒƒã‚¯ã‚’æ›´æ–°ã™ã‚‹ã€‚

const view = await createPaywallView(paywall);

const unsubscribe = view.registerEventHandlers({
  // ... other optional callbacks
  onPurchaseCompleted(purchaseResult, product) {
    switch (purchaseResult.type) {
      case 'success':
        const isSubscribed = purchaseResult.profile?.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;

        if (isSubscribed) {
          // Grant access to the paid features
        }
        break;
      case 'user_cancelled':
        // Handle the case where the user canceled the purchase
        break;
      case 'pending':
        // Handle deferred purchases (e.g., the user will pay offline with cash)
        break;
    }
    return purchaseResult.type !== 'user_cancelled';
  },
});

ペイウォールビルダーã®ã‚«ã‚¹ã‚¿ãƒ ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’修正ã™ã‚‹

削除ã•れãŸã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ï¼š

  • onAction
  • onCustomEvent

追加ã•れãŸã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ï¼š

  • æ–°ã—ã„ onCustomAction(actionId) コールãƒãƒƒã‚¯ã€‚カスタムアクションã«ä½¿ç”¨ã—ã¦ãã ã•ã„。

onProductSelected コールãƒãƒƒã‚¯ã‚’修正ã™ã‚‹

以å‰ã¯ã€onProductSelected 㯠product オブジェクトを必è¦ã¨ã—ã¦ã„ã¾ã—ãŸã€‚ç¾åœ¨ã¯æ–‡å­—列ã¨ã—㦠productId ã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚

updateProfile メソッドã‹ã‚‰ã‚µãƒ¼ãƒ‰ãƒ‘ーティ連æºãƒ‘ラメーターを削除ã™ã‚‹

サードパーティ連æºã®è­˜åˆ¥å­ã¯ã€setIntegrationIdentifier メソッドを使用ã—ã¦è¨­å®šã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã—ãŸã€‚updateProfile メソッドã¯ã“れらをå—ã‘付ã‘ãªããªã‚Šã¾ã—ãŸã€‚

ã‚µãƒ¼ãƒ‰ãƒ‘ãƒ¼ãƒ†ã‚£é€£æº SDK ã®è¨­å®šã‚’æ›´æ–°ã™ã‚‹

Adapty React Native SDK 3.3.1 以é™ã§é€£æºãŒæ­£ã—ãæ©Ÿèƒ½ã™ã‚‹ã‚ˆã†ã€ä»¥ä¸‹ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§èª¬æ˜Žã™ã‚‹å„連æºã® SDK 設定を更新ã—ã¦ãã ã•ã„。

ã¾ãŸã€ã‚¢ãƒˆãƒªãƒ“ューション識別å­ã®å–å¾—ã« AttributionSource を使用ã—ã¦ã„ãŸå ´åˆã¯ã€å¿…è¦ãªè­˜åˆ¥å­ã‚’文字列ã¨ã—ã¦æä¾›ã™ã‚‹ã‚ˆã†ã«ã‚³ãƒ¼ãƒ‰ã‚’変更ã—ã¦ãã ã•ã„。

Adjust

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Adjust 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { Adjust, AdjustConfig } from "react-native-adjust";
 import { adapty } from "react-native-adapty";

 var adjustConfig = new AdjustConfig(appToken, environment);

 // Before submiting Adjust config...
 adjustConfig.setAttributionCallbackListener(attribution => {
   // Make sure Adapty SDK is activated at this point
   // You may want to lock this thread awaiting of `activate`
   adapty.updateAttribution(attribution, "adjust");
 });

 // ...
 Adjust.create(adjustConfig);

+ Adjust.getAdid((adid) => {
+   if (adid)
+     adapty.setIntegrationIdentifier("adjust_device_id", adid);
+ });

AirBridge

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€AirBridge 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import Airbridge from 'airbridge-react-native-sdk';
 import { adapty } from 'react-native-adapty';

 try {
   const deviceId = await Airbridge.state.deviceUUID();

-  await adapty.updateProfile({
-    airbridgeDeviceId: deviceId,
-  });
+  await adapty.setIntegrationIdentifier("airbridge_device_id", deviceId);
 } catch (error) {
   // handle `AdaptyError`
 }

Amplitude

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Amplitude 連æºã® SDK 設定をã”確èªãã ã•ã„。

  import { adapty } from 'react-native-adapty';

 try {
-   await adapty.updateProfile({
-     amplitudeDeviceId: deviceId,
-     amplitudeUserId: userId,
-   });
+   await adapty.setIntegrationIdentifier("amplitude_device_id", deviceId);
+   await adapty.setIntegrationIdentifier("amplitude_user_id", userId);
 } catch (error) {
   // handle `AdaptyError`
 }

AppMetrica

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€AppMetrica 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty } from 'react-native-adapty';
 import AppMetrica, { DEVICE_ID_KEY, StartupParams, StartupParamsReason } from '@appmetrica/react-native-analytics';

 // ...
 const startupParamsCallback = async (
   params?: StartupParams,
   reason?: StartupParamsReason
 ) => {
   const deviceId = params?.deviceId
   if (deviceId) {
     try {
-       await adapty.updateProfile({
-         appmetricaProfileId: 'YOUR_ADAPTY_CUSTOMER_USER_ID',
-         appmetricaDeviceId: deviceId,
-       });
+       await adapty.setIntegrationIdentifier("appmetrica_profile_id", 'YOUR_ADAPTY_CUSTOMER_USER_ID');
+       await adapty.setIntegrationIdentifier("appmetrica_device_id", deviceId);
     } catch (error) {
       // handle `AdaptyError`
     }
   }
 }

 AppMetrica.requestStartupParams(startupParamsCallback, [DEVICE_ID_KEY])

AppsFlyer

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€AppsFlyer 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty, AttributionSource } from 'react-native-adapty';
 import appsFlyer from 'react-native-appsflyer';

 appsFlyer.onInstallConversionData(installData => {
     try {
-        const networkUserId = appsFlyer.getAppsFlyerUID();
-        adapty.updateAttribution(installData, AttributionSource.AppsFlyer, networkUserId);
+        const uid = appsFlyer.getAppsFlyerUID();
+        adapty.setIntegrationIdentifier("appsflyer_id", uid);
+        adapty.updateAttribution(installData, "appsflyer");
     } catch (error) {
         // handle the error
     }
 });

 // ...
 appsFlyer.initSdk(/*...*/);

Branch

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Branch 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty, AttributionSource } from 'react-native-adapty';
 import branch from 'react-native-branch';

 branch.subscribe({
   enComplete: ({
     params,
   }) => {
-    adapty.updateAttribution(params, AttributionSource.Branch);
+    adapty.updateAttribution(params, "branch");
   },
 });

Facebook Ads

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Facebook Ads 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty } from 'react-native-adapty';
 import { AppEventsLogger } from 'react-native-fbsdk-next';

 try {
   const anonymousId = await AppEventsLogger.getAnonymousID();

-  await adapty.updateProfile({
-    facebookAnonymousId: anonymousId,
-  });
+  await adapty.setIntegrationIdentifier("facebook_anonymous_id", anonymousId);
 } catch (error) {
   // handle `AdaptyError`
 }

Firebase 㨠Google Analytics

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Firebase 㨠Google Analytics 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import analytics from '@react-native-firebase/analytics';
 import { adapty } from 'react-native-adapty';

 try {
   const appInstanceId = await analytics().getAppInstanceId();

-   await adapty.updateProfile({
-     firebaseAppInstanceId: appInstanceId,
-   });
+   await adapty.setIntegrationIdentifier("firebase_app_instance_id", appInstanceId);
 } catch (error) {
   // handle `AdaptyError`
 }

Mixpanel

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Mixpanel 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty } from 'react-native-adapty';
 import { Mixpanel } from 'mixpanel-react-native';

 // ...
 try {
-   await adapty.updateProfile({
-     mixpanelUserId: mixpanelUserId,
-   });
+   await adapty.setIntegrationIdentifier("mixpanel_user_id", mixpanelUserId);
 } catch (error) {
   // handle `AdaptyError`
 }

OneSignal

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€OneSignal 連æºã® SDK 設定をã”確èªãã ã•ã„。

Pushwoosh

以下ã®ã‚ˆã†ã«ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リã®ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。完全ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€Pushwoosh 連æºã® SDK 設定をã”確èªãã ã•ã„。

 import { adapty } from 'react-native-adapty';
 import Pushwoosh from 'pushwoosh-react-native-plugin';

 // ...
 try {
-  await adapty.updateProfile({
-    pushwooshHWID: hwid,
-  });
+  await adapty.setIntegrationIdentifier("pushwoosh_hwid", hwid);
 } catch (error) {
   // handle `AdaptyError`
 }

オブザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã®å®Ÿè£…ã‚’æ›´æ–°ã™ã‚‹

ペイウォールã¨ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒªãƒ³ã‚¯æ–¹æ³•ã‚’æ›´æ–°ã—ã¦ãã ã•ã„。以å‰ã¯ setVariationId メソッドを使用ã—㦠variationId を割り当ã¦ã¦ã„ã¾ã—ãŸã€‚ç¾åœ¨ã¯ã€æ–°ã—ã„ reportTransaction メソッドを使用ã—ã¦ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’記録ã™ã‚‹éš›ã« variationId を直接å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚最終的ãªã‚³ãƒ¼ãƒ‰ä¾‹ã«ã¤ã„ã¦ã¯ã€ã‚ªãƒ–ザーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã§ãƒšã‚¤ã‚¦ã‚©ãƒ¼ãƒ«ã‚’購入トランザクションã«é–¢é€£ä»˜ã‘ã‚‹ã‚’ã”確èªãã ã•ã„。

reportTransaction メソッドを使用ã—ã¦ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’記録ã™ã‚‹ã“ã¨ã‚’忘れãªã„ã§ãã ã•ã„。ã“ã®æ‰‹é †ã‚’スキップã™ã‚‹ã¨ã€Adapty ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’èªè­˜ã§ããšã€ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã®ä»˜ä¸Žã€ã‚¢ãƒŠãƒªãƒ†ã‚£ã‚¯ã‚¹ã¸ã®å映ã€é€£æºã¸ã®ãƒ‡ãƒ¼ã‚¿é€ä¿¡ãŒè¡Œã‚れã¾ã›ã‚“。ã“ã®æ‰‹é †ã¯å¿…é ˆã§ã™ï¼

reportTransaction メソッドã®ãƒ‘ラメーターã®é †åºã¯ setVariationId メソッドã®é †åºã¨ç•°ãªã‚‹ã“ã¨ã«ã”注æ„ãã ã•ã„。

  const variationId = paywall.variationId;

 try {
-    await adapty.setVariationId(variationId, transactionId);
+    await adapty.reportTransaction(transactionId, variationId);
 } catch (error) {
     // handle the `AdaptyError`
 }
  • Adapty ペイウォールビルダー(レガシー)
  • プラットフォーム
    ÿÿÿÿ