Floxis Maven/Documentation

Floxis for AdMob and Ad Manager (iOS)#

The Floxis iOS SDK adds Floxis demand to an iOS app that monetises with AdMob or Google Ad Manager. Floxis is an ad network in your mediation: you add Floxis custom events to your AdMob waterfall or Ad Manager yield group at the eCPMs your Floxis endpoint suggests, and when your mediation reaches a Floxis entry, the Floxis adapter runs one Floxis auction with that eCPM as the floor. It is the same model, parameter and error codes as on Android. This guide covers version 0.3.3.

The SDK is the Swift package https://github.com/floxis-tech/floxis-sdk-ios. For an iOS app that mediates with Unity LevelPlay, follow In-app SDK (Unity LevelPlay) instead; it uses the same package.

Before you start, set up an endpoint with the integration type Floxis SDK for the app on the Supply page. Open the saved endpoint. At the bottom of its Connection tab, Mediation entries lists, for each ad server and format, the Floxis entries to add: each one's eCPM, the class name and the parameter to paste. Install shows the seat and region; use the same two values on iOS.

How it works#

  1. Your mediation reaches Floxis. AdMob or Ad Manager calls your ad sources in its usual order. When it reaches a Floxis entry, it calls the Floxis adapter, at the eCPM you gave that entry.
  2. One Floxis auction. The adapter runs one auction for the ad request, with the entry's eCPM as the floor (1.5 s deadline by default).
  3. Fill or pass. Floxis fills only with a bid at or above the entry's eCPM. Otherwise the entry answers no-fill at once and your mediation moves on.

Nothing runs before your ad server, and nothing changes how your app loads ads. With more than one Floxis entry in an ad unit, one auction serves them all: the first entry reached runs it at the lowest of their eCPMs, and each Floxis entry serves the bid only if it pays at least its own eCPM.

Supported formats: banner, interstitial (display and video in one auction) and rewarded video. Native, app open and rewarded interstitial ads are not supported.

Requirements#

ItemRequirement
Packagehttps://github.com/floxis-tech/floxis-sdk-ios, version 0.3.3, products FloxisSDK and FloxisSDKCore
iOS15.0 or newer
Xcode26.2 or newer (needed by Google Mobile Ads 13.4 and later), Swift 5.9 or newer
Package managerSwift Package Manager. CocoaPods is not offered.
Google Mobile Ads13.8.0 or a newer 13.x, added by your app. The Floxis package does not bring it in.
Prebid Mobile3.4.0, brought in by the Floxis package
AccountA Floxis SDK endpoint on the Supply page, and AdMob or Ad Manager ad units.

1. Add the Swift package#

In Xcode, choose File › Add Package Dependencies… and enter the package URL:

https://github.com/floxis-tech/floxis-sdk-ios

Set the dependency rule to Up to Next Major Version from 0.3.3, and add the FloxisSDK and FloxisSDKCore products to your app target. In a Package.swift, the same dependency is:

.package(url: "https://github.com/floxis-tech/floxis-sdk-ios", from: "0.3.3")

The package brings in Prebid Mobile 3.4.0. It does not bring in Google Mobile Ads: your app keeps its own Google Mobile Ads package, at 13.8.0 or a newer 13.x. To set your App Store ID (step 4), your code also imports PrebidMobile; add Prebid's package (https://github.com/prebid/prebid-mobile-ios.git) at exactly 3.4.0, the version the Floxis package pins, and link its PrebidMobile product.

No linker flags or build settings are needed. The SDK ships as prebuilt binaries that Xcode downloads and checks against the checksums in the package; you never download them yourself. The package keeps the adapter class in your build, so a release build finds it even when the linker strips unused code. It also bundles its privacy manifest and the MRAID and Open Measurement scripts that Prebid uses.

2. Update Info.plist#

KeyWhat to put there
GADApplicationIdentifierYour AdMob app ID (ca-app-pub-XXXX~YYYY). Google Mobile Ads needs it.
SKAdNetworkItemsThe SKAdNetwork IDs of the networks that buy your inventory (below).
NSUserTrackingUsageDescriptionOnly if your app shows the App Tracking Transparency prompt (step 3).

SKAdNetwork. Floxis has no SKAdNetwork ID of its own. Add Google's ID and the third-party buyer IDs that Google publishes for AdMob, in lower case. Prebid copies every ID in your list, with your App Store ID, into each Floxis bid request (imp.ext.skadn), so buyers can see which ad networks your app supports.

<key>SKAdNetworkItems</key>
<array>
  <dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cstr6suwn9.skadnetwork</string>
  </dict>
  <!-- add Google's third-party buyer IDs here -->
</array>

When the list is present, also set your numeric App Store ID as Targeting.shared.sourceapp (step 4). Without it, Prebid logs "Info.plist contains SKAdNetwork but sourceapp is nil!" and leaves imp.ext.skadn out of the request, so buyers see no SKAdNetwork support at all.

3. App Tracking Transparency (optional)#

The SDK never shows the ATT prompt. If your app asks for tracking permission, ask before you start ads and wait for the answer, so the first auctions already carry it. iOS shows the prompt only while the app is active, so call this from your first screen (after your consent screen), not from didFinishLaunchingWithOptions:

import AppTrackingTransparency

Task { @MainActor in
    if ATTrackingManager.trackingAuthorizationStatus == .notDetermined {
        _ = await ATTrackingManager.requestTrackingAuthorization()
    }
    startAds()          // step 4
}

What Prebid sends for each answer:

  • Authorized: the advertising ID (IDFA) in device.ifa, only when TCF allows device access (Purpose 1 is granted, or no Purpose 1 choice is recorded and GDPR does not apply), and lmt = 0. The Floxis SDK removes it, and the IDFV, whenever its device-signal check below fails, such as under GDPR without consent for Floxis (vendor 1609).
  • Not authorized, or not asked: no usable IDFA (iOS reports it as all zeros), the vendor ID (IDFV) in device.ext.ifv, and lmt = 1. The exchange also removes user IDs, the full IP address and the device and session signals from these requests.
  • In both cases, the ATT status in device.ext.atts.

Authorized auctions go to att-<region>.floxis.tech, the tracking domain in the SDK's privacy manifest (step 6); the rest go to <region>.floxis.tech. Both reach the same Floxis auction.

4. Start Floxis before Google Mobile Ads#

Run your consent management platform (CMP) first, so its consent keys are in place before the first auction. Then initialise Floxis on the main thread, with the seat and region from your endpoint, and start Google Mobile Ads. If you don't use ATT, call startAds() once your CMP is done.

import FloxisSDK
import FloxisSDKCore
import GoogleMobileAds
import PrebidMobile

@MainActor
func startAds() {
    Targeting.shared.sourceapp = "1234567890"          // your numeric App Store ID
    do {
        let configuration = try FloxisConfiguration(
            seat: "YOUR_SEAT",
            region: "us-e",
            timeoutMs: 1_500,
            storeURL: URL(string: "https://apps.apple.com/app/id1234567890")
        )
        Floxis.shared.initialize(configuration) { status, detail in
            print("Floxis init: \(status) \(detail ?? "")")
        }
    } catch {
        print("Floxis configuration: \(error)")
    }
    GoogleMobileAds.MobileAds.shared.start(completionHandler: nil)
}

FloxisConfiguration throws a FloxisConfigurationError (invalidSeat, invalidRegion, invalidTimeout or invalidStoreURL) when a value is malformed. region must be us-e, eu or apac. The other options:

OptionWhat it does
timeoutMsThe longest a Floxis entry waits for its auction before it reports no fill and your mediation moves on (200 to 10,000 ms, default 1,500).
storeURLYour App Store URL, sent to buyers as app.storeurl. Must be https.
debugWrites Floxis FLX-xxx lines to the Xcode console. It never changes what is sent.
testModeMarks auctions as test traffic, which Floxis does not bill. Only works in the Simulator or a development-signed build (see step 8).
enabled / Floxis.shared.setEnabled(_:)Kill switch. false stops all Floxis auctions at once; Floxis entries report no fill.
personalizedAds / Floxis.shared.setPersonalizedAds(_:)false stops Floxis auctions; Floxis entries report no fill. Update it when consent changes.
shareLocationDefault true: lets Prebid send the device location when the app already has permission and consent allows it.
Floxis.shared.setVideoAudioMuted(_:)Whether your video ads play muted (true) or with sound (false). nil, the default, means unknown.

The Floxis adapter always tells Google it is ready. If an ad request reaches a Floxis entry before initialize has run, that entry fails with code 203 and your mediation moves on. If start-up fails, a later request retries, at most once every 30 seconds. Initialising again with a different seat or region reports .failed.

Your Prebid Mobile settings stay yours: the SDK points Prebid at Floxis only while it runs a Floxis auction and puts your host, account, timeout and headers back straight after.

5. Add the Floxis entries to AdMob or Ad Manager#

Open your endpoint's Mediation entries, choose the AdMob or Google Ad Manager tab and the format, and type the Ad unit name (your name for the placement, sent as configId; Floxis reports by it). The eCPMs and parameters are the same on iOS and Android; only the class name differs, and How to add these in AdMob (or **Google Ad Manager**) gives both, each with its own copy button. Then:

  • AdMob: open the ad unit's mediation group → Waterfall → Add custom event. Add one custom event per Floxis entry, at the place in your waterfall you want it, with its Label and Manual eCPM, and map it with the Class name and that entry's Parameter. The eCPM sets the entry's place, up to the top of your waterfall.
  • Ad Manager: Delivery → Yield groups → the yield group for this app and format → Add yield partner: Other company, Integration type Custom event, Platform iOS. One yield partner per entry, with its Default CPM, Label, Class name and Parameter, Status Active.

The class name on iOS has no module prefix:

FloxisMediationAdapter

A parameter looks like this:

{ "configId": "home_banner", "floor": "1.50", "min": "0.55" }

The one rule that matters. Each entry's parameter floor must equal the eCPM you type in AdMob or Ad Manager, in US dollars. The adapter cannot see the eCPM you typed, so it serves only bids that pay at least floor. Always copy the eCPM and the parameter from the same row. If your account uses another currency, type the eCPM converted into it and keep the parameter exactly as shown (it stays in USD).

There is no Floxis code around your ad loads. Load and show BannerView, InterstitialAd and RewardedAd exactly as you do today. A Floxis full-screen ad shows once; an expired or already-shown one reports a show failure (codes 401 and 402) and you load a new ad, as with any network.

You are responsible for collecting consent and for your app's privacy disclosures. What the SDK does:

  • TCF v2, US Privacy and GPP. Your CMP writes the standard IAB keys (IABTCF_*, IABUSPrivacy_String, IABGPP_*) to UserDefaults. Prebid reads them and forwards them to the auction.

  • Children (COPPA). The SDK does not decide whether a user is a child, and it does not block child-directed traffic. It reads Google Mobile Ads' child-directed setting from each ad request that reaches a Floxis entry: ageRestrictedTreatment = .child, or the older tagForChildDirectedTreatment as true or false. Floxis passes the flag to the auction as regs.coppa, and a child-directed request carries no device location. Set Google's setting as you already do:

    MobileAds.shared.requestConfiguration.ageRestrictedTreatment = .child

    If you also set Targeting.shared.subjectToCOPPA = true on Prebid, the auction is child-directed when either is set.

  • Personalised ads. setPersonalizedAds(false) stops Floxis auctions, and Floxis entries report no fill (code 202). The SDK never changes your Google requests, so set Google's own non-personalised-ads option on them as you do today.

  • Device and session signals. Battery level, charging, Low Power Mode, dark mode, the video muted state (as playbackmethod), impression depth and session length are sent only when all of these are true:

    • personalised ads are on;
    • GDPR does not apply, or the TC string grants Purpose 1 and consent for Floxis (vendor 1609);
    • the US Privacy string does not record an opt-out;
    • no applicable GPP US section records an opt-out of sale, sharing or targeted advertising.

    Battery fields also need your app to have turned on UIDevice.current.isBatteryMonitoringEnabled. The muted state is sent only when it is known: the system volume is at zero, or you called setVideoAudioMuted(_:). A volume above zero does not prove sound, because the Ring/Silent switch can still mute playback. When the SDK sends no muted state, the exchange tells buyers the video starts in view with sound on (playbackmethod 5).

  • Location. The SDK never asks for location permission. It sends a location only when all of these are true:

    • shareLocation is on;
    • the app already holds When In Use or Always authorisation;
    • the request is not child-directed;
    • under GDPR, the user opted in to precise geolocation (TCF special feature 1) and gave consent for Floxis (vendor 1609);
    • neither the US Privacy string nor an applicable GPP US section records an opt-out.

Privacy manifest. The package ships a PrivacyInfo.xcprivacy, and Xcode includes it in your app's privacy report (Product › Archive, then Generate Privacy Report in the Organizer). It declares:

  • UserDefaults access with reason CA92.1, to read your CMP's consent keys;
  • NSPrivacyTracking set to true, because the SDK can pass the IDFA to buyers, which Apple counts as tracking. Prebid sends the IDFA only after the user authorises tracking (step 3);
  • the tracking domains att-us-e.floxis.tech, att-eu.floxis.tech and att-apac.floxis.tech. The SDK sends an auction there only after the user authorises tracking, and every other auction to <region>.floxis.tech, which is not listed. iOS blocks a listed domain until the user authorises tracking, so auctions run whatever the ATT answer;
  • the data types below, all for third-party advertising.

Prebid Mobile 3.4.0 has no privacy manifest for its own code; only the Open Measurement framework it bundles ships one. Make sure your App Store answers also cover what Prebid and Google Mobile Ads collect.

App Store privacy labels. These are the data types the SDK's manifest declares. Use them as a starting point for your answers in App Store Connect:

App Store data typeWhen it is sentLinkedTracking
Identifiers › Device IDIDFA after ATT authorisation; otherwise IDFVYesYes
Location › Precise LocationOnly under the location rules aboveYesYes
Location › Coarse LocationDerived from the request IP addressYesNo
Usage Data › Advertising DataEvery auction (the ad requested and the ad shown)YesNo
Usage Data › Product InteractionImpression depth and session length, under the signal rules aboveYesNo
Other DataBattery, Low Power Mode, dark mode, volume muted, under the signal rules aboveYesNo

All data goes to the auction over HTTPS. For the full rules, see the SDK privacy and consent guide.

7. Add the app-ads.txt line#

Buyers that check app-ads.txt will not bid on the app without the Floxis line. Add it to app-ads.txt at the root of the developer website on the app's App Store listing. Ask the dashboard assistant "what is my ads.txt line for Floxis" for the exact line for your account. The **Floxis ads.txt, app-ads.txt and sellers.json Guide** explains where the file lives and how crawlers find it.

8. Test before release#

  1. In the Simulator or a development-signed build, set debug: true and testMode: true.
  2. Watch the Xcode console for Floxis FLX- lines. You should see FLX-101 at start-up.
  3. Open Google's Ad Inspector and load each ad unit. Google's test ad units have no Floxis entries, so use your own ad units. Check three things:
    • A fill. A Floxis entry shows as the ad source of a served ad.
    • A pass. When Floxis has no bid, the Floxis entry reports no fill and the next source serves, within timeoutMs.
    • The floor holds. A test entry with a high eCPM and the same floor never serves a bid below it (code 205).
  4. Some buyers don't bid on test traffic, so a test build may see few Floxis fills. Floxis bills neither side of a test auction. Keep test builds to test devices.
  5. Tell your account manager your placement names and the date of the release build, so the first live traffic can be checked with you.

testMode only takes effect in the Simulator or when the app's provisioning profile allows debugging. App Store, TestFlight, ad hoc and enterprise builds ignore it and report FLX-105.

A Floxis entry that fails reports an error with the domain tech.floxis.sdk and the same codes as on Android: 101 the parameter is missing or invalid, 201 Floxis switched off, 202 personalised ads off, 203 Floxis not started, 204 no bid, 205 bid below this entry's floor, 206 timeout, 207 Floxis was switched off or personalised ads were turned off during the auction or before the show, 208 and 209 network or server error, 301 and 302 render or internal error, 401 to 403 a full-screen ad expired, was already shown or was not ready. What to do about each is in SDK testing and troubleshooting.

Licence#

The SDK is proprietary, all rights reserved. It depends on Prebid Mobile, under the Apache 2.0 licence, and bundles unmodified copies of Prebid's MRAID and Open Measurement scripts. Google Mobile Ads comes under Google's own terms. Floxis.sdkVersion returns the SDK version. Your account manager can share a sample app.