Skip to content
No description, website, or topics provided.
Objective-C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
PingStart
LICENSE
PSSDK-inner.podspec
PSSDK-inner.podspec_0104
PSSDK-inner.podspec的副本
README.md

README.md

PingStart

Requirements

  • iOS 8.0+
  • required ARC
  • xcode 8.0 +

Installation

Installation with CocoaPods

To integrate PSSDK-iOS into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'PSSDK-iOS'

Then, run the following command:

$ pod install

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

You can’t perform that action at this time.