googleads / googleads-ima-tvos-client-side

5 stars 8 forks source link

The tvOS BasicExample Objective-C project does not compile out of the box #7

Open jrtibbetts opened 4 years ago

jrtibbetts commented 4 years ago

Neither the Objective-C nor Swift BasicExample projects compile as-is. This ticket will focus on the tvOS-specific issues.

  1. No Podfile is included.

  2. The sample app target (9.2) is lower than the minimum OS version (10.0) the current SDK (4.2.3) requires.

  3. Adding a Podfile that contains only

    source 'https://github.com/CocoaPods/Specs.git'
    
    platform :tvos, '9.2'
    
    target "BasicExample" do
      pod 'GoogleAds-IMA-tvOS-SDK'
    end

    fails to compile with the following errors:

    • ObjectiveC/BasicExample/app/ViewController.m:99:60: No visible @interface for 'IMAAdDisplayContainer' declares the selector 'initWithAdContainer:viewController:'
    • ObjectiveC/BasicExample/app/ViewController.m:122:39: Property 'focusEnvironment' not found on object of type 'IMAAdDisplayContainer *'
    • ObjectiveC/BasicExample/app/ViewController.m:153:10: Use of undeclared identifier 'kIMAAdEvent_ICON_FALLBACK_IMAGE_CLOSED'
jrtibbetts commented 4 years ago
ObjectiveC/BasicExample/app/ViewController.m:99:60: No visible @interface for 'IMAAdDisplayContainer' declares the selector 'initWithAdContainer:viewController:

can be fixed by dropping the second argument.

ObjectiveC/BasicExample/app/ViewController.m:122:39: Property 'focusEnvironment' not found on object of type 'IMAAdDisplayContainer *'

I don't see a reasonable replacement for this. (Incidentally, this is related to the problem we're having that led me try the BasicExample app in the first place--the Google IMA player often ignores play/pause presses, or play/pause presses get ignored by our player after a Google IMA ad has finished playing. If an ad never played, then our player receives the presses as expected.)

ObjectiveC/BasicExample/app/ViewController.m:153:10: Use of undeclared identifier 'kIMAAdEvent_ICON_FALLBACK_IMAGE_CLOSED'

can perhaps be removed entirely.