CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate EZPush
into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target '<Your Target Name>' do
platform :ios, '13.0'
pod 'EZPush'
end
Then, run the following command:
$ pod install
You can use the Swift Package Manager to install EZPush into your Xcode project. Follow these steps:
- Open your project in Xcode.
- Select "File" -> "Swift Packages" -> "Add Package Dependencies..."
- Enter the URL of this repository:
https://github.com/ez-push/ios
- Select the version you'd like to use and click "Add Package".
To get started with EZPush, import the module into your Swift code:
import EZPush
Request for Permission
EZPush.current.requestForPushNotificationPermission([.alert, .badge, .sound]) { _, _ in }
Configure EZPush
let config = EZPushConfiguration(licenseKey: "YOUR_LICENSE_KEY")
EZPush.current.configure(config)
EZPush.current.update(pushNotificationToken: "PUSH_NOTIFICATION_TOKEN") { _, _ in }