source 'https://cdn.cocoapods.org'
source 'https://github.com/OpenVesselIO/Wallet-Pods-iOS.git'
â‹®
target '<YOUR PROJECT>' do
pod 'OpenVesselSDK', '~> 1.17.1'
end
AppLovin recommends that you test your integration in the staging environment. Before you release your project, make sure to change your release version so that it points to production instead. You can point your project to the staging environment with code like the following:
You can render your Vessel Game Store, Collection, and Token page within your application in a WebView using the following code below:
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
OVSdk.Sdk.WalletPresenter.ShowGame(fqgn);
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
OVSdk.Sdk.WalletPresenter.ShowCollection(fqcn);
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
OVSdk.Sdk.WalletPresenter.ShowToken(fqtn);
final VesselSdk sdk = VesselSdk.getInstance( currentActivity );
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
sdk.getWalletPresenter().showGame( fqgn, currentActivity );
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
sdk.getWalletPresenter().showCollection( fqcn, currentActivity );
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
sdk.getWalletPresenter().showToken( fqtn, currentActivity );
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
[[[OVLSdk sharedInstance] presentationController] presentGame:fqgn fromViewController:viewController animated:YES];
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
[[[OVLSdk sharedInstance] presentationController] presentCollection:fqcn fromViewController:viewController animated:YES];
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
[[[OVLSdk sharedInstance] presentationController] presentToken:fqtn fromViewController:viewController animated:YES];
Callbacks for opening/closing the WebView
OVSdk.WalletPresenterCallbacks.OnWalletShow += HandleWalletShow;
OVSdk.WalletPresenterCallbacks.OnWalletDismiss += HandleWalletDismiss;
private void HandleWalletShow()
{
// a wallet is about to present
}
private void HandleWalletDismiss()
{
// a wallet is about to dismiss
}
VesselSdkImpl.getInstance( activity )
.getWalletPresenter()
.setListener( listener );
// Listener definition
@Override
public void onWalletShow()
{
// a wallet is about to present
}
@Override
public void onWalletDismiss()
{
// a wallet is about to dismiss
}
OVLSdk.sharedInstance.presentationController.delegate = delegate;
// Delegate definition
- (void)presentationControllerWillPresentWallet:(OVLPresentationController *)presentationController
{
// a wallet is about to present
}
- (void)presentationControllerWillDismissWallet:(OVLPresentationController *)presentationController
{
// a wallet is about to dismiss
}
Show the Wallet/Game/Collection/Token Page in the Vessel application
You can render your Vessel Wallet, Game, Collection, and Token page directly in the Vessel application. If the Vessel application is not installed on the device, you will be offered with installing it from the store page.
// Show the wallet info
OVSdk.Sdk.WalletPresenter.OpenWalletApplication();
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
OVSdk.Sdk.WalletPresenter.OpenGameInWalletApplication(fqgn);
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
OVSdk.Sdk.WalletPresenter.OpenCollectionInWalletApplication(fqcn);
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
OVSdk.Sdk.WalletPresenter.OpenTokenInWalletApplication(fqtn);
final VesselSdk sdk = VesselSdk.getInstance(currentActivity);
// Show the wallet level info
sdk.getWalletPresenter().openWalletApplication(currentActivity);
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
sdk.getWalletPresenter().openGameInWalletApplication(fqgn, currentActivity);
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
sdk.getWalletPresenter().openCollectionInWalletApplication(fqcn, currentActivity);
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
sdk.getWalletPresenter().openTokenInWalletApplication(fqtn, currentActivity);
// Show the wallet info
[[[OVLSdk sharedInstance] presentationController] openWalletApplication];
// Show the game level info
// fqgn: Fully Qualified Game Name ("com.studio.game")
[[[OVLSdk sharedInstance] presentationController] openGameInWalletApplication:fqgn];
// Show the collection level info
// fqcn: Fully Qualified Collection Name ("com.studio.game.collection")
[[[OVLSdk sharedInstance] presentationController] openCollectionInWalletApplication:fqcn];
// Show the token level info
// fqtn: Fully Qualified Token Name ("com.studio.game.collection.token")
[[[OVLSdk sharedInstance] presentationController] openTokenInWalletApplication:fqtn];
Confirm the transaction
You can confirm the transaction detail in the Vessel wallet app.