Skip to content

Commit 6be1e7b

Browse files
authored
Merge pull request #101 from urbanairship/release-14.6.0
Release 14.6.0
2 parents 429485f + 7501803 commit 6be1e7b

File tree

4 files changed

+35
-10
lines changed

4 files changed

+35
-10
lines changed

AirshipFrameworkProxy.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Pod::Spec.new do |s|
3-
s.version = "14.5.1"
3+
s.version = "14.6.0"
44
s.name = "AirshipFrameworkProxy"
55
s.summary = "Airship iOS mobile framework proxy"
66
s.documentation_url = "https://docs.airship.com/platform/mobile"
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
1515
s.requires_arc = true
1616
s.swift_version = "6.0"
1717
s.source_files = "ios/AirshipFrameworkProxy/**/*.{h,m,swift}"
18-
s.dependency 'Airship', "19.6.1"
18+
s.dependency 'Airship', "19.8.0"
1919
s.source_files = 'ios/AirshipFrameworkProxyLoader/**/*.{swift,h,m,c,cc,mm,cpp}', 'ios/AirshipFrameworkProxy/**/*.{swift,h,m,c,cc,mm,cpp}'
2020
end
2121

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let package = Package(
1515
)
1616
],
1717
dependencies: [
18-
.package(url: "https://github.com/urbanairship/ios-library.git", from: "19.6.1")
18+
.package(url: "https://github.com/urbanairship/ios-library.git", from: "19.8.0")
1919
],
2020
targets: [
2121
.target(

android/gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[versions]
22

33
# Airship
4-
airshipProxy = '14.5.1'
5-
airship = '19.9.1'
4+
airshipProxy = '14.6.0'
5+
airship = '19.10.0'
66

77
# Gradle plugins
88
androidGradlePlugin = '8.3.2'

ios/AirshipFrameworkProxy/Proxies/AirshipProxy.swift

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public final class AirshipProxy: Sendable {
125125

126126
}
127127

128-
128+
@available(*, deprecated, message: "Use AirshipProxy.takeOff(json:) instead")
129129
@MainActor
130130
public func takeOff(
131131
json: Any,
@@ -136,10 +136,22 @@ public final class AirshipProxy: Sendable {
136136
from: try AirshipJSONUtils.data(json)
137137
)
138138

139-
return try takeOff(config: proxyConfig, launchOptions: launchOptions)
139+
return try takeOff(config: proxyConfig)
140+
}
140141

142+
@MainActor
143+
public func takeOff(
144+
json: Any
145+
) throws -> Bool {
146+
let proxyConfig = try JSONDecoder().decode(
147+
ProxyConfig.self,
148+
from: try AirshipJSONUtils.data(json)
149+
)
150+
151+
return try takeOff(config: proxyConfig)
141152
}
142153

154+
@available(*, deprecated, message: "Use AirshipProxy.takeOff(config:) instead")
143155
@MainActor
144156
public func takeOff(
145157
config: ProxyConfig,
@@ -150,6 +162,15 @@ public final class AirshipProxy: Sendable {
150162
return Airship.isFlying
151163
}
152164

165+
@MainActor
166+
public func takeOff(
167+
config: ProxyConfig
168+
) throws -> Bool {
169+
self.proxyStore.config = config
170+
try? attemptTakeOff()
171+
return Airship.isFlying
172+
}
173+
153174
@objc
154175
public func isFlying(
155176
) -> Bool {
@@ -162,10 +183,16 @@ public final class AirshipProxy: Sendable {
162183
}
163184
}
164185

186+
@available(*, deprecated, message: "Use AirshipProxy.attemptTakeOff(_:) instead")
165187
@MainActor
166188
public func attemptTakeOff(
167189
launchOptions: [UIApplication.LaunchOptionsKey: Any]?
168190
) throws {
191+
try attemptTakeOff()
192+
}
193+
194+
@MainActor
195+
public func attemptTakeOff() throws {
169196
guard !Airship.isFlying else {
170197
return;
171198
}
@@ -175,14 +202,12 @@ public final class AirshipProxy: Sendable {
175202
migrateCalled = true
176203
}
177204

178-
AirshipLogger.debug("attemptTakeOff: \(String(describing: launchOptions))")
179-
180205
let airshipConfig = makeConfig()
181206

182207
self.airshipDelegate = AirshipDelegate(proxyStore: proxyStore)
183208

184209
AirshipLogger.debug("Taking off! \(airshipConfig)")
185-
try Airship.takeOff(airshipConfig, launchOptions: launchOptions)
210+
try Airship.takeOff(airshipConfig)
186211
Airship.deepLinkDelegate = self.airshipDelegate
187212
Airship.push.registrationDelegate = self.airshipDelegate
188213
Airship.push.pushNotificationDelegate = self.airshipDelegate

0 commit comments

Comments
 (0)