От халепа... Ця сторінка ще не має українського перекладу, але ми вже над цим працюємо!
От халепа... Ця сторінка ще не має українського перекладу, але ми вже над цим працюємо!
Mykhailo Bontar
/
iOS Developer
4 min read
Apple App Store has always been one of the most efficient platforms for iOS developers to publish and promote their apps.
But how can one compete among nearly 2,000,000 other apps?
Thank goodness we have Apple Search Ads now for this purpose, and this service is gaining in popularity every day. By some estimates, 65% of downloads on the App Store occur after a search.
Of course, implementing Apple Search Ads is not a must, but some developers successfully use them in their marketing campaigns.
As is often the case with useful features, proper implementation of Apple Search Ads is a bit complex. In this article, we’ll describe what it is, why you need it, and how to actually implement it.
Article content:
First, let’s figure out what that is.
In a nutshell, Apple Search Ads are the ads that occur at the top of the search results when a user is looking for apps.
The system’s primary goal is to get an app discovered by more users and expand its base through user-led downloads.
It seems that this option is doing its job because Apple states that 65% of app downloads take place after a search.
See also: How To Simplify the Deployment of an iOS Application Using Bitrise
If you’ve been interested in how to advertise an app for a while, you probably know that there are many mobile ad networks.
However, it wouldn’t be an exaggeration to say that Apple Search Ads is much more effective compared to other channels in various ways.
All these factors make Apple Search Ads a highly effective tool for developers and marketers to improve app sales.
See also: 5 ways to eliminate security threats in iOS app development
Now, let’s go on to the practical part.
Add permission text to your info.plist file:
<key>NSUserTrackingUsageDescription</key>
<string>This will only be used to serve only relevant ads</string>
(or some other text)
Check out Apple Documentation: NSUserTrackingUsageDescription
If your app supports iOS 14.0 or earlier versions, add 2 Frameworks:
Upon your app start (or before collecting any data about the user), add a permission request to receive info:
ATTrackingManager.requestTrackingAuthorization = { status }
After this, the statuses received might be: notDetermined, restricted, denied, or authorized.
Check out Apple Documentation: requestTrackingAuthorization(completionHandler:)
When you obtain a tracking authorization status, do the following steps:
import iAd import AppTrackingTransparency
ADClient.shared().requestAttributionDetails {attributionDetails, error in}
attributionDetails
is dictionary with IDFA information.
import AdServices import AppTrackingTransparency
Get your device token:
guard let token = try? AAAttribution.attributionToken() else {return}
Use this token to request the attribution info.
The URL path is: POST https://api-adservices.apple.com/api/v1/ with body Data(token).
If the request is successful, you will receive this info:
attributionDetails, which is also information with IDFA.
Often, getting IDFAs from users can fail.
When this is the case, you can use the other framework that works with ad networks — SKAdNetwork. It allows you to get attribution of advertising campaigns on iOS, even if the user has not provided access to IDFA.
For this approach to operate appropriately, ad networks must register with Apple. Thus, developers can add unique identifiers to their apps so that ad networks can use this method.
So, you just have to add the following identifiers in info.plist:
<array> <dict> <key>SKAdNetworkIdentifier</key> <string>example100.skadnetwork</string> </dict> <dict> <key>SKAdNetworkIdentifier</key> <string>example200.skadnetwork</string> </dict> </array>
As you can see, the implementation process is not that long or complicated. Rather, it may have different options.
The most important part here is how you use it after implementation. As I’ve mentioned earlier, the most logical way to leverage it is using it for analytics to create successful marketing tunnels.