{ "id": "153657", "key": "TIMOB-20105", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-12-07T15:44:49.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "watchOS2" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:19.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The attached project demonstrates that if a Titanium app is bundled with a watchOS (2) app, interactive notifications with FOREGROUND activationMode or TEXTINPUT behavior do not work as expected when the Watch App is installed.\r\n\r\n*Steps to reproduce*\r\n\r\n# Install on an iPhone but not yet install the bundled Watch App.\r\n\r\n*Works via iPhone*\r\n\r\n# Open the app, tap the button and quickly press the iPhone home button.\r\n# Drag down the notification banner when it appears.\r\n# Tap either action and confirm that the {{localnotificationaction}} event appears in the console (after entering input).\r\n\r\n*Works via Apple Watch when Watch App is not installed*\r\n\r\n# Open the app, tap the button and quickly lock the iPhone.\r\n# On the Apple Watch tap either action and confirm that the {{localnotificationaction}} event appears in the console (after entering input).\r\n\r\n*Fails via Apple Watch when Watch App is installed*\r\n\r\n# Install the bundled Watch App via the Watch companion app.\r\n# Open the app, tap the button and quickly lock the iPhone.\r\n# Tap the _Works_ action and confirm that the {{localnotificationaction}} event appears in the console.\r\n# On the Apple Watch tap the _Fails_ action and confirm that nothing happens.\r\n\r\nYou can also change the {{app.js}} to use FOREGROUND activationMode without TEXTINPUT behavior and confirm that this does open the Watch App as expected but again the iOS app does not receive the {{localnotificationaction}} event.\r\n\r\n*Whose bug is this?*\r\n\r\nRun [this Swift iOS and WatchOS2 project|https://github.com/satheeshwaran/Notifications-iOS9] to confirm that here the expected function of the iOS app *does* get called for the above TEXTINPUT scenario. So it does seem to be a Titanium bug, although [this Apple Forum topic|https://forums.developer.apple.com/thread/22453] looks related as well.\r\n\r\nFor the FOREGROUND scenario you will have to modify {{AppDelegate.swift}} and add the following function. You'll see that this doesn't seem to get called. I guess this is normal when the bundled Watch App is installed although I didn't see this 100% confirmed in the docs. \r\n\r\n{code}\r\n func application(application: UIApplication, handleActionWithIdentifier identifier: String?, forLocalNotification notification: UILocalNotification, completionHandler: () -> Void){\r\n \r\n NSLog(\"Without text\")\r\n completionHandler()\r\n \r\n }\r\n{code}", "attachment": [ { "id": "57697", "filename": "internotify.zip", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-07T15:32:54.000+0000", "size": 4269542, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Foreground and TextInput interactive notifications do not work when bundle Watch App is installed", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.0.GA, 5.1.1.GA", "comment": { "comments": [ { "id": "372310", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "/cc [~hansknoechel]", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-07T15:45:10.000+0000", "updated": "2015-12-07T15:45:10.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }