Skip to content

Commit

Permalink
Update podspec and README for 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KWANG HYOUN KIM committed Mar 15, 2018
1 parent ca5f7d7 commit 0359cea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
12 changes: 1 addition & 11 deletions APNSUtil.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,12 @@ Pod::Spec.new do |s|
s.name = 'APNSUtil'
s.version = '1.0.0'
s.summary = 'APNSUtil is makes code simple using apple push notification service.'

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!

s.description = 'APNSUtil is makes code simple using apple push notification service.'

s.homepage = 'https://github.com/pisces/APNSUtil'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'pisces' => 'hh963103@gmail.com' }
s.source = { :git => 'https://github.com/pisces/APNSUtil.git', :tag => s.version.to_s }

s.ios.deployment_target = '8.0'

s.ios.deployment_target = '9.0'
s.source_files = 'APNSUtil/Classes/**/*'
s.dependency 'ObjectMapper', '~> 2.0'
end
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
APNSManager.shared.registerDeviceToken(deviceToken)
// TODO: write code to update devicetoken with your api server
// TODO: write code to update device token with your api server
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
// TODO: write code to update devicetoken with your api server
// TODO: write code to update device token with your api server
}

// MARK: - Push Notification for iOS 9
Expand All @@ -78,18 +78,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
application.registerForRemoteNotifications()
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
APNSManager.shared.received(APNSPayload.self, userInfo: userInfo, isInactive: application.applicationState == .inactive)
APNSManager.shared.didReceive(userInfo: userInfo, as: APNSPayload.self, isInactive: application.applicationState == .inactive)
}

// MARK: - Push Notification for iOS 10 or higher

@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
APNSManager.shared.received(APNSPayload.self, userInfo: notification.request.content.userInfo, isInactive: false)
APNSManager.shared.didReceive(userInfo: notification.request.content.userInfo, as: APNSPayload.self, isInactive: false)
}
@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
APNSManager.shared.received(APNSPayload.self, userInfo: response.notification.request.content.userInfo, isInactive: true)
APNSManager.shared.didReceive(userInfo: response.notification.request.content.userInfo, as: APNSPayload.self, isInactive: true)
}
}
```
Expand Down

0 comments on commit 0359cea

Please sign in to comment.