push notification

A collection of 2 posts
ios

APNs証明書を作る(アプリ登録済みの場合)

ザックリとメモする Step.1 Apple Developer CenterでCertificatesの登録リクエストを行う。 * Certificates > +ボタン > 「Apple Push Notification service SSL」 * iOSアプリがDevelopment証明書を使用する場合はSandbox, Distributionビルドを使用する場合はProductionになる * Continue Step.2 APNs証明書が使用するAppIDを選択 Step.3 Certificateの生成 証明書アシスタントでリクエストを作成する * キーチェーンアクセスを起動(/Applications/Utilities/キーチェーンアクセス) * 画面左上のメニューから「キーチェーンアクセス」>「証明書アシスタント」>「認証局に証明書を要求」 証明書アシスタントの入力内容 * メールアドレス > ユーザのメールアドレス * 通称 > 識別情報がわかる名前 * CAのメールアドレス > 空欄 *
1 min read
objc

iOS8でプッシュ通知を使ったりバッジを使ったり

今までプッシュ通知の利用を宣言するのに使ってたメソッドregisterForRemoteNotificationTypesがiOS8からdeprecatedに変わっていたのでメモ プッシュ通知の利用するとき iOS7以前の場合 [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; iOS8以降の場合 [[UIApplication sharedApplication] registerForRemoteNotifications]; UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:(UIUserNot
2 min read