[TIMOB-3190] iOS: Encoding base64 images not working
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-08-05T14:24:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint 2011-31, Release 1.8.0 |
Components | iOS |
Labels | klist, module_utils, qe-testadded |
Reporter | Pedro Enrique |
Assignee | Blain Hamon |
Created | 2011-04-15T03:39:06.000+0000 |
Updated | 2012-08-28T03:15:39.000+0000 |
Description
There is a HD ticket asking for the Base64 feature to work on images as a blob, which do not work now. There is an Obj-C suggested code that I have tested and works: http://www.pastie.org/1590281">http://www.pastie.org/1590281 (UtilsModule.m)
The JS example is:
var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'KS_nav_phone.png');
var blob = f.read();
var encoded = Ti.Utils.base64encode(blob);
Ti.API.info(encoded);
HD Ticket: http://developer.appcelerator.com/helpdesk/view/74871">http://developer.appcelerator.com/helpdesk/view/74871
Tested on Ti SDK 1.6.0 RC1
iPhone Simulator 4.2
I have a patch for this here:
https://appcelerator.lighthouseapp.com/projects/32238/tickets/1611-ios-base64-encodingdecoding-of-blob-cannot-be-round-tripped-successfully"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/1611-...
But can someone please patch the Titanium mobile SDK so that I don't have to keep updating every time a new SDK is realease?
Thanks :)
Should be using stream support instead of f.read()
Updated to IMMEDIATE. Currently blocking a customer project
so, since this is fixed? How do i get it? do I need to move to the nightly builds?
Ti.Util.base64encode seems not to be working in iOS at all in 1.7.2 - it breaks when used for plain text for HTTP Basic auth as well.
This still does not seem to be working in 1.7.5, it's making it impossible to finish a project I'm working on
Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120827143312,1.8.2 Tested with Titanium Studio: 2.1.2.201208201549 Device - iOS 5.1 Machine OS - MAC 10.7.3