Skip to content

Repository files navigation

OneWay

TravisTravisTravisTravisTravis

VersionUpdateDate
1.3.0Optimizing multithreading2017.05.03
1.2.11.support Bitcode 2.support Xcode 7 3.Modify some parameters2017.03.09

When you read this document, we assume that you already have a basis of iOS app development experience, and to understand the related basic concepts.

Integration SDK

1.You must be set parameters –all_load in options “Other linker flags”.

// Or you can use following parameters if there is any conflict
-force_load $(SRCROOT)/OneWaySDK/OneWaySDK.a //According to your SDK path

2. Import OneWaySDK.h and Implement OneWaySDKDelegate in AppDelegate.h :

#import"OneWaySDK.h"@interfaceAppDelegate : UIResponder <UIApplicationDelegate,OneWaySDKDelegate>


3.Add the following methods to implement the required delegates on the view controller class :

- (void)oneWaySDKReady:(NSString *)placementId;
- (void)oneWaySDKDidError:(OneWaySDKError)error withMessage:(NSString *)message;
- (void)oneWaySDKDidStart:(NSString *)placementId;
- (void)oneWaySDKDidFinish:(NSString *)placementId withFinishState:(OneWaySDKFinishState)state;


4.The following code will initialize SDK :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
[OneWaySDK initialize:@"Your PublishId"delegate:self];
//when you create a applications in our platform, you will get a publish ID.returnYES;
}


5.The following code will show an ad :

Show default placement :

if ([OneWaySDK isReady]) {
[OneWaySDK show:self];
//You can set default PlacementID in our developer platform.
}

About

OneWaySDK for iOS

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages