Welcome to the documentation for LBLaunchImageAd, a library for displaying launch screen ads in your iOS app.
Getting Started
To integrate LBLaunchImageAd into your app, follow the steps below:
Installation
- Install LBLaunchImageAd using CocoaPods by adding the following line to your Podfile:
pod 'LBLaunchImageAd'
Usage
- Import the LBLaunchImageAd module in your AppDelegate file:
import LBLaunchImageAd
- In your AppDelegate’s application(_:didFinishLaunchingWithOptions:) method, add the following code to set up the launch screen ad:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Customize your launch screen ad settings
let adViewConfig = LBLaunchImageAdConfig(appKey: "your_app_key", adType: .image, timeInterval: 5, showSkipButton: true)
// Set up the launch screen ad
LBLaunchImageAd.sharedInstance.setup(with: adViewConfig)
// Add the launch screen ad view to your key window
if let window = UIApplication.shared.windows.first {
LBLaunchImageAd.sharedInstance.addAdViewToWindow(window)
}
return true
}
Customization
LBLaunchImageAd provides various customization options. Here are some common settings:
App Key
You need to provide your unique app key when setting up the launch screen ad. This key is provided by the ad network you are using.
Ad Type
LBLaunchImageAd supports different types of ads, including image ads and video ads. Specify the ad type when configuring your ad view.
Time Interval
Set the time interval (in seconds) for the ad to be displayed on the launch screen. After the specified time, the ad will automatically dismiss.
Show Skip Button
You can choose whether to show a skip button on the launch screen ad. The skip button allows users to dismiss the ad before the specified time interval.
Important Notes
- Make sure you have a valid app key from the ad network before configuring LBLaunchImageAd.
- LBLaunchImageAd is designed to work with a single ad network. If you plan to use multiple ad networks, additional setup may be required.
Example Project
You can find a complete example project demonstrating the integration and usage of LBLaunchImageAd here.
Contact Us
If you have any questions or need assistance, please don’t hesitate to reach out to our support team at support@example.com.
We hope you find LBLaunchImageAd helpful and wish you success in integrating launch screen ads into your app!