Skip to content

Commit

Permalink
Version 10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Aug 5, 2024
1 parent 0dd9624 commit 42c4d69
Show file tree
Hide file tree
Showing 25 changed files with 295 additions and 39 deletions.
6 changes: 3 additions & 3 deletions BrazeKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeKit'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Braze Main SDK library providing support for analytics and push notifications.'

s.homepage = 'https://braze.com'
Expand All @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.authors = 'Braze, Inc.'

s.source = {
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/9.3.1/BrazeKit.zip',
:sha256 => '0502169a0e55f294f8c341b2f4e1afc19f19367684668e0bbee09e293cab8667'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/10.0.0/BrazeKit.zip',
:sha256 => '41683c0da51824e23371fd0bcaaa85384a7a98f395b5d6d422057635a631a6ba'
}

s.swift_version = '5.0'
Expand Down
8 changes: 4 additions & 4 deletions BrazeKitCompat.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeKitCompat'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Compatibility library for users migrating from AppboyKit.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazekitcompat/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '9.3.1' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '10.0.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,8 +18,8 @@ Pod::Spec.new do |s|
s.public_header_files = 'Sources/BrazeKitCompat/include/*.h'
s.static_framework = true

s.dependency 'BrazeKit', '9.3.1'
s.dependency 'BrazeLocation', '9.3.1'
s.dependency 'BrazeKit', '10.0.0'
s.dependency 'BrazeLocation', '10.0.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
8 changes: 4 additions & 4 deletions BrazeLocation.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeLocation'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Braze location library providing support for location analytics and geofence monitoring.'

s.homepage = 'https://braze.com'
Expand All @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.authors = 'Braze, Inc.'

s.source = {
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/9.3.1/BrazeLocation.zip',
:sha256 => 'cd34bc7a95e529d0dae495bf5dd8b3d59387fd124be6f0559ca07863f7c3de8c'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/10.0.0/BrazeLocation.zip',
:sha256 => '66493255b40d84b207364d22738b842576ad4df5d3cd674e834fb5e5641406dd'
}

s.swift_version = '5.0'
Expand All @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.vendored_framework = 'BrazeLocation.xcframework'
s.resource_bundles = { 'BrazeLocation' => ['Sources/BrazeLocationResources/Resources/**/*'] }

s.dependency 'BrazeKit', '9.3.1'
s.dependency 'BrazeKit', '10.0.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
6 changes: 3 additions & 3 deletions BrazeNotificationService.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazeNotificationService'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Braze notification service extension library providing support for Rich Push notifications.'

s.homepage = 'https://braze.com'
Expand All @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.authors = 'Braze, Inc.'

s.source = {
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/9.3.1/BrazeNotificationService.zip',
:sha256 => '77c3d9a707a5668b84b125112fee8cc7391bf72c065cca5e510c046d5ae39e11'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/10.0.0/BrazeNotificationService.zip',
:sha256 => '2fb95af7f2718da1d11ad6adb4794860f4dd835acc33d2ae125e7aca0b61b889'
}

s.swift_version = '5.0'
Expand Down
6 changes: 3 additions & 3 deletions BrazePushStory.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BrazePushStory'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Braze notification content extension library providing support for Push Stories.'

s.homepage = 'https://braze.com'
Expand All @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.authors = 'Braze, Inc.'

s.source = {
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/9.3.1/BrazePushStory.zip',
:sha256 => 'af0b9176553f4e39f5020e548f101c550220bb4d62f2b9b1d69ad70a8e6f56ec'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/10.0.0/BrazePushStory.zip',
:sha256 => '44a40e063bc5d7635c1bb69c0f0bca5f7eaa9fbd4165eae6aaea033aad30590c'
}

s.swift_version = '5.0'
Expand Down
6 changes: 3 additions & 3 deletions BrazeUI.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeUI'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Braze-provided user interface library for In-App Messages and Content Cards.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '9.3.1' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '10.0.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.resource_bundles = { 'BrazeUI' => ['Sources/BrazeUI/Resources/**/*'] }
s.static_framework = true

s.dependency 'BrazeKit', '9.3.1'
s.dependency 'BrazeKit', '10.0.0'

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
6 changes: 3 additions & 3 deletions BrazeUICompat.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'BrazeUICompat'
s.version = '9.3.1'
s.version = '10.0.0'
s.summary = 'Compatibility UI library for users migrating from AppboyUI.'

s.homepage = 'https://braze.com'
s.documentation_url = 'https://braze-inc.github.io/braze-swift-sdk/documentation/brazeui/'
s.license = { :type => 'Commercial' }
s.authors = 'Braze, Inc.'

s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '9.3.1' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '10.0.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '12.0'
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.resource_bundles = { 'BrazeUICompat' => 'Sources/BrazeUICompat/*/Resources/**/*.*' }
s.static_framework = true

s.dependency 'BrazeKitCompat', '9.3.1'
s.dependency 'BrazeKitCompat', '10.0.0'
s.dependency 'SDWebImage', '>= 5.19.0', '< 6'

s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' }
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
## 10.0.0

##### Breaking
- The following changes have been made when subscribing to Push events with [`Braze.Notifications.subscribeToUpdates(payloadTypes:_:)`][push-subscribe]:
- The `update` closure will now be triggered by both "Push Opened" and "Push Received" events by default. Previously, it would only be triggered by "Push Opened" events.
- To continue subscribing only to "Push Opened" events, pass in `[.opened]` for the parameter `payloadTypes`. Alternatively, implement your `update` closure to check that the `type` from the `Braze.Notifications.Payload` is `.opened`.
- When receiving a push notification with `content-available: true`, the [`Braze.Notifications.Payload.type`][payload-type] will now be `.received` instead of `.opened`.
- Marks the following deprecated APIs as unavailable:
- `Braze.Configuration.Api.Flavor`
- `Braze.Configuration.Api.flavor`
- `Braze.Configuration.Api.SdkMetadata`
- `Braze.Configuration.Api.addSdkMetadata(_:)`
- `Braze.ContentCard.ClickAction.uri(_:useWebview:)`
- `Braze.ContentCard.ClickAction.uri`
- `Braze.InAppMessage.ClickAction.uri(_:useWebview:)`
- `Braze.InAppMessage.ClickAction.uri`
- `Braze.InAppMessage.ModalImage.imageUri`
- `Braze.InAppMessage.Full.imageUri`
- `Braze.InAppMessage.FullImage.imageUri`
- `Braze.InAppMessage.Themes.default`
- `Braze.deviceId(queue:completion:)`
- `Braze._objc_deviceId(completion:)`
- `Braze.deviceId()`
- `Braze.User.setCustomAttributeArray(key:array:fileID:line:)`
- `Braze.User.addToCustomAttributeArray(key:value:fileID:line:)`
- `Braze.User.removeFromCustomAttributeArray(key:value:fileID:line:)`
- `Braze.User._objc_addToCustomAttributeArray(key:value:)`
- `Braze.User._objc_removeFromCustomAttributeArray(key:value:)`
- `gifViewProvider`
- `GifViewProvider.default`
- Removes the deprecated APIs:
- `Braze.Configuration.DeviceProperty.pushDisplayOptions`
- `Braze.InAppMessageRaw.Context.Error.extraProcessClickAction`
- Removes the deprecated `BrazeLocation` class in favor of `BrazeLocationProvider`.

##### Fixed
- Fixes a crash when handling a scheme-based deep link containing a registered `applink` domain (e.g. `applinks:example.com` with a deep link to `app://example.com/path`).

##### Added
- Adds support to subscribe to "Push Received" events via [`Braze.Notifications.subscribeToUpdates(payloadTypes:_:)`][push-subscribe].
- The following notifications will trigger this subscription:
- Notifications received in the foreground
- Notifications with the field `content-available: true` received in the foreground or background
- The following notifications will _not_ trigger this subscription:
- Notifications received while terminated
- Notifications received in the background without the field `content-available: true`
- The new parameter `payloadTypes` will allow you to subscribe to "Push Opened" events, "Push Received" events, or both. If the parameter is omitted, it will subscribe to both by default.
- If you are using manual push integration, you will need to first implement `UNUserNotificationCenter.userNotificationCenter(_:willPresent:withCompletionHandler:)`, and make sure to call `Braze.Notifications.handleForegroundNotification(notification:)` within your implementation. Then, use `subscribeToUpdates` as noted above. See [our guide on push notification integration](https://www.braze.com/docs/developer_guide/platform_integration_guides/swift/push_notifications/integration/#step-3-enable-push-handling) for more info.
- Adds the public property [`Braze.Notifications.Payload.type`][payload-type].
- Adds the [`Braze.WebViewBridge.ScriptMessageHandler.init(braze:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/webviewbridge/scriptmessagehandler/init(braze:)) initializer enabling a simpler way to initialize the `ScriptMessageHandler` for adding it to user-provided web views.

[push-subscribe]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(payloadtypes:_:)
[payload-type]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/payload/type

## 9.3.1

##### Fixed
Expand Down
26 changes: 26 additions & 0 deletions Examples/ObjC/Sources/BannerUI/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>BannerUI</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions Examples/ObjC/Sources/PushNotifications-Automatic/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

@import BrazeKit;

@interface AppDelegate ()

// The subscription needs to be retained to be active.
@property(strong, nonatomic) BRZCancellable *notificationSubscription;

@end

@implementation AppDelegate

#pragma mark - Lifecycle
Expand All @@ -28,6 +35,17 @@ - (BOOL)application:(UIApplication *)application
AppDelegate.braze = braze;

[self.window makeKeyAndVisible];

// Subscribe to Push notification events
self.notificationSubscription = [AppDelegate.braze.notifications
subscribeToUpdates:^(BRZNotificationsPayload *_Nonnull payload) {
NSLog(@"Push notification subscription triggered:\n"
"- type: %ld\n"
"- title: %@\n"
"- isSilent: %d",
(long)payload.type, payload.title, payload.isSilent);
}];

return YES;
}

Expand Down
18 changes: 18 additions & 0 deletions Examples/ObjC/Sources/PushNotifications-Manual/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

@import BrazeKit;

@interface AppDelegate ()

// The subscription needs to be retained to be active.
@property(strong, nonatomic) BRZCancellable *notificationSubscription;

@end

@implementation AppDelegate

#pragma mark - Lifecycle
Expand Down Expand Up @@ -36,6 +43,17 @@ - (BOOL)application:(UIApplication *)application
}];

[self.window makeKeyAndVisible];

// Subscribe to Push notification events
self.notificationSubscription = [AppDelegate.braze.notifications
subscribeToUpdates:^(BRZNotificationsPayload *_Nonnull payload) {
NSLog(@"Push notification subscription triggered:\n"
"- type: %ld\n"
"- title: %@\n"
"- isSilent: %d",
(long)payload.type, payload.title, payload.isSilent);
}];

return YES;
}

Expand Down
30 changes: 30 additions & 0 deletions Examples/ObjC/Sources/PushNotifications/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>PushNotifications</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.braze.PushNotifications.PushStories</string>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Examples/ObjC/manual-integration-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ ! -f "manual-integration-setup.sh" ]; then
fi

# Constants
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/9.3.1/braze-swift-sdk-prebuilt.zip"
url="https://github.com/braze-inc/braze-swift-sdk/releases/download/10.0.0/braze-swift-sdk-prebuilt.zip"

echo "" "Cleaning up"
rm -rf braze-swift-sdk-prebuilt
Expand Down
26 changes: 26 additions & 0 deletions Examples/Swift/Sources/BannerUI/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>BannerUI</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
</plist>
Loading

0 comments on commit 42c4d69

Please sign in to comment.