Sample apps demonstrating the logic needed to implement SKAdNetwork as an ad network, publisher and advertiser.
This repo contains:
- Advertiser sample app
- Publisher sample app
- A server that simulates an ad network API (including ad signing)
Note: to use SKAN 4 run the sample apps using XCode 14
- Open
SingularAdvertiserSampleApp.xcodeproj
- Run the app and follow the on-screen instructions
- Open
SingularPublisherSampleApp.xcodeproj
- Make sure that the
skadnetwork_server.py
is running (instructions below) - Modify the consts placeholders in
ViewController.m
to set your own parameters - Follow the steps in
ViewController.m
starting inshowAdClick
- Run the app and follow the on-screen instructions
- Place your private key (see below on how to generate it) in the same directory as the server in a file called
key.pem
cd skadnetwork-server
pip install -r requirements.txt
(make sure you are using python3)python skadnetwork_server.py
Now you should have a server listening on port 8000 that serves ad network responses to the publisher sample app.
- SKAdNetwork uses an ECDSA keypair with the
prime256v1
curve, generate it by using:
openssl ecparam -name prime256v1 -genkey -noout -out companyname_skadnetwork_private_key.pem
- For more details see Apple's instructions Here
To learn more about Singular visit: https://www.singular.net