Skip to content

Commit

Permalink
Merge pull request #239 from THEOplayer/bugfix/tvos_build_issues
Browse files Browse the repository at this point in the history
Bugfix/tvos build issues
  • Loading branch information
wvanhaevre authored Dec 12, 2023
2 parents a711603 + d08947d commit d010cb0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

- Fixed an issue on iOS & Android where timestamps in ad events were not consistently defined in seconds.
- Fixed an issue on tvOS where unknown AdIntegrationKind values resulted in build issues.

## [3.3.1] - 23-12-11

Expand Down
6 changes: 5 additions & 1 deletion example/ios/ReactNativeTHEOplayer/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#import <THEOplayerSDK/THEOplayerSDK-Swift.h>
#endif

#if !TARGET_OS_TV
#import <GoogleCast/GoogleCast.h>
#endif

@implementation AppDelegate

Expand All @@ -32,12 +34,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];


#if !TARGET_OS_TV
NSString *receiverAppID = @"CC1AD845"; // default receiver
GCKDiscoveryCriteria *criteria = [[GCKDiscoveryCriteria alloc] initWithApplicationID:receiverAppID];
GCKCastOptions* options = [[GCKCastOptions alloc] initWithDiscoveryCriteria:criteria];
options.startDiscoveryAfterFirstTapOnCastButton = false;
[GCKCastContext setSharedInstanceWithOptions:options];
#endif

return YES;
}
Expand Down
2 changes: 2 additions & 0 deletions ios/THEOplayerRCTTypeUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ class THEOplayerRCTTypeUtils {

class func adIntegrationKind(_ integration: String) -> AdIntegrationKind {
switch integration {
#if os(iOS)
case "theo":
return AdIntegrationKind.theo
case "freewheel":
return AdIntegrationKind.freewheel
#endif
case "google-ima":
return AdIntegrationKind.google_ima
case "google-dai":
Expand Down

0 comments on commit d010cb0

Please sign in to comment.