{ "id": "150886", "key": "TIMOB-19448", "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-09-01T16:50:01.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:11.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": "I can consistently reproduce the below scenario:\r\n\r\nThis works:\r\n\r\n{code}\r\n\t\t\tTi.WatchSession.sendMessage({\r\n\t\t\t\tfoo: 'bar',\r\n\t\t\t\ttime: (new Date()).toString()\r\n\t\t\t});\r\n{code}\r\n\r\nSwift delegate:\r\n\r\n{code}\r\n\tfunc session(session: WCSession, didReceiveMessage message: [String : AnyObject]) {\r\n\t\tNSLog(\"%@\", message)\r\n }\r\n{code}\r\n\r\nOutput in console:\r\n\r\n{code}\r\nSep 1 11:41:42 rblalockRMBP fishruleswatchapp WatchApp Extension[20076]: {\r\n\t foo = bar;\r\n\t time = \"Tue Sep 01 2015 11:41:42 GMT-0400 (EDT)\";\r\n\t}\r\n{code}\r\n\r\nTHIS however does not work. The delegate never is invoked. It's due to the payload (which did work on the previous watch kit iteration).\r\n\r\n{code}\r\nTi.WatchSession.sendMessage({\r\n regulation: regulation\r\n});\r\n\r\n// The data payload of regulation is this, as output from the Ti logs\r\n[INFO] (\r\n[INFO] {\r\n[INFO] \"additional_licenses_required\" = \"\";\r\n[INFO] \"aggregate_created_at\" = \"2014-09-22 11:38:47\";\r\n[INFO] \"aggregate_id\" = 5;\r\n[INFO] \"aggregate_limit\" = 3;\r\n[INFO] \"aggregate_name\" = Grouper;\r\n[INFO] \"aggregate_updated_at\" = \"2014-09-22 11:38:47\";\r\n[INFO] \"bag_limit\" = 1;\r\n[INFO] \"created_at\" = \"2014-09-22 11:39:01\";\r\n[INFO] \"deleted_at\" = \"\";\r\n[INFO] effective = 0;\r\n[INFO] \"effective_at\" = \"2014-09-22 11:39:01\";\r\n[INFO] \"effective_status\" = \"\";\r\n[INFO] \"gear_created_at\" = \"2014-09-22 11:38:46\";\r\n[INFO] \"gear_description\" = \"Dehooking device use required as needed.\";\r\n[INFO] \"gear_id\" = 1;\r\n[INFO] \"gear_name\" = Dehooking;\r\n[INFO] \"gear_updated_at\" = \"2014-09-23 13:02:00\";\r\n[INFO] gigging = 0;\r\n[INFO] \"gigging_status\" = Prohibited;\r\n[INFO] id = 539;\r\n[INFO] \"location_area\" = \"fl_atlantic_state\";\r\n[INFO] \"location_created_at\" = \"2014-09-22 11:38:56\";\r\n[INFO] \"location_id\" = 5;\r\n[INFO] \"location_is_top_level\" = 0;\r\n[INFO] \"location_name\" = \"FL Atlantic State Waters\";\r\n[INFO] \"location_prohibited\" = 0;\r\n[INFO] \"location_prohibited_message\" = \"\";\r\n[INFO] \"location_rank\" = 100;\r\n[INFO] \"location_updated_at\" = \"2015-08-04 22:09:15\";\r\n[INFO] \"max_size\" = \"\";\r\n[INFO] \"measurement_abbreviation\" = TL;\r\n[INFO] \"measurement_created_at\" = \"2014-09-22 11:38:47\";\r\n[INFO] \"measurement_description\" = \"Total length means the straight line distance from the most forward point of the head with the mouth closed, to the farthest tip of the tail with the tail compressed or squeezed, while the fish is lying on its side.\";\r\n[INFO] \"measurement_id\" = 1;\r\n[INFO] \"measurement_name\" = \"Total Length\";\r\n[INFO] \"measurement_unit\" = in;\r\n[INFO] \"measurement_unit_symbol\" = \"\\\"\";\r\n[INFO] \"measurement_updated_at\" = \"2014-09-22 11:38:47\";\r\n[INFO] \"min_size\" = 24;\r\n[INFO] \"multiple_hooks\" = 0;\r\n[INFO] \"multiple_hooks_status\" = Prohibited;\r\n[INFO] notes = \"Limit 1 Gag or Black Grouper\";\r\n[INFO] \"parent_id\" = 539;\r\n[INFO] prohibited = 0;\r\n[INFO] \"prohibited_status\" = No;\r\n[INFO] published = 1;\r\n[INFO] \"published_at\" = \"2014-09-22 11:39:01\";\r\n[INFO] \"published_status\" = Published;\r\n[INFO] seasons = \"[{\\\"id\\\":458,\\\"regulation_id\\\":539,\\\"starts_at\\\":{\\\"date\\\":\\\"2015-01-01 21:52:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"America\\\\/New_York\\\"},\\\"ends_at\\\":{\\\"date\\\":\\\"2015-04-30 21:52:21.000000\\\",\\\"timezone_type\\\":3,\\\"timezone\\\":\\\"America\\\\/New_York\\\"},\\\"created_at\\\":\\\"2015-05-11 21:52:19\\\",\\\"updated_at\\\":\\\"2015-05-11 21:52:19\\\"}]\";\r\n[INFO] snagging = 0;\r\n[INFO] \"snagging_status\" = Prohibited;\r\n[INFO] spearing = 0;\r\n[INFO] \"spears_status\" = Prohibited;\r\n[INFO] \"specie_created_at\" = \"2014-09-22 11:38:48\";\r\n[INFO] \"specie_edibility\" = \"Excellent, but large individuals may contain ciguatera toxin and elevated mercury levels.\";\r\n[INFO] \"specie_fish_id\" = 202;\r\n[INFO] \"specie_id\" = 17;\r\n[INFO] \"specie_name\" = \"Grouper, Gag\";\r\n[INFO] \"specie_shape_created_at\" = \"2014-09-22 11:38:48\";\r\n[INFO] \"specie_shape_id\" = 7;\r\n[INFO] \"specie_shape_name\" = \"Oblong Big Mouth\";\r\n[INFO] \"specie_shape_updated_at\" = \"2014-09-22 11:38:48\";\r\n[INFO] \"specie_synonyms\" = \"[]\";\r\n[INFO] \"specie_updated_at\" = \"2014-09-22 11:38:48\";\r\n[INFO] \"trophy_limit\" = 0;\r\n[INFO] \"trophy_size\" = \"\";\r\n[INFO] \"updated_at\" = \"2015-05-11 21:52:21\";\r\n[INFO] \"user_id\" = \"\";\r\n[INFO] \"vessel_limit\" = \"\";\r\n[INFO] }\r\n[INFO] )\r\n{code}\r\n\r\nSame delegate as above, and it's never invoked. There is also nothing in the console that indicates there was a problem.\r\n\r\nAfter playing around with it...if you have a null value it doesn't work.\r\n\r\ni.e.\r\n\r\nworks\r\n{code}\r\n\t\t\tTi.WatchSession.sendMessage({\r\n\t\t\t\tregulation: {\r\n\t\t\t\t\tfoo: \"bar\",\r\n\t\t\t\t}\r\n\t\t\t});\r\n{code}\r\n\r\nDoesn't work\r\n\r\n{code}\r\n\t\t\tTi.WatchSession.sendMessage({\r\n\t\t\t\tregulation: {\r\n\t\t\t\t\tfoo: null,\r\n\t\t\t\t}\r\n\t\t\t});\r\n{code}", "attachment": [], "flagged": false, "summary": "watchOS2 sendMessage fails on certain payloads", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }