Skip to content

Commit

Permalink
Merge branch 'main' into MOBILE-4620
Browse files Browse the repository at this point in the history
  • Loading branch information
crow committed Aug 29, 2024
2 parents 4ec7c79 + 2b13e6e commit 30a6527
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 14 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Flutter Plugin Changelog

## Version 7.7.0 - August 07, 2024
Minor release that updates Android SDK to 18.1.5 and iOS SDK to 18.7.1 and fixes test devices audience check and holdout group experiments displays.
## Version 7.7.1 - August 16, 2024
Patch release that adds a message center message list refresh operation on iOS. This allows message center messages to properly display when launched from a push while the iOS app is backgrounded. iOS apps that open message center messages directly from push notifications are encouraged to update.

### Changes
- Updated Android SDK to 18.1.5.
- Updated iOS SDK to 18.7.1.
- Refresh message center messages when message is initially unavailable on iOS.

## Version 7.7.0 - August 13, 2024
Minor release that fixes test devices audience check, holdout group experiments displays and in-app experience displays when resuming from a paused state. Apps that use in-app experiences are encouraged to update.

### Changes
- Updated Android SDK to 18.1.6.
- Updated iOS SDK to 18.7.2.
- Fixed test devices audience check.
- Fixed holdout group experiments displays.
- Fixed in-app experience displays when resuming from a paused state.

## Version 7.6.0 - July 11, 2024
Minor release that updates the Android SDK to 18.1.1 and the iOS SDK to 18.5.0.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
ext.kotlin_version = '1.9.0'
ext.coroutine_version = '1.5.2'
ext.datastore_preferences_version = '1.1.1'
ext.airship_framework_proxy_version = '7.1.1'
ext.airship_framework_proxy_version = '7.1.2'

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package com.airship.flutter

class AirshipPluginVersion {
companion object {
const val AIRSHIP_PLUGIN_VERSION = "7.7.0"
const val AIRSHIP_PLUGIN_VERSION = "7.7.1"
}
}
24 changes: 20 additions & 4 deletions ios/Classes/AirshipInboxMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,24 @@ class AirshipInboxMessageView : NSObject, FlutterPlatformView, NativeBridgeDeleg
details: nil))
return
}

let inbox = MessageCenter.shared.inbox

let message = await inbox.message(forID: messageId)

if message == nil {
/// Attempt a refresh is the message isn't available - as can happen when launched from a push
let success = try? await inbox.refreshMessages(timeout: 100)

/// If message is nil and we fail to refresh, throw error
if success == false {
result(FlutterError(code:"InvalidMessage",
message:"Unable to load message: \(messageId), message unavailable and message refresh failed.",
details:nil))
return
}
}

if let message = await inbox.message(forID: messageId) {
var request = URLRequest(url: message.bodyURL)
let user = await MessageCenter.shared.inbox.user
Expand All @@ -101,12 +117,12 @@ class AirshipInboxMessageView : NSObject, FlutterPlatformView, NativeBridgeDeleg


} else {

/// If refresh attempt succeeds and we still don't have a message
result(FlutterError(code:"InvalidMessage",
message:"Unable to load message: \(messageId))",
message:"Unable to load message after successful inbox refresh: \(messageId))",
details:nil))
return
}

}

func view() -> UIView {
Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/AirshipPluginVersion.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

class AirshipPluginVersion {
static let pluginVersion = "7.7.0"
static let pluginVersion = "7.7.1"
}
4 changes: 2 additions & 2 deletions ios/airship_flutter.podspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

AIRSHIP_FLUTTER_VERSION="7.7.0"
AIRSHIP_FLUTTER_VERSION="7.7.1"

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
Expand All @@ -20,6 +20,6 @@ Airship flutter plugin.
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.ios.deployment_target = "14.0"
s.dependency "AirshipFrameworkProxy", "../../../../airship-mobile-framework-proxy"
s.dependency "AirshipFrameworkProxy", "7.1.2"
end

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: airship_flutter
description: "Cross-platform plugin interface for the native Airship iOS and Android SDKs. Simplifies adding Airship to Flutter apps."
version: 7.7.0
version: 7.7.1
homepage: https://www.airship.com/
repository: https://github.com/urbanairship/airship-flutter
issue_tracker: https://github.com/urbanairship/airship-flutter/issues
Expand Down

0 comments on commit 30a6527

Please sign in to comment.