From 0359ceac798e4724a952770b382c26cecb708d71 Mon Sep 17 00:00:00 2001 From: KWANG HYOUN KIM <> Date: Thu, 15 Mar 2018 22:05:25 +0900 Subject: [PATCH] Update podspec and README for 1.0.0 --- APNSUtil.podspec | 12 +----------- README.md | 10 +++++----- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/APNSUtil.podspec b/APNSUtil.podspec index 94ea6bc..7b9dfcd 100644 --- a/APNSUtil.podspec +++ b/APNSUtil.podspec @@ -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 diff --git a/README.md b/README.md index d343b17..3c2fabd 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) } } ```