Slide 71
Slide 71 text
ड৴࣌ͷॲཧ
⡥$MBTTNFUIPE
*OD
func application(
application: UIApplication,
didReceiveRemoteNotification userInfo: [NSObject : AnyObject],
fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
if application.applicationState == .Active {
if let aps = userInfo["aps"] {
if let alert = aps["alert"] {
let alertController = UIAlertController(
title: nil, message: alert, preferredStyle: .Alert)
alertController.addAction(
UIAlertAction(
title: "OK", style: .Default, handler: nil))
self.window?.rootViewController?.presentViewController(
alertController, animated: true, completion: nil)
}
}
}
}
w 1VTIΛड৴ͨ࣌͠ͷॲཧΛهࡌ͢Δ