100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Fixed loop in action processing
Eric Bariauxe154ef8a6cc7
diff --git a/console/iOS/NotificationExtension/NotificationService.swift b/console/iOS/NotificationExtension/NotificationService.swiftindex 5b8507efe..187df7f32 100644--- a/console/iOS/NotificationExtension/NotificationService.swift+++ b/console/iOS/NotificationExtension/NotificationService.swift@@ -70,19 +70,17 @@ class NotificationService: UNNotificationServiceExtension, URLSessionDelegate {bestAttemptContent.userInfo["alertId"] = detailedJson["id"]let actions = detailedJson["actions"] as! [[String : Any]]var notificationActions = [UNNotificationAction]()- for var i in (0..<actions.count) {+ for i in (0..<actions.count) {let actionTitle = actions[i]["title"]! as! Stringlet actionType = actions[i]["type"]! as! Stringswitch actionType {case ActionType.ACTION_ACTUATOR :bestAttemptContent.userInfo["actions"] = actions[i]-notificationActions.append(UNNotificationAction(identifier: actionType, title: actionTitle, options: UNNotificationActionOptions.destructive))case ActionType.ACTION_DEEP_LINK :notificationActions.append(UNNotificationAction(identifier: actionType, title: actionTitle, options: UNNotificationActionOptions.foreground))default : break}- i += 1}let categoryName = "openremoteNotification"let category = UNNotificationCategory(identifier: categoryName, actions: notificationActions, intentIdentifiers: [], options: [])