{"id":563,"date":"2015-08-29T15:55:00","date_gmt":"2015-08-29T15:55:00","guid":{"rendered":"http:\/\/blog.lizefield.mobi\/?p=182"},"modified":"2015-08-29T15:55:00","modified_gmt":"2015-08-29T15:55:00","slug":"microsoft-azure%e3%81%8b%e3%82%89ios%e3%81%b8%e3%83%97%e3%83%83%e3%82%b7%e3%83%a5%e9%80%9a%e7%9f%a5%ef%bc%88swift%ef%bc%89%ef%bc%88%e3%81%9d%e3%81%ae%ef%bc%93%ef%bc%89-2","status":"publish","type":"post","link":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/2015\/08\/29\/microsoft-azure%e3%81%8b%e3%82%89ios%e3%81%b8%e3%83%97%e3%83%83%e3%82%b7%e3%83%a5%e9%80%9a%e7%9f%a5%ef%bc%88swift%ef%bc%89%ef%bc%88%e3%81%9d%e3%81%ae%ef%bc%93%ef%bc%89-2\/","title":{"rendered":"Microsoft Azure\u304b\u3089iOS\u3078\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\uff08Swift\uff09\uff08\u305d\u306e\uff13\uff09"},"content":{"rendered":"<p>Microsoft\u00a0Azure\u306b\u8a2d\u7f6e\u3057\u305fWeb Apps\u304b\u3089iOS\u3078\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u9001\u308b\u305f\u3081\u306bMicrosoft Azure\u306eNotification Hub\u3092\u5229\u7528\u3057\u3066\u307f\u307e\u3059\u3002\uff08\u305d\u306e\uff13\uff09<br \/>\niOS:8.4.1<br \/>\nXcode:6.4<br \/>\nSwift:1.2<br \/>\nMobile Services iOS SDK:1.2.4<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/blog.lizefield.mobi\/?p=157\" rel=\"nofollow\">\u524d\u56de<\/a>\u8a2d\u5b9a\u3057\u305fiOS\u30a2\u30d7\u30ea\u3078\u901a\u77e5\u3092\u9001\u308b\u305f\u3081\u306e\u51e6\u7406\u3092Web Apps\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><b>1.\u30c6\u30b9\u30c8\u901a\u77e5<\/b><br \/>\n\u524d\u56de\u306eiOS\u30a2\u30d7\u30ea\u3092\u5b9f\u6a5f\u3067\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3059\u308b\u3068Microsoft Azure \u901a\u77e5\u30cf\u30d6\u3078\u767b\u9332\u3055\u308c\u307e\u3059\u3002<br \/>\n\u305d\u306e\u72b6\u614b\u3067\u30dd\u30fc\u30bf\u30eb\u306e\u300c\u901a\u77e5\u30cf\u30d6\u300d\u306e\u300c\u30c7\u30d0\u30c3\u30b0\u300d\u3067iOS\u306b\u5bfe\u3057\u3066\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u52d5\u4f5c\u78ba\u8a8d\u304c\u51fa\u6765\u307e\u3059\u3002<br \/>\n<a href=\"\/wp-content\/uploads\/2015\/08\/azure_notification_12.png\"><img loading=\"lazy\" class=\"alignnone wp-image-185\" src=\"\/wp-content\/uploads\/2015\/08\/azure_notification_12.png\" alt=\"azure_notification_12\" width=\"276\" height=\"300\" srcset=\"\/wp-content\/uploads\/2015\/08\/azure_notification_12.png 1306w, \/wp-content\/uploads\/2015\/08\/azure_notification_12-276x300.png 276w, \/wp-content\/uploads\/2015\/08\/azure_notification_12-768x835.png 768w, \/wp-content\/uploads\/2015\/08\/azure_notification_12-942x1024.png 942w\" sizes=\"(max-width: 276px) 100vw, 276px\" \/><\/a><\/p>\n<p><b>2.\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8ffd\u52a0<\/b><br \/>\nVisual Studio\u3067\u300c\u30c4\u30fc\u30eb\u300d\uff0d\u300cNuGet \u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u300d\uff0d\u300c\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306eNuGet\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u7ba1\u7406\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br \/>\n\u300cMicrosoft.Azure.NotificationHubs\u300d\u3067\u691c\u7d22\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<a href=\"\/wp-content\/uploads\/2015\/08\/azure_notification_13.png\"><img loading=\"lazy\" class=\"alignnone wp-image-187\" src=\"\/wp-content\/uploads\/2015\/08\/azure_notification_13.png\" alt=\"azure_notification_13\" width=\"300\" height=\"150\" srcset=\"\/wp-content\/uploads\/2015\/08\/azure_notification_13.png 2160w, \/wp-content\/uploads\/2015\/08\/azure_notification_13-300x150.png 300w, \/wp-content\/uploads\/2015\/08\/azure_notification_13-768x383.png 768w, \/wp-content\/uploads\/2015\/08\/azure_notification_13-1024x511.png 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><b>3.\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3067\u901a\u77e5\u51e6\u7406<\/b><br \/>\nusing\u306e\u8ffd\u52a0<\/p>\n<pre>using Microsoft.Azure.NotificationHubs;\n<\/pre>\n<p>\u901a\u77e5\u51e6\u7406\u306e\u8ffd\u52a0<\/p>\n<pre>\/\/ \u901a\u77e5\u30cf\u30d6\u540d\nstring notificationHubName = \"notification-ns\";\n\/\/ DefaultFullSharedAccessSignature\nstring notificationHubConnection = \"Endpoint=\uff5e\uff5e\uff5e\uff5e\uff5e;SharedAccessKey=XXxxxXXXX9xxXXx9xX99\";\n\n\/\/ \u901a\u77e5\u30cf\u30d6\u306e\u8a2d\u5b9a\nNotificationHubClient Hub = NotificationHubClient.CreateClientFromConnectionString(notificationHubConnection, notificationHubName);\n\n\/\/ iOS payload\nvar appleNotificationPayload = \"{\\\"aps\\\":{\\\"alert\\\":\\\"Test Notification\\\"}}\";\n\n\/\/ \u901a\u77e5\nHub.SendAppleNativeNotificationAsync(appleNotificationPayload);\n<\/pre>\n<p><b>4.\u30c7\u30d0\u30a4\u30b9\u3092\u6307\u5b9a\u3057\u3066\u901a\u77e5<\/b><br \/>\n\u4eca\u307e\u3067\u306e\u624b\u9806\u3067\u306f\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\uff08\u767b\u9332\u30c7\u30d0\u30a4\u30b9\u5168\u4f53\uff09\u3078\u306e\u901a\u77e5\u3060\u3063\u305f\u305f\u3081\u3001\u5b9f\u969b\u306b\u306f\u300c<a href=\"https:\/\/msdn.microsoft.com\/library\/azure\/dn530749.aspx\" target=\"_blank\" rel=\"nofollow\">\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u30bf\u30b0\u5f0f<\/a>\u300d\u3084\u300c<a href=\"https:\/\/azure.microsoft.com\/ja-jp\/documentation\/articles\/notification-hubs-aspnet-backend-android-notify-users\/\" target=\"_blank\" rel=\"nofollow\">Azure Notification Hubs \u306b\u3088\u308b\u30e6\u30fc\u30b6\u30fc\u3078\u306e\u901a\u77e5<\/a>\u300d\u306a\u3069\u3092\u53c2\u8003\u306b\u30c7\u30d0\u30a4\u30b9\u3092\u6307\u5b9a\u3057\u3066\u901a\u77e5\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft\u00a0Azure\u306b\u8a2d\u7f6e\u3057\u305fWeb Apps\u304b\u3089iOS\u3078\u30d7\u30c3\u30b7\u30e5\u901a\u77e5\u3092\u9001\u308b\u305f\u3081\u306bMicrosoft Azure\u306eNotification Hub\u3092\u5229\u7528\u3057\u3066\u307f\u307e\u3059\u3002\uff08\u305d\u306e\uff13\uff09 iOS:8.4.1 Xcode:6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,9],"tags":[43,45,55,66],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/563"}],"collection":[{"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=563"}],"version-history":[{"count":0,"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/563\/revisions"}],"wp:attachment":[{"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lizefieldwp.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}