i have application in user have specify telephone number , application send him activation code application.
i've uploaded build itunes connect , have sent on beta test. here message apple problem:
2.2 - apps exhibit bugs rejected
2.2 details
we discovered 1 or more bugs in app when reviewed on ipad running ios 8.3 on both wi-fi , cellular networks.
specifically, still unable receive verification code.
i think they've never received notification on ipad. i've tested on emulator, because haven't actual device, , works. have iphone 6, , there no issues on it.
so, here code sends local notification:
func application(application: uiapplication, didfinishlaunchingwithoptions launchoptions: [nsobject: anyobject]?) -> bool { // register sending notifications let notificationtype = uiusernotificationtype.alert | uiusernotificationtype.badge | uiusernotificationtype.sound let settings = uiusernotificationsettings(fortypes: notificationtype, categories: nil) application.registerusernotificationsettings(settings) return true } var localnotification:uilocalnotification = uilocalnotification() localnotification.alertaction = "application activation code" localnotification.alertbody = "here activation code: " + "\(randomserialnumber)" localnotification.firedate = nsdate(timeintervalsincenow: 1 ) localnotification.soundname = uilocalnotificationdefaultsoundname uiapplication.sharedapplication().schedulelocalnotification(localnotification) is possible fix problem? or should launch application on real ipad device clarify it?
could error occur because use code:
// register sending notifications let notificationtype = uiusernotificationtype.alert | uiusernotificationtype.badge | uiusernotificationtype.sound let settings = uiusernotificationsettings(fortypes: notificationtype, categories: nil) application.registerusernotificationsettings(settings) instead of one:
// register sending notifications if application.respondstoselector("isregisteredforremotenotifications") { // ios 8 notifications let notificationtype = uiusernotificationtype.alert | uiusernotificationtype.badge | uiusernotificationtype.sound let settings = uiusernotificationsettings(fortypes: notificationtype, categories: nil) application.registerusernotificationsettings(settings) } else { // ios < 8 notifications application.registerforremotenotificationtypes(.badge | .sound | .alert) } because want app launch both on ios 7 , 8 versions.
Comments
Post a Comment