Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 10.0.0 #59

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 2 additions & 2 deletions AirshipFrameworkProxy.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Pod::Spec.new do |s|
s.version = "9.1.3"
s.version = "10.0.0"
s.name = "AirshipFrameworkProxy"
s.summary = "Airship iOS mobile framework proxy"
s.documentation_url = "https://docs.airship.com/platform/mobile"
Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.swift_version = "5.0"
s.source_files = "ios/AirshipFrameworkProxy/**/*.{h,m,swift}"
s.dependency 'Airship', "18.9.2"
s.dependency 'Airship', "18.10.0"
s.source_files = 'ios/AirshipFrameworkProxyLoader/**/*.{swift,h,m,c,cc,mm,cpp}', 'ios/AirshipFrameworkProxy/**/*.{swift,h,m,c,cc,mm,cpp}'
end

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/urbanairship/ios-library.git", from: "18.9.2")
.package(url: "https://github.com/urbanairship/ios-library.git", from: "18.10.0")
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class LiveUpdatesManagerProxy(private val managerProvider: () -> LiveUpda
return this.manager.getAllActiveUpdates().map { LiveUpdateProxy(it) }
}

public fun create(request: LiveUpdateRequest.Create) {
public fun start(request: LiveUpdateRequest.Start) {
this.manager.start(
name = request.name,
type = request.type,
Expand All @@ -53,6 +53,10 @@ public class LiveUpdatesManagerProxy(private val managerProvider: () -> LiveUpda
dismissTimestamp = request.dismissalTimestamp
)
}

public fun clearAll() {
this.manager.clearAll()
}
}

public class LiveUpdateProxy(private val liveUpdate: LiveUpdate): JsonSerializable {
Expand Down Expand Up @@ -118,7 +122,7 @@ public sealed class LiveUpdateRequest {
}
}

public data class Create(
public data class Start(
val name: String,
val type: String,
val content: JsonMap,
Expand All @@ -127,9 +131,9 @@ public sealed class LiveUpdateRequest {
): LiveUpdateRequest() {
public companion object {
@Throws(JsonException::class)
public fun fromJson(jsonValue: JsonValue): Create {
public fun fromJson(jsonValue: JsonValue): Start {
val map = jsonValue.requireMap()
return Create(
return Start(
name = map.requireField(NAME),
type = map.requireField(TYPE),
content = map.requireField(CONTENT),
Expand Down
4 changes: 2 additions & 2 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]

# Airship
airshipProxy = '9.1.3'
airship = '18.3.1'
airshipProxy = '10.0.0'
airship = '18.3.2'

# Gradle plugins
androidGradlePlugin = '8.3.2'
Expand Down
14 changes: 7 additions & 7 deletions ios/AirshipFrameworkProxy/LiveActivity/LiveActivityManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public actor LiveActivityManager: Sendable {

fileprivate struct Entry {
let list: () throws -> [LiveActivityInfo]
let create: (LiveActivityRequest.Create) async throws -> LiveActivityInfo
let start: (LiveActivityRequest.Start) async throws -> LiveActivityInfo
let update: (LiveActivityRequest.Update) async throws -> Bool
let end: (LiveActivityRequest.End) async throws -> Bool

Expand Down Expand Up @@ -135,9 +135,9 @@ public actor LiveActivityManager: Sendable {
})
}

public func create(_ request: LiveActivityRequest.Create) async throws -> LiveActivityInfo {
public func start(_ request: LiveActivityRequest.Start) async throws -> LiveActivityInfo {
try await waitForSetup()
let result = try await findEntry(attributesType: request.attributesType).create(request)
let result = try await findEntry(attributesType: request.attributesType).start(request)
if #unavailable(iOS 17.2) {
await self.checkForActivities()
}
Expand Down Expand Up @@ -260,8 +260,8 @@ extension LiveActivityManager.Entry {
try await Self.updateActivity(type, request: request)
}

self.create = { request in
let activity: Activity<T> = try Self.createActivity(request: request)
self.start = { request in
let activity: Activity<T> = try Self.startActivity(request: request)
if let airshipName = airshipNameExtractor?(activity.attributes) {
Airship.channel.trackLiveActivity(activity, name: airshipName)
}
Expand Down Expand Up @@ -330,8 +330,8 @@ extension LiveActivityManager.Entry {
return true
}

private static func createActivity<T: ActivityAttributes>(
request: LiveActivityRequest.Create
private static func startActivity<T: ActivityAttributes>(
request: LiveActivityRequest.Start
) throws -> Activity<T> {
let decodedAttributes: T = try request.attributes.decode()
let decodedContentState: T.ContentState = try request.content.state.decode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public struct LiveActivityRequest: Sendable, Equatable {
}
}

public struct Create: Sendable, Equatable, Codable {
public struct Start: Sendable, Equatable, Codable {
public var attributesType: String
public var content: LiveActivityContent
public var attributes: AirshipJSON
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
target 'AirshipFrameworkProxy' do
pod 'Airship', '18.9.2'
pod 'Airship', '18.10.0'
end

target 'AirshipFrameworkProxyTests' do
Expand Down
Loading