Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OneWayTech/iOS-SDK

Repository files navigation

OneWay

Travis Travis Travis Travis Travis

Version Update Date
1.3.0 Optimizing multithreading 2017年05月03日
1.2.1 1.support Bitcode 2.support Xcode 7 3.Modify some parameters 2017年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"
@interface AppDelegate : 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.
return YES;
}


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.
}

AltStyle によって変換されたページ (->オリジナル) /