Documentation Index
Fetch the complete documentation index at: https://docs.velocity.io/llms.txt
Use this file to discover all available pages before exploring further.
- iOS
- Android
- Flutter
- Web
Install the SDK
In Xcode, go to File → Add Package Dependencies and enter:
https://github.com/velocityiodev/velocityads-ios-sdk
Initialize
In your
AppDelegate or app entry point:import VelocityAds
let request = VelocityAdsInitRequest.Builder("YOUR_APP_KEY").build()
VelocityAds.initSDK(request, delegate: self)
Load and display an ad
let adRequest = VelocityNativeAdViewRequest.Builder(adViewSize: .M)
.withPrompt("User's message here")
.withAIResponse("AI response here")
.build()
let nativeAd = VelocityNativeAd(adRequest)
nativeAd.loadAd(delegate: self)
// In onAdLoaded:
func onAdLoaded(nativeAd: VelocityNativeAd) {
if let adView = nativeAd.createAdView() {
adContainer.addSubview(adView)
}
}
Install the SDK
Add to your
build.gradle:dependencies {
implementation 'io.velocity:ads-sdk:0.4.1'
}
Initialize
In your
Application.onCreate():val request = VelocityAdsInitRequest.Builder("YOUR_APP_KEY").build()
VelocityAds.initSDK(applicationContext, request, object : VelocityAdsInitListener {
override fun onInitSuccess() { }
override fun onInitFailure(error: VelocityAdsError) { }
})
Load and display an ad
val adRequest = VelocityNativeAdViewRequest.Builder(VelocityNativeAdViewSize.M)
.withPrompt("User's message here")
.withAIResponse("AI response here")
.build()
val nativeAd = VelocityNativeAd(adRequest)
nativeAd.loadAd(object : VelocityNativeAdListener {
override fun onAdLoaded(nativeAd: VelocityNativeAd) {
val adView = nativeAd.createAdView(context = this@MyActivity)
adContainer.addView(adView)
}
override fun onAdFailedToLoad(nativeAd: VelocityNativeAd, error: VelocityAdsError) { }
})
Install the SDK
Add to your Then run
pubspec.yaml:dependencies:
velocity_ads: ^0.4.1
flutter pub get.Load and display an ad
final adRequest = VelocityNativeAdViewRequest(
size: VelocityAdViewSize.m,
prompt: "User's message here",
aiResponse: "AI response here",
);
final nativeAd = VelocityNativeAd(adRequest);
nativeAd.viewListener = MyAdViewListener();
await nativeAd.load();
// In your widget tree:
nativeAd.widget
Initialize
import { VelocitySDK } from '@velocityio/web-sdk';
const sdk = new VelocitySDK({ publisherKey: 'YOUR_PUBLISHER_KEY' });
await sdk.init();

