オープンソースのSDKで、React Native のインアプリ購入を統合します。

30分でインアプリ購入を実装します。

React Nativeのアプリ内購入のための即戦力バックエンド

アプリ内購入を統合するには、サブスクリプションイベントのためのバックエンドインフラストラクチャとサーバーを作成する必要があります。 これには何百時間もの作業がかかり、維持が難しくなることがあります。
import StoreKit
class Store: ObservableObject {
    private var productIDs = ["stone"]
    @Published var products = [Product]()
    init() {
        Task {
            await requestProducts()
        }
    }  
    @MainActor
    func requestProducts() async {
        do {
            products = try await Product.products(for: productIDs)
        } catch {
            print(error)
    }
  }
}
Section(header: Text("To buy")) {
 }
ForEach(store.products, id: .id) {
  product in
    HStack {
      Text(product.displayName)
      Spacer()
      Button("(product.displayPrice)") {
    }
  }
}
@Published var purchasedNonConsumables = [Product]()
@MainActor
func purchase(_ product: Product) async throws -> Transaction ? {
  let result =
    try await product.purchase()
  switch result {
    case .success(.verified(let transaction)):
      purchasedNonConsumables.append(product)
      await transaction.finish()
      return transaction
    default:
      return nil
  }
}
Button("(product.displayPrice)") {
 Task {
  try await store.purchase(product)
  }
}
ProductView(
 icon: "❀",
 quantity: "(store.purchasedNonConsumables.count)"
 )
 func listenForTransactions() -> Task < Void, Error > {
  return Task.detached {
    for await result in Transaction.updates {
      switch result {
        case let.verified(transaction):
          guard
          let product = self.products.first(where: {
            $0.id == transaction.productID
          })
          else {
            continue
          }
          self.purchasedNonConsumables.append(product)
          await transaction.finish()
        default:
          continue
      }
    }
  }
}
var transacitonListener: Task<Void, Error>?
init() {
   transacitonListener = listenForTransactions()
   Task {
     await requestProducts()
 }
}
@MainActor
private func handle(transactionVerification result: VerificationResult <Transaction> ) async {
  switch result {
    case let.verified(transaction):
      guard
      let product = self.products.first(where: {
        $0.id == transaction.productID
      })
      else {
        return
      }
      self.purchasedNonConsumables.insert(product)
      await transaction.finish()
    default:
      return
  }
}
Adapty SDKを使用すると、iOSアプリにアプリ内サブスクリプションを統合できる、用意されたインフラストラクチャすべてのサブスクリプションイベントを処理し、収益を増やす機能を提供します。
import { adapty } from 'react-native-adapty';
await adapty.activate('YOUR_APP_KEY');
 
// Make a purchase, Adapty handles the rest
try {
	const profile = await adapty.makePurchase(product);
	// successful purchase
} catch (error) {
	// handle the error
}
統合からメンテナンスまで、AdaptyはIAPとの作業を簡素化するために作られています。
デモをリクエスト

なぜAdapty SDKを選ぶのか?

いつでも正しいサブスクリプション状態

すべてのプラットフォームで常に正しい購読者の状態を取得できることを保証します。

サーバーサイドの領収書検証

購入検証の正確性と安全性について心配する必要はありません。

あらゆる種類のサブスクリプション状態の取り扱い

無料トライアル、アップグレード、プロモーションオファー、ファミリーシェアリング、更新など。

エンタープライズ対応のプラットフォームで短いリリースサイクル

>99.99%のSLA信頼性と定期的な製品更新。
プラットフォームの設定
Adapty SDKのインストール
Adapty.activate(
   "PUBLIC_SDK_KEY",
   customerUserId: "YOUR_USER_ID"
)
購入イベントの処理

迅速で簡単な統合

iOSアプリにAdapty SDKを統合するのにわずか数時間で済み、残りは私たちが対応します。

アプリ内購入のために実装すべきSDKメソッドはたったの5つです。

// Your app's code
try {
   const profile = await adapty.makePurchase(product);
   const isSubscribed = profile?.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;
 
	if (isSubscribed) {
		// grant access to features in accordance with access level
	}
} catch (error) {
	// handle the error
}
// Your app's code
try {
   const profile = await adapty.restorePurchases();
   const isSubscribed = profile.accessLevels['YOUR_ACCESS_LEVEL']?.isActive;
 
	if (isSubscribed) {
		// restore access
	}
} catch (error) {
	// handle the error
}
// Your app's code
try {
    await adapty.identify("YOUR_USER_ID");
    // successfully identified
} catch (error) {
    // handle the error
}
 
&nbsp
&nbsp
&nbsp
// Your app's code
try {
    await adapty.updateProfile(params);
} catch (error) {
    // handle `AdaptyError`
}
 
 
 
 
 
import { adapty, AttributionSource } from 'react-native-adapty';
import appsFlyer from 'react-native-appsflyer';
 
appsFlyer.onInstallConversionData(installData => {
	try {
		// It's important to include the network user ID
		const networkUserId = appsFlyer.getAppsFlyerUID();
		adapty.updateAttribution(installData, AttributionSource.AppsFlyer, networkUserId);
	} catch (error) {
		// handle error
	}
});
 
// ...
appsFlyer.initSdk(/*...*/);
無料で試す

さまざまな業種の人々が収益を増やすために Adapty に頼っています

Adaptyで何が得られますか?

Adapty SDKはアプリの収益を増やすための膨大な可能性を提供します。

あなたのReact Nativeアプリのリアルタイム分析

App Store Connectで99.5%の正確さを確信してデータに依存してください。
始める
App Icon Gravity
Gravity Fit
健康 & フィットネス
「透明で高度な分析ダッシュボードがあるおかげで、追加のツールを使わずに迅速に意思決定ができます。多くの時間、したがってお金を節約できます。」
エカテリーナ・K、
Gravity FitのPM
Accuracy Adapty Appstore
ABC testing

ペイウォールA/Bテスト

最も収益性の高いペイウォールを見つけ、アプリの収益を増やしましょう。
A/Bテストを探索
MentalGrowth
MentalGrowth
健康 & ウェルネスアプリ
「Adaptyの迅速な分析と簡単に起動できるA/Bテスト機能により、仮説を迅速に検証し、素晴らしい結果を得ることができました。」
ヴァディム・ネムチェンコ、
MentalGrowthのプロダクトマネージャー

ペイウォールのリモート設定

アプリを再リリースせずに遠隔でペイウォールを変更することができます。
今すぐ試す
Smitten
Smitten - デーティング
ライフスタイル
「私たちの成長と収益チームは、迅速にペイウォール、商品オファーを導入し、さまざまな市場で価格 tiersをテストすることができます。」
カイル・スミス、
Smitten Datingのデータ責任者
Table Json Table Locale

使いやすさとカスタマーサービスで信頼

500件以上のレビューに基づく
G2 Award: Leader (EMEA), winter 2025
G2 Award: Leader (EMEA), winter 2025
G2 Award: Leader (EMEA), winter 2025
G2 Award: Leader (EMEA), winter 2025
G2 Award: Leader (EMEA), winter 2025

他のプラットフォーム用のSDKを探していますか?