GeraudBourdin / Ti.SvgView

Create a view from an svg file (expose the androidsvg-1.2.1 lib and the SVGKit 2.X for IOS lib).
MIT License
50 stars 24 forks source link

Alwas 256 error time #6

Closed MichelBahl closed 9 years ago

MichelBahl commented 9 years ago

I am getting always the erorr below, it doesn't matter what parameter I pass to the createView

message = "Error internally in Apple's NSData trying to read from URL 'E1BEB61654A6904B.png'. Error = Error Domain=NSCocoaErrorDomain Code=256 \"The operation couldn\U2019t be completed. (Cocoa error 256.)\" UserInfo=0x7f8678f29a40 {NSURL=E1BEB61654A6904B.png}";

Maybe it's related to this tsackoverflow post: http://stackoverflow.com/questions/10106087/nscocoaerrordomain-code-256

Unfornately does your examples not wortk, it would be great if you would offer an working sample.

GeraudBourdin commented 9 years ago

there is a working test app : https://github.com/GeraudBourdin/Ti.SvgView-TestApp did you tryed it ? Wich version of titanium sdk are you using ? could you give some code and svg that does the error ?

MichelBahl commented 9 years ago

Thanks ! Yes this example works, with your .svg files. But I cannot use my .svg files, I have exported with illustrator, is there an special format I have to use.

omorandi commented 9 years ago

@MichelBahl, it looks like you're trying to load a png file, not svg

MichelBahl commented 9 years ago

It's defintely a svg file, I took a closer look at the file there is some reference to a png. I don't know a lot about svg standard maybe you can tell me what's wrong with it.

Here you can get a sample file: http://s000.tinyupload.com/index.php?file_id=00235262090135616583

GeraudBourdin commented 9 years ago

i see

image overflow="visible" width="854" height="862" xlink:href="A4692DDDC90C0791.png"  transform="matrix(0.24 0 0 0.24 452.8706 2426.1846)"

in your file. try to cleanup your svg and i think it will be fine :)

MichelBahl commented 9 years ago

Thx for your help and thanks for the great module, now it's working fine.

GeraudBourdin commented 9 years ago

you 're welcome :)