SK T ad ios SDK Document Version 3.5 SDK Version 3.1.0.6 2013 8 28
SK T ad 2013/02/15 2013/08/28 3.1.0.6! 3 Build environment! 5 Header import! 11 Method! 14 Delegate! 15 Coding Guide! 17 Test Client ID! 20 2
1. Application T ad SDK. T ad SDK Compile Test Tad SDK Build Setting Build. ios Base SDK ios 6.1 ios Deployment Target 4.3 Test complete ios version 4.3 ~ 6.1.4 Tested ios Device Support Core MAC Development OS iphone (3gs, 4, 4s, 5), ipad2, new ipad, ipad mini armv7, armv7s Mountain lion Xcode version Xcode 4.6.3 T ad SDK T ad SDK T ad publisher center (www.t-ad.co.kr) Client ID. T ad SDK! T ad. view Banner view Banner. T ad SDK bringsubviewtofront:. T ad. 3
T ad SDK. (iphone5 ) iphone ipad Bar Bar Size ( : Px) T ad 2.0 320 * 50 320 * 480 320 * 50 1024 * 768 T ad 3.0 320 * 50 320 * 480 320 * 50 320 * 480 T ad Libarary libtadcore.a libtadcore_debug.a TadCore.h Tad.bundle JSONKit.h release debug SDK Tad JSON Apple AppStore compile (BOOL)isTest NO. 4
2. Build environment Add SDK to Project T ad.! JSONKit.h! TadCore.h! libtadcore_debug.a! libtadcore.a! Tad.bundle 5
XCode Add Files to.... Add. 6
Link Option XCode, Build Settings. Other Linker Flags Build Configuration. - Debug :.!! -Objc! "$(SRCROOT)/tadsampleapp/lib/libTadCore_Debug.a"! -all_load 7
- release :.! -Objc! "$(SRCROOT)/tadsampleapp/lib/libTadCore.a"! -all_load 8
Add Framework Tad. SystemConfiguration.framework CoreTelephony.framework AVFoundation.framework QuartzCore.framework AudioToolbox.framework EventKit.framework MediaPlayer.framework XCode, Build Phases. Link Binary With Librarise + framework. libtadcore.a libtadcore_debug.a. 9
Other Link Option. 10
3. Header import Tad,, TadCore.h Flag TadSlot TadSlotNone TadSlotInline (320 * 50.) TadSlotInterstitial (320 * 480.) TadErrorCode. NO_AD ( ) MISSING_REQUIRED_PARAMETER_ERROR ( ) INVAILD_PARAMETER_ERROR ( ) UNSUPPORTED_DEVICE_ERROR ( ) CLIENTID_DENIED_ERROR ( Client ID ) INVAILD_SLOT_NUMBER ( ) CONNECTION_ERROR ( ) NETWORK_ERROR ( ) RECEIVE_AD_ERROR ( ) LOAD_ERROR (SDK ) SHOW_ERROR ( ) INTERNAL_ERROR ( ) 11
Property UIViewController *seedcontroller window. <getadvertisement.> UIView *seedview;. <.>. id <TadDelegate> delegate. <.> NSString *clientid TadSlot slotno. <.> TadSlot TadSlotNone TadSlotInline (320 * 50.) TadSlotInterstitial (320 * 480.) CGPoint offset. SeedView. Default : CGPointMake(0.0f, 0.0f) BOOL istest. YES NO. NO :. YES :. Default : YES 12
CGFloat refershinterval. 15~60. 15 : 15. 60 : 60. Default : 20 BOOL usebackfillcolor Inline. NO :. YES :. Default : NO 13
4. Method - (id)initwithseedview:(uiview *)aseedview delegate:(id <TadDelegate>)aDelegate Tad. SeedView :. Delegate :. - (void)getadvertisement.. YES :. NO :. - (void)setlogmode:(bool)islogmode. -(void)removead - (void)bringsubviewtofront:(uiview *)view Tad. ( ). - (BOOL)canLoadInterstitial - (void)viewwillappear:(bool)animated viewwillappear.. - (void)viewwilldisappear:(bool)animated viewwilldisappear.. 14
5. Delegate - (void)tadonadwillreceive:(tadcore *)tadcore.. - (void)tadonadreceived:(tadcore *)tadcore. - (void)tadonadwillload:(tadcore *)tadcore - (void)tadonadloaded:(tadcore *)tadcore.. - (void)tadonadclicked:(tadcore *)tadcore. - (void)tadonadcolsed:(tadcore *)tadcore - (void)tadonadexpanded:(tadcore *)tadcore. - (void)tadonadexpandclose:(tadcore *)tadcore. - (void)tadonadresized:(tadcore *)tadcore. - (void)tadonadresizeclosed:(tadcore *)tadcore. 15
- (void)tadcore:(tadcore *)tadcore tadfailed:(taderrorcode)errorcode.. TadErrorCode. NO_AD ( ) MISSING_REQUIRED_PARAMETER_ERROR ( ) INVAILD_PARAMETER_ERROR ( ) UNSUPPORTED_DEVICE_ERROR ( ) CLIENTID_DENIED_ERROR ( Client ID ) INVAILD_SLOT_NUMBER ( ) CONNECTION_ERROR ( ) NETWORK_ERROR ( ) RECEIVE_AD_ERROR ( ) LOAD_ERROR (SDK ) SHOW_ERROR ( ) INTERNAL_ERROR ( ) 16
6. Coding Guide TadCore. TadCore Class. TadCore.! #import TadCore.h TadCoreDelegate.! <TadDelegate> TadCore.! TadCore *tadcore0; TadCore.! @Param1 : (UIView *)! @Param2 : (id <TadDelegate>)! tadcore0 = [[TadCore alloc] initwithseedview:self.view delegate:self];.! // Tad clientid ( )! [tadcore0 setclientid:@ IX0000000 ];! //. ( )! [tadcore0 setslotno:tadslotinline];! //.! [tadcore0 setistest:yes]; 17
! // Tad offset.! [tadcore0 setoffset:cgpointmake(0.0f, 0.0f)];! // Tad.! [tadcore0 setrefershinterval:30.0f];! // Tad.! [tadcore0 setlogmode:yes]; viewwillappear, viewwilldisappear. <.> - (void)viewwillappear:(bool)animated {! [super viewwillappear:animated];! if(tadcore0) {!! [tadcore0 viewwillappear:animated];! } } - (void)viewwilldisappear:(bool)animated {! [super viewwilldisappear:animated];! if(tadcore0) {!! [tadcore0 viewwilldisappear:animated];! } } 18
.!! //! [tadcore0 getadvertisement]; removead.! [tadcore0 removead]; 19
7.Test Client ID ios Tad SDK Client ID. (.)! // Client ID ( )! [tadcore0 setclientid:@ IX0000000 ];! //. ( )! [tadcore0 setslotno:tadslotinline];! //.! [tadcore0 setistest:yes]; Test Client ID Slot 1-5 IX00042FA TadSlotInline 2-5 IX00042FC TadSlotInline 3-5 IX00042FE TadSlotInline 1-4 IX0004300 TadSlotInline 2-5 IX0004302 TadSlotInline 3-5 IX0004304 TadSlotInline 1-4 IX1004306 TadSlotInterstitial 2-5 IX1004308 TadSlotInterstitial 3-5 IX100430A TadSlotInterstitial 20