Latest 0.1.1
Homepage https://github.com/PingStart/pingstart_sdk_iOS
License Copyright (c) 2017 newborntown. All rights reserved.
Platforms ios 8.0, requires ARC
Authors

pingstart_sdk_iOS

PingStart SDK for iOS – come soon

PingStart

Requirements

  • iOS 8.0+
  • required ARC
  • xcode 8.0 +

Installation

Installation with CocoaPods

To integrate NbtPingStart into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'NbtPingStart'

Then, run the following command:

$ pod install

Manually, using the SDK download

  1. Download and unzip the
  2. Drag the NbtPingStart.framework folder into your Xcode application group (be sure to check the “Copy items into destination group’s folder” option).
  3. Go to Targer->Embedded Binaries -> add NbtPingStart.framework
  4. 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.
    4.1. requires the following frameworks:

    'CoreGraphics.framework'
    
    'UIKit.framework'
    
    'Foundation.framework' 
    
    'QuartzCore.framework' 
    
    'StoreKit.framework'
    
    'SystemConfiguration.framework'
    
    'CoreTelephony.framework'
    
    'Security.framework' 
    
    'AdSupport.framework' 

    4.2. requires the following libraries:

    libz.tbd
  5. Go to Targer->Build Settings->All
    Search for "other linker flags", add "-ObjC" in other linker flags

Note: if you want to display ads on third party platforms, such as Facebook, please add FacebookAdapter.framework, more use, please check demo

Usage

oc

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

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

//3、delegate
-(void)psAdViewInterstitialDidLoad:(PSInterstitialView*)view{

[view presentToViewController:self];
}
***other delegate***

See the finished example

#import "ViewController.h"
#import  <NbtPingStart/NbtPingStart.h>

@interface InterstitialAdVC ()<PSInterstitialDelegate>
@property(nonatomic,strong)PSInterstitialView *adView;
@end

@implementation InterstitialAdVC

- (void)viewDidLoad {
[super viewDidLoad];

self.adView = [[PSInterstitialView alloc] initWithPublisherId:@"5418" slotId:@"1001991"];
self.adView.delegate = self;

[self.adView loadAd];

}

#pragma mark - delegate
-(void)psAdViewInterstitialDidLoad:(PSInterstitialView*)view{
[view presentToViewController:self];
}
@end

swift

//1、property
var adView : PSInterstitialView?

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

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

See the finished example

import UIKit

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

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

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

func psAdViewInterstitialDidLoad(_ view: PSInterstitialView) {
view.present(to: self)
}
}

Latest podspec

{
    "name": "NbtPingStart",
    "version": "0.1.1",
    "summary": "PSSDK dev version",
    "homepage": "https://github.com/PingStart/pingstart_sdk_iOS",
    "license": "Copyright (c) 2017 newborntown. All rights reserved.",
    "authors": {
        "xiangyu-czc": "[email protected]"
    },
    "source": {
        "git": "https://github.com/PingStart/pingstart_sdk_iOS.git",
        "tag": "0.1.1"
    },
    "social_media_url": "http://www.pingstart.com",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "default_subspecs": "Default",
    "subspecs": [
        {
            "name": "Default",
            "source_files": "NbtPingStart-SDK/NbtPingStart.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/NbtPingStart.framework",
            "public_header_files": "NbtPingStart-SDK/NbtPingStart.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/NbtPingStart.framework"
            }
        },
        {
            "name": "AdMobAdapter",
            "source_files": "NbtPingStart-SDK/AdMobAdapter.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/AdMobAdapter.framework",
            "public_header_files": "NbtPingStart-SDK/AdMobAdapter.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/AdMobAdapter.framework"
            },
            "dependencies": {
                "NbtPingStart/Default": [],
                "Firebase/Core": [],
                "Firebase/AdMob": []
            }
        },
        {
            "name": "FacebookAdapter",
            "source_files": "NbtPingStart-SDK/FacebookAdapter.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/FacebookAdapter.framework",
            "public_header_files": "NbtPingStart-SDK/FacebookAdapter.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/FacebookAdapter.framework"
            },
            "dependencies": {
                "NbtPingStart/Default": [],
                "FBAudienceNetwork": [],
                "FBSDKCoreKit": []
            }
        },
        {
            "name": "AdcolonyAdapter",
            "source_files": "NbtPingStart-SDK/AdcolonyAdapter.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/AdcolonyAdapter.framework",
            "public_header_files": "NbtPingStart-SDK/AdcolonyAdapter.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/AdcolonyAdapter.framework"
            },
            "dependencies": {
                "NbtPingStart/Default": [],
                "AdColony": []
            }
        },
        {
            "name": "MopubAdapter",
            "source_files": "NbtPingStart-SDK/MopubAdapter.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/MopubAdapter.framework",
            "public_header_files": "NbtPingStart-SDK/MopubAdapter.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/MopubAdapter.framework"
            },
            "dependencies": {
                "NbtPingStart/Default": []
            }
        },
        {
            "name": "VungleAdapter",
            "source_files": "NbtPingStart-SDK/VungleAdapter.framework/Headers/*.h",
            "preserve_paths": "NbtPingStart-SDK/VungleAdapter.framework",
            "public_header_files": "NbtPingStart-SDK/VungleAdapter.framework/Headers/*.h",
            "ios": {
                "vendored_frameworks": "NbtPingStart-SDK/VungleAdapter.framework"
            },
            "dependencies": {
                "NbtPingStart/Default": [],
                "VungleSDK-iOS": []
            }
        }
    ]
}

Pin It on Pinterest

Share This