Skip to content

Commit

Permalink
fixed issue in tracking auth status
Browse files Browse the repository at this point in the history
  • Loading branch information
wainwrightmark committed Feb 1, 2024
1 parent fc16659 commit 460867f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/admob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Admob {

/// Confirm requestTrackingAuthorization status (iOS >14)
#[cfg(all(feature = "admob_plugin", any(feature = "ios", feature = "android")))]
pub async fn tracking_authorization_status() -> Result<TrackingAuthorizationStatus, Error> {
pub async fn tracking_authorization_status() -> Result<TrackingAuthorizationStatusInterface, Error> {
run_unit_value(admob_tracking_authorization_status).await
}

Expand Down Expand Up @@ -136,7 +136,7 @@ impl Admob {
}

#[cfg(all(feature = "admob_plugin", any(feature = "ios", feature = "android")))]
/// Emits after trying to prepare and Interstitial, when it is loaded and ready to be show
/// Emits after trying to prepare an Interstitial, when it is loaded and ready to be show
pub async fn add_interstitial_ad_loaded_listener<F: Fn(AdLoadInfo) + 'static>(
func: F,
) -> Result<PluginListenerHandle, Error> {
Expand All @@ -161,7 +161,7 @@ impl Admob {

#[cfg(all(feature = "admob_plugin", any(feature = "ios", feature = "android")))]
/// Emits when the Interstitial ad is failed to show
pub async fn add_interstitial_ad_failed_to_show_listener<F: Fn(AdMobError) + 'static>(
pub async fn add_interstitial_failed_to_show_listener<F: Fn(AdMobError) + 'static>(
func: F,
) -> Result<PluginListenerHandle, Error> {
listen_async(func, "interstitialAdFailedToShow", admob_add_listener).await
Expand Down Expand Up @@ -342,6 +342,14 @@ pub struct AdMobError {
pub message: String,
}

impl std::fmt::Display for AdMobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.message)
}
}

impl std::error::Error for AdMobError {}

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TypedBuilder)]
#[serde(rename_all = "camelCase")]
pub struct AdmobConsentInfo {
Expand Down

0 comments on commit 460867f

Please sign in to comment.