Skip to content

Commit 79a9820

Browse files
authored
feat: add CocoaPods support (#5)
1 parent 2653a98 commit 79a9820

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

AmplifyUtilsNotifications.podspec

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Pod::Spec.new do |spec|
2+
3+
spec.name = "AmplifyUtilsNotifications"
4+
spec.version = "0.0.2"
5+
spec.summary = "AWS Amplify Swift Utilities for Notifications."
6+
7+
spec.description = "<<-DESC
8+
Amplify Swift Utilities for Notifications provides helpful functionality for working with push notifications on iOS and macOS.
9+
Although it was developed for use with AWS Amplify, it can also be used indepdendently.
10+
11+
The following features are provided:
12+
* Service extension to support fetching and attaching remote media to notifications
13+
* Convenience methods to support requesting notification permissions and registering with APNs
14+
DESC"
15+
16+
spec.homepage = "https://github.com/aws-amplify/amplify-swift-utils-notifications"
17+
spec.license = "Apache License, Version 2.0"
18+
spec.author = { "Amazon Web Services" => "amazonwebservices" }
19+
20+
spec.ios.deployment_target = "13.0"
21+
spec.osx.deployment_target = "10.15"
22+
spec.swift_version = "5.6"
23+
24+
spec.source = { :git => "https://github.com/aws-amplify/amplify-swift-utils-notifications.git", :tag => "#{spec.version}" }
25+
26+
spec.source_files = "Sources/AmplifyUtilsNotifications/**/*.swift"
27+
28+
end

Sources/AmplifyUtilsNotifications/AUNotificationPermissions.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ import UIKit
1616
typealias Application = UIApplication
1717
#endif
1818

19+
@available(iOSApplicationExtension, unavailable)
20+
@available(watchOSApplicationExtension, unavailable)
21+
@available(tvOSApplicationExtension, unavailable)
22+
@available(macCatalystApplicationExtension, unavailable)
23+
@available(OSXApplicationExtension, unavailable)
1924
/// Provides convenience methods for requesting and checking notifications permissions.
2025
public class AUNotificationPermissions {
2126

0 commit comments

Comments
 (0)