Confiant Plugin Documentation for iOS
Confiant Plugin Integration Manual
Important Notice
Starting from Version 10, all libraries will share the same version number to prevent mismatches and reduce confusion.
Additionally, the SDK configuration has been updated. Please verify that all configurations are correctly set in your project.
Ensure you are using the correct version for all dependencies.
Release Note (v10.2.1)
Enabled/Disabled Confiant via the setting from the SDK server
Will attempted to initialize Confiant again when it failed.
Confiant Plugin for iOS
If you wish to enable Confiant, please contact the Stroeer team for assistance.
Note: This feature is available from 9.9.0 onwords.
1. Overview
This manual provides instructions for setting up Confiant within the YieldloveAdIntegration framework in your iOS app.
2. Before you start
Please read https://stroeerdigitalgroup.atlassian.net/wiki/x/FgGyc first. This manual describes only how to enable the Confiant Feature.
3. Try out our example app
We invite you to take a look at example app.
4. Adding SDK to your project
4.1. Cocoapods integration
The ad integration package is distributed as a CocoaPod. Follow the instructions to install CocoaPods into your app. Once installed, you can integrate the SDK dependency.
If your project does not require the Confiant SDK, you can use the public CocoaPod server to install the YieldloveAdIntegration package. However, if the Confiant SDK is needed, note that it is private and cannot be installed via the public CocoaPod server. Instead, you must configure and use the private CocoaPod repository.
Important: Ensure that the settings for the public and private CocoaPod servers are not mixed, as this may cause conflicts.
Update repository
pod repo updateEdit your Podfile so that SDK is included as a dependency.
Include SDK pod
# As ConfiantSDK is private, you need to set sources.
source 'https://cdn.cocoapods.org/'
source 'https://cdn.confiant-integrations.net/backend-integrations/in-app/releases/ios/podspecs.git'
pod 'ConfiantSDK', '6.1.2' #Option to speficy the Confiant version. 6.1.2 is the verfied version
pod 'YieldloveAdIntegration', :podspec => 'https://slabs-yieldlove-ad-integration.s3.eu-central-1.amazonaws.com/ios/YieldloveAdIntegration-10.2.1.podspec', subspecs: ['Confiant']If you want to integrate both Gravite and Confiant plugins, use the following code.
pod 'YieldloveAdIntegration', :podspec => 'https://slabs-yieldlove-ad-integration.s3.eu-central-1.amazonaws.com/ios/YieldloveAdIntegration-10.2.1.podspec', subspecs: ['Confiant', 'Gravite', 'Consent']
Then run
Install SDK
pod installNote: Our modules, alongside other dependencies, may require you to use a minimum targeted iOS version 12.0 or higher. If you have any errors with cocoapod, please delete the cache of YieldloveAdIntegration.
4.2. Swift Package Manager (SPM) integration
Follow the instructions here: https://stroeerdigitalgroup.atlassian.net/wiki/spaces/SDGPUBLIC/pages/1890713878/iOS+integration+documentation#4.2.-Swift-Package-Manager-(SPM)-integration
Add the Core and Confiant products to your Target, as pictured. (YieldloveAdIntegration & YieldloveAdIntegration_Confiant)
Click Add Package.
NOTE: In addition to adding our dependency, make sure to include your own configured Confiant package through SPM.
5. Implementation
5.1. Setup
Initialize Confiant
To use Confiant, you must initialize it as follows:
ConfiantLoader.shared.initialize(confiantPropertyId: "confiantpropertyID", enableReload: true) { success in
if success {
// Initialization succeeded - proceed with your setup
} else {
// Initialization failed - handle the failure appropriately
}
}
Parameters:
confiantPropertyID:
To obtain theconfiantPropertyID, please contact the Stroeer Support Team or the Confiant Team.enableReload:
Determines the behavior when an advertisement is blocked:If set to
true, Confiant will attempt to reload the advertisement up to two times.If set to
false, blocked advertisements will not be reloaded and will simply remain blocked.
Make sure to initialize Confiant before using its features in your application.
Enable test mode
To test the Confiant feature, the following code should be called.
// Confiant
ConfiantLoader.shared.enableTestMode()
ConfiantLoader.shared.initialize(confiantPropertyId: "confiantpropertyID", enableReload: true) { success in
if success {
// Initialization succeeded - proceed with your setup
} else {
// Initialization failed - handle the failure appropriately
}
}All advertisements will be blocked by Confiant. This setting is intended for testing purposes only.
Important Note
Test Mode must not be enabled in production environments. These modes are intended only for testing and development.