Skip to content

Commit

Permalink
Merge pull request #1 from ParticleMedia/huanzhiNB/integrationGuideIn…
Browse files Browse the repository at this point in the history
…ReadMe

integration guide in read me
  • Loading branch information
huanzhiNB authored Sep 30, 2024
2 parents 6d071fa + 23a7273 commit f65b34e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# MSP SDK (iOS) integration guide
## Privisioning
A *Prebid API Key* needs to be provided offline by Particles. Please search `"af7ce3f9-462d-4df1-815f-09314bb87ca3"` in the demo app and replace it with your own.

Publisher App developers need to pass an *placement id* provisioned by Particles to `LoadAd` API to load an Ad. Please search `"demo-ios-article-top"` in the demo app and replace it with your own.

## Dependencies
For now MSP SDK is distributed as Cocoapods, you can introduce MSP SDKs with the following code in your Podfile:
```
pod 'MSPCore', '0.0.52', :modular_headers => true
# if you want Nova Ads
pod 'NovaAdapter', '0.0.49', :modular_headers => true
# if you want Google Ads
pod 'GoogleAdapter', '0.0.52', :modular_headers => true
```
Please specify the version number for the pods in your pod file, in case future updates bringing compatible issues.

## API usage
1. Init SDK using ` MSP.shared.initMSP`
2. Load an Ad using `AdLoader`
3. Got notified via `AdListener.onAdLoaded(placementId: String)` when Ad finished loading.
4. Fetch the loaded Ad from cache using `AdCache.getAd` API

Please checkout the demo app for [sample code](https://github.com/ParticleMedia/msp-sdk-demo-ios/blob/main/MSPDemoApp/MSPDemoApp/DemoViewControllers/DemoAdViewController.swift)

## Verify your integration
If everything goes well, you should be able to get below sample Ad from Prebid.
<img width="354" alt="Screenshot 2024-09-30 at 1 14 00 PM" src="https://github.com/user-attachments/assets/8416fb52-5073-43d4-aa0d-431b28ab127e">

0 comments on commit f65b34e

Please sign in to comment.