This discussion is archived
13490 Views 29 Replies Latest reply: Feb 22, 2009 8:05 PM by codz
Currently Being ModeratedJul 15, 2008 3:48 AM (in response to eventhough)They must have used the private framework called PhotoLibrary which gives you access to the lower level camera API. I have not found any delays when using this framework. It is not officially made available by Apple and I'm surprised that Apple has allowed an app using it to be in the App store. If you want to use it you'll need the headers from the iphone dev team.
Currently Being ModeratedJul 15, 2008 7:59 AM (in response to kb1ooo)I thought using the private frameworks was a terms of service violation. Were these guys able to sneak something past Apple or is Apple just looking they other way when they want to.
Currently Being ModeratedJul 15, 2008 8:10 AM (in response to eventhough)I just tired to download the Phanfare app to take a look at it and got an error message: "The item you've requested is not currently available in the US store."
I wonder if Apple found out what they were doing and does not like it? Or is this just a glitch with the App Store?MacBook, Mac OS X (10.5.3)
Currently Being ModeratedJul 15, 2008 8:11 AM (in response to jdheard)seems odd that the testers didn't catch it earlier... i know they are doing more than just opening and closing the apps... but then, i guess they are prolly really, really busy.mac book pro
Currently Being ModeratedJul 15, 2008 8:24 AM (in response to kb1ooo)ya, tried to download phanfare this morning. looks like apple pulled it. Unless I'm missing how to use UIImagePickerController properly, it is way too slow (for camera pics) to be useable. I get 2s to preview, then 7s after confirmation. If I use the PhotoLibrary framework, everything is just as snappy as it is with the native camera app. Abt 1.5 to 2s to snap a pic.
Currently Being ModeratedJul 15, 2008 9:07 AM (in response to kb1ooo)a large portion of the 7s can be in your app... i found that getting to the first line of my app code was about 3 or 4 (still waaaay too slow). i also found that processing the photo took a very long time in my app (that is where the other 3 or 4 sec went). when i backgrounded that operation with this call:
[NSThread detachNewThreadSelector:@selector(backgroundSaveImageHolder:) toTarget:self withObject:theImage];
i got much much better results... but then i had all the pain of syncing back up the threads on the other end and making sure all the releases and retains were in the right place.
Currently Being ModeratedJul 15, 2008 10:02 AM (in response to jdheard)You're right, Phanfare is no longer available into the AppStore. But I try another app yesterday that has direct camera access: "SnapMyLife". It works nice on my iPhone (1st gen, upgraded with FW2.0). It seems to be always available into the AppStore at this time.
I'm very interested to know if some kind of private agreement with Apple exists to get access to an "extended SDK". IMHO it's the only way to use the official SDK for 2.0 FW with PrivateFrameworks like the PhotoLibrary. I cannot figure out how to use the dev-team headers with the new firmware. The modified version of the "class-dump" utility seems doesn't work anymore...
Anyone from Apple reading this ?mbp, Mac OS X (10.5.4)
Currently Being ModeratedJul 15, 2008 10:34 AM (in response to xoumi)xoumi,
I don't know what you mean. I just downloaded snapmylife and it uses the uiimagepickercontroller interface? It even actually takes longer to get to the preview (abt 3-4s) and crashes when hitting "use photo".
I've had no problems using the headers provided by the dev team with the latest SDK. Just follow the instructions carefully on their wikee.
Currently Being ModeratedJul 15, 2008 10:43 AM (in response to johne-dm)johne-dm,
I'm not sure how I could be hogging anything in my app. The app just has a tab bar with 2 tabs. Click on the camera tab and it launches the uiimagepicker modal view. The delegate just dismisses the modal view and adds the image to the tab item's view.
Can you be more specific abt how you optimized you app, and the performance enhancement?
Currently Being ModeratedJul 15, 2008 11:27 AM (in response to kb1ooo)well... you can put in some log statements at the beginning of your image handler method and at the end with timing info:
NSLog(@"pick start:%f", [[NSDate date]timeIntervalSinceReferenceDate]);
// do your work here
NSLog(@"pick end:%f", [[NSDate date]timeIntervalSinceReferenceDate]);
the numbers you see will be in seconds (with fractions of seconds as the decimal protion).
you can then look at the debug console and see if it is taking up alot of time in there. i found that just setting a UIImageView image property didn't take long at all, but trying to do anything with the image like save it, turn it into a jpg, scale it, etc, etc takes several seconds.mac book pro
Currently Being ModeratedJul 15, 2008 3:24 PM (in response to jdheard)Hi all, the Phanfare app is currently not downloadable the app store (you can search for the app but not download it). We have contacted Apple and are waiting to hear back. Note that the camera framework we used was documented in a book by O'Reilly. We definitely did not get any headers from Apple or reverse engineer anything.
We are not sure why the app was removed. The camera controller we used lets us offer a much better experience to users (faster) and a workflow that makes sense to us. But obviously if Apple does not want us to use it and requires that we use the slower control, we will do so. We certainly want the app back in the store. Our reviews have been strong. We are also huge supporters of Apple (see http://blog.phanfare.com)
It may just be a glitch. We don't know any more than you do on this unfortunately.
Phanfare, Inc.Macbook Pro, Mac OS X (10.5.4)
Currently Being ModeratedJul 15, 2008 3:57 PM (in response to applephan)Andrew,
Could you please offer us a tip on how you were able to access the camera directly? As of right now, it seems like every single app on the store is using the UIImagePicker except Phanfare. Even Facebook uses the UIImagePicker. All of us are wondering how it can be done.
We understand you wish to protect your proprietary code, but this is not something that will "make or break" your application. Letting us know will help the entire community and make the iPhone an even better experience for all users. Please consider helping us out a little bit and giving back to the community.
If Phanfare does not violate any terms of service, it should be okay for you to let us know how it was done.
ThanksMacbook, Mac OS X (10.5.3)
Currently Being ModeratedJul 15, 2008 4:57 PM (in response to eventhough)I really don't think Apple wants people using the camera except via the sterilized interfaces.
Otherwise all our apps could be taking pictures and sending them back to our servers with the users any the wiser..
Currently Being ModeratedJul 15, 2008 5:27 PM (in response to eventhough)eventhough,
Sample code has been all over the internet for almost a year. You need the PhotoLibrary classes, in particular CameraController. Do a search at code.google.com for iflickr as an example. Also visit the forums at idevdocs.com. You'll need the headers which you can get from the iphone dev team. Just do a google search for iphone dev team.