Skip to content

Commit

Permalink
Pushwoosh iOS SDK 6.5.14
Browse files Browse the repository at this point in the history
  • Loading branch information
PushwooshCI committed Jul 5, 2024
1 parent 00ffa5f commit d4fcf56
Show file tree
Hide file tree
Showing 40 changed files with 237 additions and 71 deletions.
39 changes: 30 additions & 9 deletions Documentation/Pushwoosh.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ Pushwoosh class offers access to the singleton-instance of the push manager resp
<td><a href="#1a67fc0820b2e3d2e4164fe77946b46366">- (void)sendPushToStartLiveActivityToken:(NSString *_Nullable)token completion:(void(^)(NSError *_Nullable))completion</a></td>
</tr>
<tr>
<td><a href="#1a5ce3a6b04e8538352ffa47ec63e6168e">- (void)startLiveActivityWithToken:(NSString *_Nonnull)token</a></td>
<td><a href="#1a5f19b5be349429bad1ef85e8eaaf5786">- (void)startLiveActivityWithToken:(NSString *_Nonnull)token activityId:(NSString *_Nullable)activityId</a></td>
</tr>
<tr>
<td><a href="#1a1849586bdd300dd80309a6c8354134f2">- (void)startLiveActivityWithToken:(NSString *_Nonnull)token completion:(void(^)(NSError *_Nullable error))completion</a></td>
<td><a href="#1a33a157a696f3084f23fb5b2df9193705">- (void)startLiveActivityWithToken:(NSString *_Nonnull)token activityId:(NSString *_Nullable)activityId completion:(void(^)(NSError *_Nullable error))completion</a></td>
</tr>
<tr>
<td><a href="#1a0df2937a1b6953ab7d2d495787607cff">- (void)stopLiveActivity</a></td>
Expand Down Expand Up @@ -604,30 +604,51 @@ if #available(iOS 17.2, *) {
----------


#### <a name="1a5ce3a6b04e8538352ffa47ec63e6168e"></a>- (void)startLiveActivityWithToken:(NSString \*<a href="Pushwoosh.md#1aa7caab3e4111d4f4756a1e8d56d01c26">_Nonnull</a>)token
#### <a name="1a5f19b5be349429bad1ef85e8eaaf5786"></a>- (void)startLiveActivityWithToken:(NSString \*<a href="Pushwoosh.md#1aa7caab3e4111d4f4756a1e8d56d01c26">_Nonnull</a>)token activityId:(NSString \*<a href="Pushwoosh.md#1ae9429c76f749caa36e1f798ef3e06c6c">_Nullable</a>)activityId
Sends live activity token to the server. Call this method when you create a live activity.<br/>Example:
```Objective-C
do {
let activity = try Activity<PushwooshAppAttributes>.request(
attributes: attributes,
contentState: contentState,
pushType: .token)

for await data in activity.pushTokenUpdates {
let token = data.map {String(format: "%02x", $0)}.joined()
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
guard let token = data.map { String(format: "%02x", $0) }.joined(separator: "") else {
continue
}
do {
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
} catch {
print("Failed to start live activity with token \(token): \(error.localizedDescription)")
return nil
}
}
} catch (let error) {
print(error.localizedDescription)
return nil
} catch {
print("Error requesting activity: \(error.localizedDescription)")
return nil
}
```
<br/><br/><br/><strong>Parameters</strong><br/>
<table>
<tr>
<td><strong>token</strong></td>
<td>Activity token </td>
</tr>
<tr>
<td><strong>activityId</strong></td>
<td>Activity ID for updating Live Activities by segments </td>
</tr>
</table>


----------


#### <a name="1a1849586bdd300dd80309a6c8354134f2"></a>- (void)startLiveActivityWithToken:(NSString \*<a href="Pushwoosh.md#1aa7caab3e4111d4f4756a1e8d56d01c26">_Nonnull</a>)token completion:(void(^)(NSError \*<a href="Pushwoosh.md#1ae9429c76f749caa36e1f798ef3e06c6c">_Nullable</a> error))completion
#### <a name="1a33a157a696f3084f23fb5b2df9193705"></a>- (void)startLiveActivityWithToken:(NSString \*<a href="Pushwoosh.md#1aa7caab3e4111d4f4756a1e8d56d01c26">_Nonnull</a>)token activityId:(NSString \*<a href="Pushwoosh.md#1ae9429c76f749caa36e1f798ef3e06c6c">_Nullable</a>)activityId completion:(void(^)(NSError \*<a href="Pushwoosh.md#1ae9429c76f749caa36e1f798ef3e06c6c">_Nullable</a> error))completion


----------
Expand Down
29 changes: 21 additions & 8 deletions Framework/Pushwoosh.framework/Versions/A/Headers/Pushwoosh.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.13"
#define PUSHWOOSH_VERSION @"6.5.14"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down Expand Up @@ -557,19 +557,32 @@ Unregisters from push notifications.
attributes: attributes,
contentState: contentState,
pushType: .token)
for await data in activity.pushTokenUpdates {
let token = data.map {String(format: "%02x", $0)}.joined()
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
guard let token = data.map { String(format: "%02x", $0) }.joined(separator: "") else {
continue
}
do {
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
} catch {
print("Failed to start live activity with token \(token): \(error.localizedDescription)")
return nil
}
}
} catch (let error) {
print(error.localizedDescription)
return nil
} catch {
print("Error requesting activity: \(error.localizedDescription)")
return nil
}
@endcode
@param token Activity token
@param activityId Activity ID for updating Live Activities by segments
*/
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token completion:(void (^ _Nullable)(NSError * _Nullable error))completion;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId completion:(void (^ _Nullable)(NSError * _Nullable error))completion;

/**
Call this method when you finish working with the live activity.
Expand Down
Binary file modified Framework/Pushwoosh.framework/Versions/A/Pushwoosh
Binary file not shown.
8 changes: 4 additions & 4 deletions XCFramework/Pushwoosh.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>Pushwoosh.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -17,11 +17,11 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>Pushwoosh.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -32,7 +32,7 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.13"
#define PUSHWOOSH_VERSION @"6.5.14"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down Expand Up @@ -557,19 +557,32 @@ Unregisters from push notifications.
attributes: attributes,
contentState: contentState,
pushType: .token)
for await data in activity.pushTokenUpdates {
let token = data.map {String(format: "%02x", $0)}.joined()
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
guard let token = data.map { String(format: "%02x", $0) }.joined(separator: "") else {
continue
}
do {
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
} catch {
print("Failed to start live activity with token \(token): \(error.localizedDescription)")
return nil
}
}
} catch (let error) {
print(error.localizedDescription)
return nil
} catch {
print("Error requesting activity: \(error.localizedDescription)")
return nil
}
@endcode
@param token Activity token
@param activityId Activity ID for updating Live Activities by segments
*/
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token completion:(void (^ _Nullable)(NSError * _Nullable error))completion;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId completion:(void (^ _Nullable)(NSError * _Nullable error))completion;

/**
Call this method when you finish working with the live activity.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.13"
#define PUSHWOOSH_VERSION @"6.5.14"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down Expand Up @@ -557,19 +557,32 @@ Unregisters from push notifications.
attributes: attributes,
contentState: contentState,
pushType: .token)
for await data in activity.pushTokenUpdates {
let token = data.map {String(format: "%02x", $0)}.joined()
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
guard let token = data.map { String(format: "%02x", $0) }.joined(separator: "") else {
continue
}
do {
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
} catch {
print("Failed to start live activity with token \(token): \(error.localizedDescription)")
return nil
}
}
} catch (let error) {
print(error.localizedDescription)
return nil
} catch {
print("Error requesting activity: \(error.localizedDescription)")
return nil
}
@endcode
@param token Activity token
@param activityId Activity ID for updating Live Activities by segments
*/
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token completion:(void (^ _Nullable)(NSError * _Nullable error))completion;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId completion:(void (^ _Nullable)(NSError * _Nullable error))completion;

/**
Call this method when you finish working with the live activity.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.13"
#define PUSHWOOSH_VERSION @"6.5.14"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down Expand Up @@ -557,19 +557,32 @@ Unregisters from push notifications.
attributes: attributes,
contentState: contentState,
pushType: .token)
for await data in activity.pushTokenUpdates {
let token = data.map {String(format: "%02x", $0)}.joined()
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
guard let token = data.map { String(format: "%02x", $0) }.joined(separator: "") else {
continue
}
do {
try await Pushwoosh.sharedInstance().startLiveActivity(withToken: token)
return token
} catch {
print("Failed to start live activity with token \(token): \(error.localizedDescription)")
return nil
}
}
} catch (let error) {
print(error.localizedDescription)
return nil
} catch {
print("Error requesting activity: \(error.localizedDescription)")
return nil
}
@endcode
@param token Activity token
@param activityId Activity ID for updating Live Activities by segments
*/
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token completion:(void (^ _Nullable)(NSError * _Nullable error))completion;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId;
- (void)startLiveActivityWithToken:(NSString * _Nonnull)token activityId:(NSString * _Nullable)activityId completion:(void (^ _Nullable)(NSError * _Nullable error))completion;

/**
Call this method when you finish working with the live activity.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</data>
<key>Headers/Pushwoosh.h</key>
<data>
Znmb3K1FT06zGY9e2Wg0HzNd30c=
kH8sMEvJh7b/flArJqsLfuqDHaA=
</data>
<key>Info.plist</key>
<data>
Expand Down Expand Up @@ -148,7 +148,7 @@
<dict>
<key>hash2</key>
<data>
6FEG1808Ku3oflq+R6HlTsXC8S9guldr7dqFUE8Xknk=
tvAZ7nUxiuw2h+VEYgBQm7EQB/iSZ2gf/sjnfjcQEHI=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
10 changes: 5 additions & 5 deletions XCFramework/PushwooshGeozones.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>PushwooshGeozones.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>PushwooshGeozones.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/Pushwoosh/Pushwoosh.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pod::Spec.new do |s|

s.name = "Pushwoosh"
s.version = "6.5.13"
s.version = "6.5.14"
s.summary = "Push notifications library by Pushwoosh."
s.platform = :ios

Expand Down
Loading

0 comments on commit d4fcf56

Please sign in to comment.