iOS 8 0 推送註冊

2021-06-28 04:32:10 字數 772 閱讀 3972

registerforremotenotificationtypes: is not supported in ios 8.0 and later   

ios8 push解決方法

昨天晚上整理push的東西,準備些乙個教程,全部弄好之後,發現沒有達到預期的效果,本以為是伺服器**的問題(因為本人對php**一點都不懂),所以在網上四處搜尋,後來看xcode log才發現,原來是ios8系統更新了的問題,提示 registerforremotenotificationtypes: is not supported in ios 8.0 and later.

使用ios8 xcode6的同學,在使用推送(push)的時候應該已經出現這個問題了。那麼讓我們來看看具體的解決方法。

// ios8 新系統需要使用新的**咯

if ([[[uidevice currentdevice] systemversion] floatvalue] >= 8.0)

else

原本在ios7當中 判斷push是否開啟的方法是:

return (types & uiremotenotificationtypealert);

如果將這段**使用在 ios當中,雖然不會出現crash的現象,但是基本沒什麼作用。

在ios8中,我們使用如下的新**來取代以上的**

else

return (types & uiremotenotificationtypealert);

}每當蘋果更新乙個新的版本的時候,最痛苦的莫過於我們這群屌絲啊

加油碼農!

iOS 註冊極光推送

註冊極光推送 channel isproduction 三個字段 import static nsstring x static nsstring channel publish channel static bool isproduction false inte ce uiresponder p...

iOS 註冊本地通知(推送)

注 按home鍵讓app進入後台執行時,方可檢視通知。bool application uiapplication application didfinishlaunchingwithoptions nsdictionary launchoptions override point for cust...

xcode8讓真機測試支援ios8 0以下版本

xcode8支援ios8以下真機測試方法 1.應用程式 xcode 顯示包內容 contents developer platforms iphoneos.platform devicesupport 把裡邊 6.0 6.1 7.0 7.1 的資料夾貼上到xcode8 對應的資料夾內 2.應用程式 ...