My client failed to install my AdHoc build on his iPhone.
The phone just said “Failed to install XXX. Done/Retry?”
iTunes failed with a message “Unknown error” and a link to non-existing page on Apple site.
Of course, my client was not happy so am I.
After connecting the phone to Mac and looking at Console (XCode->Window->Organizer->Console) I realized that XCode 4 doesn’t support ARMv6 architecture by default (do they consider that everyone bought iPhone 4 (S?) already?)
Thu Dec 8 21:24:02 unknown installd[1915] : 2ff68000 preflight_application_install: Incorrect architecture at /var/tmp/install_staging.SLcAhM/foo_extracted/Payload/XXX.app
Thu Dec 8 21:24:02 unknown installd[1915] : 2ff68000 install_application: Could not preflight application install
Thu Dec 8 21:24:02 unknown com.apple.itunesstored[1908] : MobileInstallationInstall: failed with -1
Thank you, Apple! That’s so obvious.
Googling by iTunes error code gives my hundred possible reasons (and no mention to wrong architecture).
Of course, wrong building options was my mistake, but it is very hard to realise what’s going on by such informative error messages.
So I added armv7 to architecture list in project options Build settings -> Architectures and voila! Everything works fine now.
SVGKit works good only with shipped samples and crahes on “real world” SVGs.
CKSVG looks good, but it doesn’t support iOS out from box as soon as it’s designed for Mac, and opens my files with some errors (anyway better than SVGKit)
The main problem is a lack of free time. I had no time to fix compilers’ error, crashes and port code for Mac to iOS. I needed a ready solution and I need it quick.
I was not alone in my research. Another guy had a same problem (and I made the same reserch as me). But I could not use unstable solution in hope that it will work in my case, so I started a little investigation and I found out, that SVG can handle touches and executes javascript. OMG it can be even animated! So I tried to put it into UIWebView and now, at 1:47 am looks like I succeed.
First, SVG can be loaded with a loadHTMLString: method; I had to use this code instead:
NSData * svg = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"africa" ofType:@"svg"]];
delegate’s method!
I still had to get rid of nasty black rectangle (link highlighting) when I tapping on map, but anyway, this approach is much better than rasterization my SVG images or dealing with buggy third party code…
This is my blog. I will write here about my job, about my passions, about my life but I will not bother you with the details of my private life and I will try my best to stay objective(-oriented) and unprejudiced. (hey wtf. That’s a bullshit, blogs are biassed by the nature).
Please be polite, tolerant and respect each other.
All characters appearing in this work blog are fictitious. Any resemblance to real persons, living or dead, is purely coincidental.