iOS SDK
Introduction:
If you want to integrate our service into your iOS app, you can use the iOS SDK provided here.
Usage Instructions
Step 1: Import the SDK
Download the SDK by adding the following repository to Swift Package Manager: https://github.com/Alchemy-Pay/RampPaySdk-ios
Step 2: Initialize
import RampPaySdk
let config = RampPaySdkConfig(
debug: true, // true or false
environment: RampPayEnvironment.sandbox, // Sandbox or Production
params: nil // Concatenated URL parameters
)
let rampPaySdk = RampPaySdk(config: config)
rampPaySdk.show(mode: RampPayRenderingOption.webviewoverlay) // WebViewOverlay or InAppBrowser
- The
environment
configuration specifies whether to use the sandbox or production environment. - The
params
need to include the complete concatenated URL parameters, Click Here For Details
for example:appId=f83Is2y7L425rxl8&crypto=USDT&network=ETH&showTable=buy&fiat=USD&fiatAmount=30×tamp=1538054050234&sign=JY9JcOwBosncT19Nn9DIfTH%2BvfSt6xL%2BI%2BRVCl9YGgE%3D
. rampWebView.show
has two configuration modes: WebViewOverlay and InAppBrowser.
Difference between WebViewOverlay and InAppBrowser
InAppBrowser: Allows you to use native features such as Google Pay, social logins, and pop-ups.
WebViewOverlay: Allows you to use a communication layer between the widget and your application, enabling specific actions in your app when certain events occur in the widget.
Updated 4 months ago