Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS 10のプッシュ通知で遭遇した不具合の話

7f2e0d6b54e2bd2a6527b9d468b1c4f6?s=47 huin
October 06, 2016

iOS 10のプッシュ通知で遭遇した不具合の話

10月6日(木)に株式会社Fablicで開催された「Shibuya.swift #5」の発表スライドです。

プッシュ通知の実装によってiOS 10でデバイストークンが取得できなくなる不具合を報告しました。

7f2e0d6b54e2bd2a6527b9d468b1c4f6?s=128

huin

October 06, 2016
Tweet

Transcript

  1. 4IJCVZBTXJGU J04ͷϓογϡ௨஌Ͱૺ۰ͨ͠ෆ۩߹ͷ࿩ גࣜձࣾ'BCMJD !IVJO

  2. ࣗݾ঺հ  !,PJDIJ4BLBUB "!IVJO #IVJONF $ J04"OESPJE

  3. 'BCMJD *OD w ೥ઃཱ೥໨ͷձࣾ w ϑϦϚΞϓϦʮ'3*- ϑϦϧ ʯͱ
 όΠΫϑϦϚʮ3*%& ϥΠυ

    ʯΛӡӦத w ϲ݄΄ͲલʹָఱͷࢠձࣾʹͳΓ·ͨ͠ 
  4. ࠓ೔͓࿩͢Δ಺༰ w J04Ͱൃੜͨ͠'3*-ͷෆ۩߹ʹ͍ͭͯ w 9DPEFYJ044%,؀ڥԼͰͷ͓࿩Ͱ͢ w J04ͷ6TFS/PUJpDBUJPOTGSBNFXPSLͷ͓ ࿩Ͱ͸͋Γ·ͤΜ ! 

  5. ࣄ݅ͷ࢝·Γ͸݄೔ͷ໷ʜ J04ϦϦʔε೔ޙ

  6. J04ʹ͔ͯ͠Βϓογϡ௨஌͕ ಧ͔ͳ͘ͳͬͨͱ͍͏໰͍߹Θ͕ͤෳ਺ಧ͘

  7. ঢ়گͷ੔ཧ w J04Ͱϓογϡ௨஌͕ಧ͔ͳ͍ w .BD͔Β௚઀ૹͬͯ΋ಧ͔ͳ͍ w ಉ͡ΞΧ΢ϯτͰ΋J04ͩͱਖ਼ৗʹಧ͘ w ΋ͪΖΜ"OESPJEʹ΋ಧ͘ 

  8. ௐࠪखॱ w "1/4ূ໌ॻͷ࠶ੜ੒ ˠޮՌͳ͠ w σϦήʔτϝιουͷίʔϧΛશͯϩάʹు͖ग़ͯ֬͠ೝ ˠ௨஌ͷڐՄτʔΫϯͷऔಘͲͪΒ΋ਖ਼ৗ w ಉ͡"QQ*%ॺ໊ͷผϓϩδΣΫτͰσόΠετʔΫϯΛ औಘͯ͠ΈΔ

    ˠผϓϩδΣΫτʹ͸ϓογϡ͕ಧ͘ʂʂ 
  9. J04΍"1/4Ͱ͸ͳ͘'3*-ͷ໰୊ͷ͸ͣʂ ʜ͕ɺݪҼ͕͔ͭΊͣਖ਼௚ఘΊϞʔυ

  10. ;ͱίʔυΛݟͯΈΔ
 ΋ͪΖΜΠνόϯ࠷ॳʹ֬ೝ͸͠·ͨͭ͠΋ΓͰͨ͠

  11. None
  12. None
  13. None
  14. None
  15. unregisterForRemoteNotifications() Unregister for all remote notifications received via Apple Push

    Notification service. You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Notifications section of the Settings app. Apps unregistered through this method can always re-register.
  16. VOSFHJTUFS'PS3FNPUF/PUJpDBUJPOT ͷڍಈ͕J04ͰมԽͨ͠ʂʁ

  17. ݕূͯ͠ΈΔ

  18. ݕূํ๏ w ϘλϯλοϓͰ"1/4ͷSFHJTUFSVOSFHJTUFS Λ࣮ߦ͠ɺϩάΛు͘ΞϓϦΛ࡞੒ w "E)PDϏϧυͰJQBΛ࡞੒ w J04ͱJ04ͦΕͧΕͰ࣮ߦͯ͠ಈ࡞ΛݟΔ 

  19. J04 VOSFHJTUFSΛݺΜͰ΋ɺ
 ࠶౓σόΠετʔΫϯ
 ΛऔಘͰ͖Δ

  20. J04 Ұ౓VOSFTJHUFSΛ͢ΔͱσόΠ ετʔΫϯΛऔಘͰ͖ͳ͘ͳΔ

  21. ݕূ݁Ռ w J04Ͱ͸VOSFHJTUFSޙʹ࠶SFHJTUFS͢Ε͹σ όΠετʔΫϯ͕खʹೖΔ w J04Ͱ͸VOSFHJTUFS͢Δͱ࠶ొ࿥Ͱ͖ͳ͍ 

  22. ݕূ݁Ռ ̎ #BDLHSPVOE.PEFT3FNPUF/PUJpDBUJPOTΛ
 0/ʹ͍ͯ͠ΔͱJ04Ͱ΋৽͍͠τʔΫϯ͕खʹೖΔ 

  23. ݪҼͷ·ͱΊ w '3*-Ͱ͸ॳճىಈ࣌ͱϩάΠϯޙʹVOSFHJTUFS
 Λ͍ͯͨ͠ ˞  w J04ͰϩάΠϯ͢ΔͱSFHJTUFSޙʹVOSFHJTUFS͕૸Γɺ Ҏޙ"1/4͕࢖͑ͳ͘ͳΔ w

    '3*-Ͱ͸όοΫάϥ΢ϯυϞʔυΛ0''ʹ͍ͯͨ͠ͷͰ͜ ͷෆ۩߹ʹૺ۰ͯ͠͠·ͬͨ  ˞ૢ࡞ʹΑͬͯ͸ҧ͏ύεΛ௨ΔͷͰɺϢʔβʔʹΑͬͯ͸ಧ͘ਓ͕͍ͨ
  24. unregisterForRemoteNotifications() Unregister for all remote notifications received via Apple Push

    Notification service. You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Notifications section of the Settings app. Apps unregistered through this method can always re-register.
  25. όά͡Όͳ͍ʁʁ

  26. ରԠ w ·ͩൃ঱͍ͯ͠ͳ͍ਓ޲͚ w VOSFHJTUFS'PS3FNPUF/PUJpDBUJPOTͷίʔυΛ࡟আ w ൃ঱ͯ͠͠·ͬͨਓ޲͚ w Ξοϓσʔτޙʹઃఆ͔Β௨஌ͷڐՄΛ0''ˠ0/ͱ ͢Δͱ࣍ճىಈ࣌ʹ࠶౓औಘͰ͖Δ

    
  27. ·ͱΊ w J04Ͱ͸τʔΫϯͷ࠶औಘ͕Ͱ͖ͳ͍ #(0''࣌  w VOSFHJTUFS'PS3FNPUF/PUJpDBUJPOTݺΜͰ·ͤΜ͔ʁ w ϝιου͸υΩϡϝϯτ௨Γʹ࣮૷͠·͠ΐ͏ w

    ৽04ͷݕূɾରԠ͸͖ͪΜͱ࣌ؒΛ͔͚ͯߦ͍·͠ΐ͏ 
  28. খωλ9DPEFYͰJ04Λσόοά͢Δ  IUUQTUBDLPWFSqPXDPNRVFTUJPOTVTFYDPEFXJUIJPT $ cp -r /Applications/Xcode8.app/Contents/Developer/Platforms/ iPhoneOS.platform/DeviceSupport/10.0\ \(14A345\) /Applications/Xcode7.app/Contents/Developer/Platforms/

    iPhoneOS.platform/DeviceSupport/ 9DPEFʹJ04୺຤ͭͳ͙ͱʮ$PVMEOPUpOE%FWFMPQFS%JTL*NBHFʯ ͱ͍͏Τϥʔ͕ग़Δਓ޲͚ 5IBOLTUP!NPOP