Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
b80c780
ios pigeons
bparrishMines Jun 20, 2024
0501906
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jun 20, 2024
8cf10f4
add addsiplaycontainer
bparrishMines Jun 20, 2024
f262b71
fix pigeon and implement rest of platform interface
bparrishMines Jun 20, 2024
bc6ca1f
add platform thing and update stuff
bparrishMines Jun 20, 2024
e1d33e8
setup to run example
bparrishMines Jun 21, 2024
7a2a567
fix open class errors
bparrishMines Jun 21, 2024
5a5bb31
implement sdk
bparrishMines Jun 21, 2024
cafe9e9
fix bugs and use workaround
bparrishMines Jun 21, 2024
35d42e1
formatting
bparrishMines Jun 21, 2024
87947af
set issue at delay
bparrishMines Jun 25, 2024
28b23fd
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jun 26, 2024
439263f
undo conditional
bparrishMines Jun 26, 2024
b02f27c
unused import
bparrishMines Jun 26, 2024
3e6d305
version bump
bparrishMines Jun 26, 2024
29b4840
license
bparrishMines Jun 26, 2024
9994b83
some tests added
bparrishMines Jun 26, 2024
161e0bf
test work
bparrishMines Jun 27, 2024
2253f7b
some added tests that are broken
bparrishMines Jun 27, 2024
a50610c
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jun 27, 2024
f762faf
formatting and add a protocols for apisc
bparrishMines Jun 28, 2024
2a93e74
update tests to passg
bparrishMines Jun 28, 2024
786a665
ads loader delegate tests
bparrishMines Jun 28, 2024
2053d6f
more tests
bparrishMines Jul 1, 2024
f9f5aac
more tests
bparrishMines Jul 1, 2024
8067944
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 1, 2024
bff367c
more more tests
bparrishMines Jul 1, 2024
823c2a4
rest of the native swift tests
bparrishMines Jul 1, 2024
a0f32bb
fix doc
bparrishMines Jul 1, 2024
2a472d9
change to getView
bparrishMines Jul 2, 2024
062c990
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 2, 2024
00a289e
change to IOS instead of ios
bparrishMines Jul 2, 2024
655cd9c
undo change to getView
bparrishMines Jul 2, 2024
a8c497c
move delegate impl to interface delegate
bparrishMines Jul 2, 2024
b7f73c0
fix names and move to static method
bparrishMines Jul 2, 2024
66bbcde
fix class name
bparrishMines Jul 3, 2024
50161d0
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 5, 2024
7b85a75
test ios ad display container and add required layoutDirection
bparrishMines Jul 5, 2024
8b5882f
adsloader
bparrishMines Jul 5, 2024
4065da5
test for ads loader
bparrishMines Jul 5, 2024
c7fc154
ads manager tests
bparrishMines Jul 5, 2024
f7c3c57
start of delegate tests
bparrishMines Jul 5, 2024
345ee71
add instance manager to tests and finish onadevent tests
bparrishMines Jul 5, 2024
b2a2dc7
finish tests
bparrishMines Jul 5, 2024
6e5c2d8
formatting
bparrishMines Jul 5, 2024
6b6bd07
comment out pigeon
bparrishMines Jul 5, 2024
9188759
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 5, 2024
9b0ab5f
fix dartPluginClass name
bparrishMines Jul 5, 2024
03a3092
fix license
bparrishMines Jul 5, 2024
b7f551e
try ad dep to swift package manager
bparrishMines Jul 5, 2024
c639dc6
add adsmanager methods
bparrishMines Jul 5, 2024
7ef0081
try correct name maybe
bparrishMines Jul 5, 2024
f4c4c71
try name again maybe
bparrishMines Jul 5, 2024
79cac5a
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 10, 2024
58f0aab
use product instead
bparrishMines Jul 10, 2024
9ab595b
import uikit
bparrishMines Jul 10, 2024
0015633
change binary messenger name and add comment on workaround
bparrishMines Jul 10, 2024
0bdd871
change binary messenger name and add comment on workaround
bparrishMines Jul 10, 2024
f35004b
class docs for all delegate classes
bparrishMines Jul 10, 2024
b4e9b76
wildcards
bparrishMines Jul 10, 2024
4647293
add layout direction support
bparrishMines Jul 10, 2024
c4560c1
add the request agent
bparrishMines Jul 10, 2024
c03e146
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 10, 2024
17153b1
use upToNextMajor
bparrishMines Jul 10, 2024
f78b103
uncomment ios pigeon
bparrishMines Jul 10, 2024
d631f2e
comment
bparrishMines Jul 10, 2024
6e7267a
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 22, 2024
4d3f5f6
pr comments
bparrishMines Jul 22, 2024
28a6e69
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 22, 2024
76490fd
android utils
bparrishMines Jul 23, 2024
830b3ef
add value observing, update to latest pigeon implementation, add uiwi…
bparrishMines Jul 25, 2024
9e2be27
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 25, 2024
2861f19
try calling it base object i guess
bparrishMines Jul 25, 2024
582e65e
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 28, 2024
565a9bf
change back to nsobject
bparrishMines Jul 29, 2024
8f4f904
failureeee
bparrishMines Jul 29, 2024
229cc84
use view did appear
bparrishMines Jul 29, 2024
abdce88
fix maybe
bparrishMines Jul 29, 2024
153d1b3
fixgit diffgit diff
bparrishMines Jul 29, 2024
fc80337
update tests
bparrishMines Jul 29, 2024
6e523e1
ad tag check
bparrishMines Jul 29, 2024
152f01c
hide pigeon
bparrishMines Jul 29, 2024
13185b8
fix tests
bparrishMines Jul 29, 2024
40cf597
fix tests again
bparrishMines Jul 29, 2024
9303fbb
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 29, 2024
ef22e30
add ignore calls to dart flag
bparrishMines Jul 31, 2024
2eeac59
Merge branch 'main' of github.com:flutter/packages into ima_ios
bparrishMines Jul 31, 2024
29fc868
fix integration test
bparrishMines Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add addsiplaycontainer
  • Loading branch information
bparrishMines committed Jun 20, 2024
commit 8cf10f475d25d160dde609178a6478fee39fa6b7
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Autogenerated from Pigeon (v20.1.0), do not edit directly.
// See also: https://pub.dev/packages/pigeon

import Foundation

#if os(iOS)
import Flutter
#elseif os(macOS)
import FlutterMacOS
#else
#error("Unsupported platform.")
#endif

/// Error class for passing custom error details to Dart side.
final class PigeonError: Error {
let code: String
let message: String?
let details: Any?

init(code: String, message: String?, details: Any?) {
self.code = code
self.message = message
self.details = details
}

var localizedDescription: String {
return
"PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>")"
}
}

private func isNullish(_ value: Any?) -> Bool {
return value is NSNull || value == nil
}

private func nilOrValue<T>(_ value: Any?) -> T? {
if value is NSNull { return nil }
return value as! T?
}

/// Possible error types while loading or playing ads.
///
/// See https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Enums/IMAErrorType.html.
enum AdErrorType: Int {
/// An error occurred while loading the ads.
case loadingFailed = 0
/// An error occurred while playing the ads.
case adPlayingFailed = 1
/// An unexpected error occurred while loading or playing the ads.
///
/// This may mean that the SDK wasn’t loaded properly or the wrapper doesn't
/// recognize this value.
case unknown = 2
}

/// Possible error codes raised while loading or playing ads.
///
/// See https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Enums/IMAErrorCode.html.
enum AdErrorCode: Int {
/// The ad slot is not visible on the page.
case adslotNotVisible = 0
/// Generic invalid usage of the API.
case apiError = 1
/// A companion ad failed to load or render.
case companionAdLoadingFailed = 2
/// Content playhead was not passed in, but list of ads has been returned from
/// the server.
case contentPlayheadMissing = 3
/// There was an error loading the ad.
case failedLoadingAd = 4
/// There was a problem requesting ads from the server.
case failedToRequestAds = 5
/// Invalid arguments were provided to SDK methods.
case invalidArguments = 6
/// The version of the runtime is too old.
case osRuntimeTooOld = 7
/// Ads list response was malformed.
case playlistMalformedResponse = 8
/// Listener for at least one of the required vast events was not added.
case requiredListenersNotAdded = 9
/// There was an error initializing the stream.
case streamInitializationFailed = 10
/// An unexpected error occurred and the cause is not known.
case unknownError = 11
/// No assets were found in the VAST ad response.
case vastAssetNotFound = 12
/// A VAST response containing a single `<VAST>` tag with no child tags.
case vastEmptyResponse = 13
/// At least one VAST wrapper loaded and a subsequent wrapper or inline ad
/// load has resulted in a 404 response code.
case vastInvalidUrl = 14
/// Assets were found in the VAST ad response for a linear ad, but none of
/// them matched the video player's capabilities.
case vastLinearAssetMismatch = 15
/// The VAST URI provided, or a VAST URI provided in a subsequent Wrapper
/// element, was either unavailable or reached a timeout, as defined by the
/// video player.
case vastLoadTimeout = 16
/// The ad response was not recognized as a valid VAST ad.
case vastMalformedResponse = 17
/// Failed to load media assets from a VAST response.
case vastMediaLoadTimeout = 18
/// The maximum number of VAST wrapper redirects has been reached.
case vastTooManyRedirects = 19
/// Trafficking error.
///
/// Video player received an ad type that it was not expecting and/or cannot
/// display.
case vastTraffickingError = 20
/// Another VideoAdsManager is still using the video.
case videoElementUsed = 21
/// A video element was not specified where it was required.
case videoElementRequired = 22
/// There was an error playing the video ad.
case videoPlayError = 23
}

/// Different event types sent by the IMAAdsManager to its delegate.
///
/// See https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Enums/IMAAdEventType.html.
enum AdEventType: Int {
/// Fired the first time each ad break ends.
case adBreakEnded = 0
/// Fired when an ad break will not play back any ads.
case adBreakFetchError = 1
/// Fired when an ad break is ready.
case adBreakReady = 2
/// Fired first time each ad break begins playback.
case adBreakStarted = 3
/// Fired every time the stream switches from advertising or slate to content.
case adPeriodEnded = 4
/// Fired every time the stream switches from content to advertising or slate.
case adPeriodStarted = 5
/// All valid ads managed by the ads manager have completed or the ad response
/// did not return any valid ads.
case allAdsCompleted = 6
/// Fired when an ad is clicked.
case clicked = 7
/// Single ad has finished.
case completed = 8
/// Cuepoints changed for VOD stream (only used for dynamic ad insertion).
case cuepointsChanged = 9
/// First quartile of a linear ad was reached.
case firstQuartile = 10
/// The user has closed the icon fallback image dialog.
case iconFallbackImageClosed = 11
/// The user has tapped an ad icon.
case iconTapped = 12
/// An ad was loaded.
case loaded = 13
/// A log event for the ads being played.
case log = 14
/// Midpoint of a linear ad was reached.
case midpoint = 15
/// Ad paused.
case pause = 16
/// Ad resumed.
case resume = 17
/// Fired when an ad was skipped.
case skipped = 18
/// Fired when an ad starts playing.
case started = 19
/// Stream request has loaded (only used for dynamic ad insertion).
case streamLoaded = 20
/// Stream has started playing (only used for dynamic ad insertion).
case streamStarted = 21
/// Ad tapped.
case tapped = 22
/// Third quartile of a linear ad was reached..
case thirdQuartile = 23
/// The event type is not recognized by this wrapper.
case unknown = 24
}
private class InteractiveMediaAdsLibraryPigeonCodecReader: FlutterStandardReader {
override func readValue(ofType type: UInt8) -> Any? {
switch type {
case 129:
var enumResult: AdErrorType? = nil
let enumResultAsInt: Int? = nilOrValue(self.readValue() as? Int)
if let enumResultAsInt = enumResultAsInt {
enumResult = AdErrorType(rawValue: enumResultAsInt)
}
return enumResult
case 130:
var enumResult: AdErrorCode? = nil
let enumResultAsInt: Int? = nilOrValue(self.readValue() as? Int)
if let enumResultAsInt = enumResultAsInt {
enumResult = AdErrorCode(rawValue: enumResultAsInt)
}
return enumResult
case 131:
var enumResult: AdEventType? = nil
let enumResultAsInt: Int? = nilOrValue(self.readValue() as? Int)
if let enumResultAsInt = enumResultAsInt {
enumResult = AdEventType(rawValue: enumResultAsInt)
}
return enumResult
default:
return super.readValue(ofType: type)
}
}
}

private class InteractiveMediaAdsLibraryPigeonCodecWriter: FlutterStandardWriter {
override func writeValue(_ value: Any) {
if let value = value as? AdErrorType {
super.writeByte(129)
super.writeValue(value.rawValue)
} else if let value = value as? AdErrorCode {
super.writeByte(130)
super.writeValue(value.rawValue)
} else if let value = value as? AdEventType {
super.writeByte(131)
super.writeValue(value.rawValue)
} else {
super.writeValue(value)
}
}
}

private class InteractiveMediaAdsLibraryPigeonCodecReaderWriter: FlutterStandardReaderWriter {
override func reader(with data: Data) -> FlutterStandardReader {
return InteractiveMediaAdsLibraryPigeonCodecReader(data: data)
}

override func writer(with data: NSMutableData) -> FlutterStandardWriter {
return InteractiveMediaAdsLibraryPigeonCodecWriter(data: data)
}
}

class InteractiveMediaAdsLibraryPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable {
static let shared = InteractiveMediaAdsLibraryPigeonCodec(readerWriter: InteractiveMediaAdsLibraryPigeonCodecReaderWriter())
}

Loading