Skip to content

Commit 22ea28d

Browse files
authored
Merge pull request #410 from superwall/develop
4.12.2
2 parents 658b219 + fed866b commit 22ea28d

File tree

7 files changed

+25
-4
lines changed

7 files changed

+25
-4
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [ ] All unit tests pass.
88
- [ ] All UI tests pass.
99
- [ ] Demo project builds and runs on iOS.
10+
- [ ] Demo project builds and runs on Mac Catalyst.
1011
- [ ] Demo project builds and runs on visionOS.
1112
- [ ] I added/updated tests or detailed why my change isn't tested.
1213
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The changelog for `SuperwallKit`. Also see the [releases](https://github.com/superwall/Superwall-iOS/releases) on GitHub.
44

5+
## 4.12.2
6+
7+
### Fixes
8+
9+
- Fixes issue building for Mac Catalyst.
10+
511
## 4.12.1
612

713
### Enhancements

Examples/Advanced/Advanced.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
PRODUCT_BUNDLE_IDENTIFIER = com.superwall.Advanced;
420420
PRODUCT_NAME = "$(TARGET_NAME)";
421421
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
422-
SUPPORTS_MACCATALYST = NO;
422+
SUPPORTS_MACCATALYST = YES;
423423
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
424424
SWIFT_EMIT_LOC_STRINGS = YES;
425425
SWIFT_VERSION = 5.0;
@@ -453,7 +453,7 @@
453453
PRODUCT_BUNDLE_IDENTIFIER = com.superwall.Advanced;
454454
PRODUCT_NAME = "$(TARGET_NAME)";
455455
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
456-
SUPPORTS_MACCATALYST = NO;
456+
SUPPORTS_MACCATALYST = YES;
457457
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
458458
SWIFT_EMIT_LOC_STRINGS = YES;
459459
SWIFT_VERSION = 5.0;

Sources/SuperwallKit/Misc/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ let sdkVersion = """
1818
*/
1919

2020
let sdkVersion = """
21-
4.12.1
21+
4.12.2
2222
"""

Sources/SuperwallKit/Permissions/AuthorizationStatus+PermissionStatus.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ extension CNAuthorizationStatus {
8181
}
8282
}
8383

84+
@available(macCatalyst 14.0, *)
8485
extension AVAuthorizationStatus {
8586
var toPermissionStatus: PermissionStatus {
8687
switch self {

Sources/SuperwallKit/Permissions/Handlers/PermissionHandler+Camera.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,23 @@ import AVFoundation
99

1010
extension PermissionHandler {
1111
func checkCameraPermission() -> PermissionStatus {
12+
#if targetEnvironment(macCatalyst)
13+
if #available(macCatalyst 14.0, *) {
14+
return AVCaptureDevice.authorizationStatus(for: .video).toPermissionStatus
15+
}
16+
return .unsupported
17+
#else
1218
return AVCaptureDevice.authorizationStatus(for: .video).toPermissionStatus
19+
#endif
1320
}
1421

1522
func requestCameraPermission() async -> PermissionStatus {
23+
#if targetEnvironment(macCatalyst)
24+
guard #available(macCatalyst 14.0, *) else {
25+
return .unsupported
26+
}
27+
#endif
28+
1629
guard hasPlistKey(PlistKey.camera) else {
1730
Logger.debug(
1831
logLevel: .error,

SuperwallKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SuperwallKit"
4-
s.version = "4.12.1"
4+
s.version = "4.12.2"
55
s.summary = "Superwall: In-App Paywalls Made Easy"
66
s.description = "Paywall infrastructure for mobile apps :) we make things like editing your paywall and running price tests as easy as clicking a few buttons. superwall.com"
77

0 commit comments

Comments
 (0)