Skip to content

Commit 5fb295c

Browse files
author
Nikolaï Roycourt
committed
v4.0.5-beta
1 parent 4a76431 commit 5fb295c

22 files changed

+6369
-4332
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# TeadsSDK-ios
2+
3+
4+
Teads allows you to integrate a single SDK into your app, and serve premium branded "outstream" video ads from Teads SSP ad server. This demo app includes Teads iOS library and is showing integration examples.
5+
6+
## Run the sample app
7+
8+
Clone this repository, open it with Xcode, and run project.
9+
10+
## Download the Teads SDK iOS library
11+
12+
Teads SDK is currently distributed through CocoaPods. It include everything you need to serve "outstream" video ads.
13+
14+
```
15+
target 'YourProject' do
16+
pod 'TeadsSDK-beta', '4.0.5-beta'
17+
end
18+
```
19+
20+
In terminal in the directory containing your project's `.xcodeproj` file and the Podfile, run `pod install` command. This will install Teads SDK along with our needed dependencies.
21+
22+
```
23+
$ pod install --repo-update
24+
```
25+
26+
## Integration Documentation
27+
28+
Integration instructions are available on [Teads SDK Documentation](http://mobile.teads.tv/sdk/documentation/v4).

TeadsSDK-beta.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "TeadsSDK-beta"
4-
s.version = "4.0.0-beta"
4+
s.version = "4.0.5-beta"
55
s.summary = "Teads' iOS SDK"
66

77
s.description = <<-DESC
@@ -13,7 +13,7 @@ s.ios.deployment_target = "9.0"
1313
s.homepage = "https://github.com/teads/TeadsSDK-iOS"
1414
s.license = "Apache 2.0"
1515
s.author = { "Teads" => "[email protected]" }
16-
s.source = { :git => 'https://github.com/teads/TeadsSDK-iOS.git', :branch => 'TeadsSDK4.0.0-beta', :tag => "v#{s.version}"}
16+
s.source = { :git => 'https://github.com/teads/TeadsSDK-iOS.git', :branch => 'TeadsSDK-v4-beta', :tag => "v#{s.version}"}
1717

1818
s.requires_arc = true
1919
s.preserve_paths = 'TeadsSDK.framework'

TeadsSDK.framework/42861BD3-C3B7-31D3-8A00-9678A7356A13.bcsymbolmap renamed to TeadsSDK.framework/1BE8D86A-F0FA-3B91-B8FE-8E57971A0D34.bcsymbolmap

Lines changed: 2102 additions & 1439 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/164DEFB5-37C2-3D11-8BCA-B5F5BF93EEFF.bcsymbolmap renamed to TeadsSDK.framework/B09131B0-D553-3F4C-818A-C1D3B6E351AB.bcsymbolmap

Lines changed: 2102 additions & 1439 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/4BA22F55-C3A3-3593-B759-C58B6B83F7E1.bcsymbolmap renamed to TeadsSDK.framework/E20899B4-AAF4-3FCB-86E5-B863590F8A1D.bcsymbolmap

Lines changed: 2079 additions & 1422 deletions
Large diffs are not rendered by default.
Binary file not shown.
-1.92 KB
Binary file not shown.

TeadsSDK.framework/Headers/TeadsSDK-Swift.h

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,24 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
183183
# pragma pop_macro("any")
184184
#endif
185185

186+
typedef SWIFT_ENUM(NSInteger, AdErrorCode) {
187+
AdErrorCodeErrorNoSlot = 1,
188+
AdErrorCodeErrorNetwork = 2,
189+
AdErrorCodeErrorNotFilled = 3,
190+
AdErrorCodeErrorBadResponse = 4,
191+
AdErrorCodeErrorVastError = 5,
192+
AdErrorCodeErrorUserIdMissing = 6,
193+
AdErrorCodeErrorInternal = 7,
194+
};
195+
186196

187197
SWIFT_CLASS("_TtC8TeadsSDK12AdFailReason")
188198
@interface AdFailReason : NSObject
199+
/// Error code
200+
@property (nonatomic) enum AdErrorCode errorCode;
201+
/// String that describes the error reason
202+
@property (nonatomic, copy) NSString * _Nonnull errorMessage;
203+
- (nonnull instancetype)initWithErrorCode:(enum AdErrorCode)errorCode errorMessage:(NSString * _Nonnull)errorMessage OBJC_DESIGNATED_INITIALIZER;
189204
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
190205
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
191206
@end
@@ -208,7 +223,7 @@ SWIFT_PROTOCOL("_TtP8TeadsSDK13TFAAdDelegate_")
208223
/// Called when you did not get and ad
209224
/// \param ad The teadsAd object
210225
///
211-
/// \param adFailReason adFailReason object that contains an error code and an error message
226+
/// \param adFailReason AdFailReason object that contains an error code and an error message
212227
///
213228
- (void)didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
214229
/// Called when the ad should be closed
@@ -247,6 +262,8 @@ SWIFT_PROTOCOL("_TtP8TeadsSDK13TFAAdDelegate_")
247262
/// Called when ad changes volume state
248263
/// \param ad The teadsAd object
249264
///
265+
/// \param muted true if the sound is off false otherwise
266+
///
250267
- (void)adDidChangeVolume:(TFACustomAdView * _Nonnull)ad muted:(BOOL)muted;
251268
@end
252269

@@ -263,7 +280,13 @@ SWIFT_CLASS("_TtC8TeadsSDK15TFACustomAdView")
263280
@property (nonatomic, readonly) BOOL isPlaying;
264281
/// Ad sound enabled state
265282
@property (nonatomic, readonly) BOOL isSoundActive;
283+
@property (nonatomic, weak) id <TFAAdDelegate> _Nullable delegate;
266284
@property (nonatomic, copy) NSString * _Nullable pid;
285+
@property (nonatomic) CGRect bounds;
286+
@property (nonatomic) CGRect frame;
287+
- (void)awakeFromNib;
288+
- (void)willMoveToSuperview:(UIView * _Nullable)newSuperview;
289+
- (void)didMoveToSuperview;
267290
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
268291
/// Init TFACustomAdView by prodiving the pId and optional parameters
269292
/// \param pid The Placement ID
@@ -275,11 +298,6 @@ SWIFT_CLASS("_TtC8TeadsSDK15TFACustomAdView")
275298
/// The TeadsAd instance
276299
- (nonnull instancetype)initWithPid:(NSString * _Nonnull)pid delegate:(id <TFAAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
277300
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
278-
@property (nonatomic) CGRect bounds;
279-
@property (nonatomic) CGRect frame;
280-
- (void)awakeFromNib;
281-
- (void)willMoveToSuperview:(UIView * _Nullable)newSuperview;
282-
- (void)didMoveToSuperview;
283301
/// Request an ad from Teads ad server
284302
/// \param teadsAdSettings Optionnal <code>TeadsAdSettings</code> to define custom settings
285303
///
@@ -305,13 +323,20 @@ typedef SWIFT_ENUM(NSInteger, TeadsAdPlaybackState) {
305323
TeadsAdPlaybackStatePlaybackStatePaused = 2,
306324
};
307325

326+
@protocol TFAInterstitialAdDelegate;
308327

309328
SWIFT_CLASS("_TtC8TeadsSDK17TFAInterstitialAd")
310329
@interface TFAInterstitialAd : NSObject <TFAAdDelegate>
330+
@property (nonatomic, weak) id <TFAInterstitialAdDelegate> _Nullable delegate;
331+
@property (nonatomic) BOOL isShown;
332+
- (nonnull instancetype)initWithPid:(NSString * _Nonnull)pid delegate:(id <TFAInterstitialAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
333+
- (void)loadWithSettings:(TeadsAdSettings * _Nullable)settings;
334+
- (void)show;
311335
- (void)didReceiveAd:(TFACustomAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
312336
- (void)didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
313337
- (void)adClose:(TFACustomAdView * _Nonnull)ad userAction:(BOOL)userAction;
314338
- (void)adError:(TFACustomAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
339+
- (void)adBrowserDidOpen:(TFACustomAdView * _Nonnull)ad;
315340
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
316341
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
317342
@end
@@ -321,43 +346,56 @@ SWIFT_PROTOCOL("_TtP8TeadsSDK25TFAInterstitialAdDelegate_")
321346
@protocol TFAInterstitialAdDelegate
322347
- (void)interstitialDidReceiveAd:(TFAInterstitialAd * _Nonnull)ad;
323348
- (void)interstitial:(TFAInterstitialAd * _Nonnull)ad didFailToReceiveAdWithError:(NSString * _Nonnull)error;
349+
@optional
350+
- (void)interstitialWillOpen:(TFAInterstitialAd * _Nonnull)ad;
351+
- (void)interstitialWillClose:(TFAInterstitialAd * _Nonnull)ad;
324352
- (void)interstitialDidOpen:(TFAInterstitialAd * _Nonnull)ad;
325353
- (void)interstitialDidClose:(TFAInterstitialAd * _Nonnull)ad;
326354
- (void)interstitialWillLeaveApplication:(TFAInterstitialAd * _Nonnull)ad;
355+
- (void)interstitialDidClickthrough:(TFAInterstitialAd * _Nonnull)ad;
327356
@end
328357

329358

359+
SWIFT_CLASS("_TtC8TeadsSDK9TFAReward")
360+
@interface TFAReward : NSObject
361+
@property (nonatomic, copy) NSString * _Nullable type;
362+
@property (nonatomic) double amount;
363+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
364+
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
365+
@end
366+
367+
@protocol TFARewardedAdDelegate;
368+
330369
SWIFT_CLASS("_TtC8TeadsSDK13TFARewardedAd")
331370
@interface TFARewardedAd : NSObject <TFAAdDelegate>
371+
@property (nonatomic, weak) id <TFARewardedAdDelegate> _Nullable delegate;
372+
@property (nonatomic) BOOL isShown;
373+
- (nonnull instancetype)initWithPid:(NSString * _Nonnull)pid delegate:(id <TFARewardedAdDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
374+
- (void)loadWithSettings:(TeadsAdSettings * _Nullable)settings;
375+
- (void)show;
332376
- (void)didReceiveAd:(TFACustomAdView * _Nonnull)ad adRatio:(CGFloat)adRatio;
333377
- (void)didFailToReceiveAd:(TFACustomAdView * _Nonnull)ad adFailReason:(AdFailReason * _Nonnull)adFailReason;
334378
- (void)adClose:(TFACustomAdView * _Nonnull)ad userAction:(BOOL)userAction;
335379
- (void)adError:(TFACustomAdView * _Nonnull)ad errorMessage:(NSString * _Nonnull)errorMessage;
336380
- (void)adPlaybackChange:(TFACustomAdView * _Nonnull)ad state:(enum TeadsAdPlaybackState)state;
381+
- (void)adBrowserDidOpen:(TFACustomAdView * _Nonnull)ad;
337382
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
338383
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
339384
@end
340385

341386

342387
SWIFT_PROTOCOL("_TtP8TeadsSDK21TFARewardedAdDelegate_")
343388
@protocol TFARewardedAdDelegate
344-
@optional
345-
- (void)rewarded:(TFARewardedAd * _Nonnull)rewardedAd didRewardUserWith:(CGFloat)reward;
389+
- (void)rewarded:(TFARewardedAd * _Nonnull)rewardedAd didRewardUserWith:(TFAReward * _Nullable)reward;
346390
- (void)rewarded:(TFARewardedAd * _Nonnull)rewardedAd didFailToReceiveAdWithError:(NSString * _Nonnull)didFailToReceiveAdWithError;
347391
- (void)rewardedAdDidReceive:(TFARewardedAd * _Nonnull)rewardedAd;
392+
@optional
348393
- (void)rewardedAdDidOpen:(TFARewardedAd * _Nonnull)rewardedAd;
349394
- (void)rewardedAdDidStartPlaying:(TFARewardedAd * _Nonnull)rewardedAd;
350395
- (void)rewardedAdDidCompletePlaying:(TFARewardedAd * _Nonnull)rewardedAd;
351396
- (void)rewardedAdDidClose:(TFARewardedAd * _Nonnull)rewardedAd;
352397
- (void)rewardedAdWillLeaveApplication:(TFARewardedAd * _Nonnull)rewardedAd;
353-
@end
354-
355-
356-
/// Class that contains teads ad response from the server
357-
SWIFT_CLASS("_TtC8TeadsSDK15TeadsAdResponse")
358-
@interface TeadsAdResponse : NSObject
359-
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
360-
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
398+
- (void)rewardedAdDidClickthrough:(TFARewardedAd * _Nonnull)rewardedAd;
361399
@end
362400

363401

@@ -368,6 +406,7 @@ SWIFT_CLASS("_TtC8TeadsSDK15TeadsAdSettings")
368406
- (void)enableLigtEndScreen;
369407
- (void)disableMediaPreload;
370408
- (void)pageUrl:(NSString * _Nonnull)urlString;
409+
- (nonnull instancetype)initWithBuild:(SWIFT_NOESCAPE void (^ _Nonnull)(TeadsAdSettings * _Nonnull))build OBJC_DESIGNATED_INITIALIZER;
371410
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
372411
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
373412
@end

TeadsSDK.framework/Headers/TeadsSDK.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,5 @@
88

99
#import <UIKit/UIKit.h>
1010

11-
//! Project version number for TeadsSDK.
12-
FOUNDATION_EXPORT double TeadsSDKVersionNumber;
13-
14-
//! Project version string for TeadsSDK.
15-
FOUNDATION_EXPORT const unsigned char TeadsSDKVersionString[];
16-
1711
// In this header, you should import all the public headers of your framework using statements like #import <TeadsSDK/PublicHeader.h>
1812

TeadsSDK.framework/Info.plist

2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)