Skip to content

Commit

Permalink
Version 5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jerielng committed Dec 6, 2022
1 parent 2130fd6 commit 3d76957
Show file tree
Hide file tree
Showing 19 changed files with 142 additions and 164 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 = '5.6.4'
s.version = '5.7.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/5.6.4/BrazeKit-CocoaPods.zip',
:sha256 => '8029a5a48f7d91efb6d8150582c92445566ce1ba2c7e6048d13e64af53cc8f0a'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeKit-CocoaPods.zip',
:sha256 => 'dcef97f42830884252cecc2a46d863e7ed231e7b3d8cc734d35e849c57628415'
}

s.swift_version = '5.0'
Expand Down
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 = '5.6.4'
s.version = '5.7.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/5.6.4/BrazeLocation-CocoaPods.zip',
:sha256 => 'f5fddf0bf389053d8e9e8eabe4600db2ef5ef8396e7b11430a65fac377d1522b'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeLocation-CocoaPods.zip',
:sha256 => '66372a30285e585189d20f20da3d602dd50f9541daee7bffd0b2729e28a19996'
}

s.swift_version = '5.0'
Expand All @@ -21,5 +21,5 @@ Pod::Spec.new do |s|

# Depends on BrazeKit because BrazeKit includes the internal _BrazeLocationClient symbols required
# for linking against BrazeLocation.
s.dependency 'BrazeKit', '5.6.4'
s.dependency 'BrazeKit', '5.7.0'
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 = '5.6.4'
s.version = '5.7.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/5.6.4/BrazeNotificationService-CocoaPods.zip',
:sha256 => '0e5c6ecc1f19db1cb12ea1a7749ebc1265434178695121509c326ec14c87c102'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeNotificationService-CocoaPods.zip',
:sha256 => '335ce992d5a53b0efc79097ea77ccf092ff92013d9a7e58d02ef7f86763b8c70'
}

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 = '5.6.4'
s.version = '5.7.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/5.6.4/BrazePushStory-CocoaPods.zip',
:sha256 => 'f21f0c9655bb143790ac55e8ba105167b8ab7a5ef55df68992c0e61a91a24ecf'
:http => 'https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazePushStory-CocoaPods.zip',
:sha256 => '741f055974e9e4fb70810ba716fe2177ad486bd7b7d32779a65087a6055bb597'
}

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 = '5.6.4'
s.version = '5.7.0'
s.summary = 'Braze-provided user interface library for In-App Messages.'

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 => '5.6.4' }
s.source = { :git => 'https://github.com/braze-inc/braze-swift-sdk.git', :tag => '5.7.0' }

s.swift_version = '5.0'
s.ios.deployment_target = '10.0'
Expand All @@ -17,5 +17,5 @@ Pod::Spec.new do |s|
s.source_files = 'Sources/BrazeUI/**/*.swift'
s.resource_bundles = { 'BrazeUI' => 'Sources/BrazeUI/Resources/**/*' }

s.dependency 'BrazeKit', '5.6.4'
s.dependency 'BrazeKit', '5.7.0'
end
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 5.7.0

##### Fixed
- Fixes an issue where modal image in-app messages would not respect the aspect ratio of the image when the height of the image is larger than its width.

##### Changed
- Changes modal, modal image, full, and full image in-app message view attributes to use the `ViewDimension` type for their `minWidth`, `maxWidth` and `maxHeight` attributes.
- The `ViewDimension` type enables providing different values for regular and large size-classes.

##### Added
- Adds a configuration to use a randomly generated UUID instead of IDFV as the device ID: [`useUUIDAsDeviceId`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/configuration-swift.class/useuuidasdeviceid).
- This configuration defaults to `false`. To opt in to this feature, set this value to `true`.
- Enabling this value will only affect new devices. Existing devices will use the device identifier that was previously registered.

## 5.6.4

##### Fixed
Expand All @@ -17,8 +31,8 @@
[`Braze.User.id()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/user-swift.class/id()
[`Braze.deviceId()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/deviceid()
[`ContentCards.requestRefresh()`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/requestrefresh()
[`ContentCards.cardsStream`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/cardsStream
[`ContentCards.subscribeToUpdates(_:)`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/subscribetoupdates(_:)
[`ContentCards.cardsStream`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/cardsstream
[`ContentCards.subscribeToUpdates(_:)`]: https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/contentcards-swift.class/subscribetoupdates(_:)

## 5.6.3

Expand Down
26 changes: 0 additions & 26 deletions Examples/ObjC/Sources/ContentCards/Info.plist

This file was deleted.

26 changes: 0 additions & 26 deletions Examples/ObjC/Sources/InAppMessages/Info.plist

This file was deleted.

26 changes: 0 additions & 26 deletions Examples/Swift/Sources/ContentCards/Info.plist

This file was deleted.

26 changes: 0 additions & 26 deletions Examples/Swift/Sources/InAppMessages/Info.plist

This file was deleted.

16 changes: 8 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "BrazeKit",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeKit.zip",
checksum: "cc6375e451a181804528945a811a850444ae2d892f140491910237648bbe19ed"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeKit.zip",
checksum: "bc13bbaeceafc76e56800a7e9dfdc0886012855f073a1dfb1c42f1e7c7def1c7"
),
.target(
name: "BrazeKitResources",
Expand All @@ -42,18 +42,18 @@ let package = Package(
),
.binaryTarget(
name: "BrazeLocation",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeLocation.zip",
checksum: "33a0900c0ca9a9e5b94b86b111595e83e80b3723be7c0e7cc9e99bb03eb7c2b4"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeLocation.zip",
checksum: "7edcc43e75f42de619aacfc2c7ec4cc03c3764236bd28806bb1c8da15b415818"
),
.binaryTarget(
name: "BrazeNotificationService",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazeNotificationService.zip",
checksum: "32130b8da6bc00ce43ae2e495fd873cc1ec458b5c305d4bd9451cfe0d894a7f9"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazeNotificationService.zip",
checksum: "458cd5f89654daa37ff627975b9e251cbc28d9d66dc0d1fafc234145e81b6f1f"
),
.binaryTarget(
name: "BrazePushStory",
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.6.4/BrazePushStory.zip",
checksum: "5b83874ae6eacf545c70e120655827976930da707e66297eba2f161bf5c1c089"
url: "https://github.com/braze-inc/braze-swift-sdk/releases/download/5.7.0/BrazePushStory.zip",
checksum: "3d7ce4e389ffc310e33e485cf6f11171e5dc91229d4d5be89f9546cc41d39ed6"
),
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p align="center">
<a href="https://github.com/braze-inc/braze-swift-sdk/releases">
<img src="https://badgen.net/badge/version/5.6.4/blue" alt="Version: 5.6.4">
<img src="https://badgen.net/badge/version/5.7.0/blue" alt="Version: 5.7.0">
</a>
<a href="#">
<img src="https://badgen.net/badge/platforms/iOS%20%7C%20tvOS%20%7C%20Mac%20Catalyst/orange"
Expand Down
38 changes: 38 additions & 0 deletions Sources/BrazeUI/Dependencies/ViewDimension.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import UIKit

/// A struct representing view dimensions for both regular and large interfaces.
///
/// Large interface values are used when the UI is being displayed with both horizontal and vertical
/// size classes are `.regular` and the device is in landscape.
public struct ViewDimension: Hashable {

/// The dimension for the regular case.
public var regular: Double

/// The dimension for the large case.
public var large: Double

public init(regular: Double, large: Double) {
self.regular = regular
self.large = large
}

}

// MARK: - Misc.

extension ViewDimension: ExpressibleByFloatLiteral {

public init(floatLiteral value: Double) {
self.init(regular: value, large: value)
}

}

extension ViewDimension: ExpressibleByIntegerLiteral {

public init(integerLiteral value: IntegerLiteralType) {
self.init(regular: Double(value), large: Double(value))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ extension BrazeInAppMessageUI {
public var shadow: Shadow? = Shadow.inAppMessage

/// The minimum width (used when displayed as modal).
public var minWidth = 320.0
public var minWidth: ViewDimension = 320.0

/// The maximum width (used when displayed as modal).
///
/// The maximum width is swapped with the maximum height for large UIs (e.g. iPad).
public var maxWidth = 450.0
public var maxWidth: ViewDimension = .init(regular: 450.0, large: 720.0)

/// The maximum height (used when displayed as modal).
///
/// The maximum height is swapped with the maximum width for large UIs (e.g. iPad).
public var maxHeight = 720.0
public var maxHeight: ViewDimension = .init(regular: 720.0, large: 450.0)

/// Specify whether the full image in-app message view displays the image in a scroll view
/// for large images.
Expand Down Expand Up @@ -111,7 +111,7 @@ extension BrazeInAppMessageUI {
}

var modalMargin: UIEdgeInsets
var modalMaxHeight: Double
var modalMaxHeight: ViewDimension
var modalCornerRadius: Double

open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ extension BrazeInAppMessageUI {
public var shadow: Shadow? = Shadow.inAppMessage

/// The minimum width (used when displayed as modal).
public var minWidth = 320.0
public var minWidth: ViewDimension = 320.0

/// The maximum width (used when displayed as modal).
///
/// The maximum width is swapped with the maximum height for large UIs (e.g. iPad).
public var maxWidth = 450.0
public var maxWidth: ViewDimension = .init(regular: 450.0, large: 720.0)

/// The maximum height (used when displayed as modal).
///
/// The maximum height is swapped with the maximum width for large UIs (e.g. iPad).
public var maxHeight = 720.0
public var maxHeight: ViewDimension = .init(regular: 720.0, large: 450.0)

/// Specify whether the full in-app message view can be dismissed from a tap with the
/// view's background.
Expand Down Expand Up @@ -132,7 +132,7 @@ extension BrazeInAppMessageUI {
}

var modalMargin: UIEdgeInsets
var modalMaxHeight: Double
var modalMaxHeight: ViewDimension
var modalCornerRadius: Double
var modalPaddingBottom: Double

Expand Down
Loading

0 comments on commit 3d76957

Please sign in to comment.