Skip to main content

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.

1

Install the SDK

In Xcode, go to File → Add Package Dependencies and enter:
https://github.com/velocityiodev/velocityads-ios-sdk
2

Initialize

In your AppDelegate or app entry point:
import VelocityAds

let request = VelocityAdsInitRequest.Builder("YOUR_APP_KEY").build()
VelocityAds.initSDK(request, delegate: self)
3

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)
    }
}
Full integration guide →