CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

PSSDK-inner 1.0.5

PSSDK-inner 1.0.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by zhouyehong.



Requirements

  • iOS 8.0+
  • required ARC
  • xcode 8.0 +

Installation

Manually, using the SDK download

  1. Download and unzip the PSSDK-iOS
  2. Drag the PSSDK-iOS folder into your Xcode application group (be sure to check the “Copy items into destination group’s folder” option).
  3. Add the following frameworks or libraries to your project. To do this, click on your application’s target, then click on Build Phases and expand the Link Binary With Libraries group.
    1. requires the following frameworks:
      1. 'CoreGraphics.framework'
      2. 'UIKit.framework'
      3. 'Foundation.framework'
      4. 'QuartzCore.framework'
      5. 'StoreKit.framework'
      6. 'SystemConfiguration.framework'
      7. 'CoreTelephony.framework'
      8. 'Security.framework'
      9. 'AdSupport.framework'
    2. requires the following libraries:
      1. libz.tbd
  4. Go to Targer->Build Settings->All
    Search for "other linker flags", add "-ObjC" in other linker flags

Usage

oc

//1、property
@property(nonatomic,strong)PSVideoView *adView;

//2、init
self.adView = [[PSVideoView alloc] initWithPublisherId:YOUR_PUBLISHER_ID slotId:YOUR_SLOT_ID];
_adView.delegate = self;
[_adView loadAd];

//3、delegate
-(void)psAdViewVideoDidLoad:(PSVideoView*)view{
    [view presentToViewController:self];
}
***other delegate***

See the finished example

#import "ViewController.h"
#import "PingStart.h"

@interface ViewController ()<PSVideoDelegate>
@property(nonatomic,strong)PSVideoView *adView;
@end

@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];

    self.adView = [[PSVideoView alloc] initWithPublisherId:YOUR_PUBLISHER_ID slotId:YOUR_SLOT_ID];
    _adView.delegate = self;
    [_adView loadAd];
}

-(void)psAdViewVideoDidLoad:(PSVideoView *)view{
    [view presentToViewController:self];
}
@end

swift

add following line to YOUR_PROJECT-Bridging-Header.h

#import "PingStart.h"
//1、property
var adView : PSVideoView?

//2、init
adView = PSVideoView(publisherId:YOUR_PUBLISHER_ID,slotId:YOUR_SLOT_ID)
adView?.delegate = self
adView?.loadAd()

//3、delegate
func psAdViewVideoDidLoad(_ view: PSVideoView) {
    view.present(to: self)
}
***other delegate***

See the finished example

import UIKit

class ViewController: UIViewController,PSVideoDelegate {
    var adView : PSVideoView?

    override func viewDidLoad() {
        super.viewDidLoad()
        PingStart.enableDebug(true)

        adView = PSVideoView(publisherId: YOUR_PUBLISHER_ID, slotId: YOUR_SLOT_ID)
        adView?.delegate = self
        adView?.loadAd()
    }

    func psAdViewVideoDidLoad(_ view: PSVideoView) {
        view.present(to: self)
    }
}

More examples