Add Adrop to Apple
Prerequisites
Install the following:
Xcode 14.1 or later
Make sure that your project meets these requirements:
Your project must target these platform versions or later:
iOS 13
Swift 5.0
Sign into Adrop using your email or Google account.
Step 1: Create an Adrop project
Before you can add Adrop to your Apple app, you need to create an Adrop project to connect to your app.
Step 2: Register your app with Adrop
To use Adrop in your Apple app, you need to register your app with your Adrop project. Registering your app is often called "adding" your app to your project.
Make sure to enter the bundle ID that your app is actually using. The bundle ID value is case-sensitive, and it cannot be changed for this Adrop Apple app after it's registered with your Adrop project.
Go to the Adrop console.
In the center of the project app page, click the Apple button to launch the setup workflow.
Enter your app's bundle ID in the bundle ID field.
A bundle ID uniquely identifies an application in Apple's ecosystem.
Find your bundle ID: open your project in Xcode, select the top-level app in the project navigator, then select the General tab. The value of the Bundle Identifier field is the bundle ID (for example,
com.yourcompany.yourproject
).Be aware that the bundle ID value is case-sensitive, and it cannot be changed for this Adrop app after it's registered with your Adrop project.
Enter other app information: App nickname.
App nickname: An internal, convenience identifier that is only visible to you in the Adrop console
Click Register app.
Step 3: Add an Adrop configuration file
Download adrop_service.json to obtain your Adrop Apple platforms config file.
Step 4: Add Adrop SDK to your app
Use CocoaPods to install and manage Adrop dependency.
Here's how to install Adrop using CocoaPods:
Create a Podfile if you don't already have one. From the root of your project directory, run the following command:
To your Podfile, add the Adrop pod in your app.
Install the pods, then open your
.xcworkspace
file to see the project in Xcode:
Step 5: Initialize Adrop in your app
The final step is to add initialization code to your application.
Import the
AdropAds
module in yourUIApplicationDelegate
Initialize an Adrop shared instance in your app delegate's
application(_:didFinishLaunchingWithOptions:)
method:
If you're using SwiftUI, you can create an application delegate and attach it to your
App
struct viaUIApplicationDelegateAdaptor
orNSApplicationDelegateAdaptor
.
Next Steps
You're all set! Please register an Ad unit to show ads to users.
Learn how to Create your Ad unit.
(Optional) Troubleshooting
Last updated