{ "id": "161057", "key": "TIMOB-23508", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-07-31T15:15:25.000+0000", "created": "2016-06-13T22:43:34.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "52033", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "91758", "key": "TIMOB-9111", "fields": { "summary": "TiAPI: Ti.Utils.base64encode behaves different between Android and iOS/Android", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-07-31T15:15:31.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Replacing our base64encode/decode methods with a more versatile methods, using [base64EncodedDataWithOptions|https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/#//apple_ref/occ/instm/NSData/base64EncodedDataWithOptions:]. \r\n\r\nDemo Code:\r\n{code:javascript}\r\n\r\n var win = Ti.UI.createWindow({backgroundColor:'white'});\r\n\r\n var longString = 'ABCDEFGHIJ1234567890ABCDEFGHIJ12|psndemo2|abcd:12345678901234567890';\r\n var tiBase64ShortResult = Ti.Utils.base64encode(longString,Ti.Utils.ENCODE_TYPE_CR);\r\n\r\n \r\n var tiBase64ShortResult = String(tiBase64ShortResult);\r\n var decodededString = Ti.Utils.base64decode(tiBase64ShortResult);\r\n\r\n var alertDialog = Titanium.UI.createAlertDialog(\r\n {\r\n title: 'Result', \r\n message: 'short: ' + tiBase64ShortResult, buttonNames: ['OK','Cancel'] \r\n });\r\n alertDialog.show();\r\n\r\n if (decodededString == longString) {\r\n Ti.API.info(\"Match!\");\r\n }\r\n\r\n win.open();\r\n{code}\r\n\r\n*Expected Result*\r\n* The encoded string inside the alert should have Carriage Return\r\n* \"Match!\" should be logged to confirm the decoded string matches the original", "attachment": [], "flagged": false, "summary": "iOS: Use native NSData base64 encode API to replace our current methods", "creator": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "388249", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR:https://github.com/appcelerator/titanium_mobile/pull/8058", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-13T23:45:23.000+0000", "updated": "2016-06-13T23:45:23.000+0000" }, { "id": "392065", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-31T15:15:25.000+0000", "updated": "2016-07-31T15:15:25.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }