Skip navigation
This discussion is archived

Phanfare iPhone app has direct camera access?! How?!

13542 Views 29 Replies Latest reply: Feb 22, 2009 8:05 PM by codz RSS
1 2 Previous Next
eventhough Level 1 Level 1 (10 points)
Currently Being Moderated
Jul 11, 2008 3:56 AM

I'm sure many of you have tried out some of the apps on the AppStore. One app in particular caught my attention because I have no idea how they were able to pull it off.

For the longest time, I've always assumed that the only way we could access the camera was through the UIImagePickerController. This forced everybody to use the built-in view as well as experience the slow saving state of the camera. Others have mentioned in this forum that the image picker is much slower than the native camera app.

But if you take a look at Phanfare, they were somehow able to circumvent the image picker completely and gain access to the camera. Their application seems very fast.

My only guess right now is that they were somehow able to figure out how to strip the built-in view layers off of the image picker.

But when they save the photo, it's also very fast and responsive.

Does anybody have an idea how they were able to do this?

Thanks for your help in advance.
Macbook, Mac OS X (10.5.3)
  • kb1ooo Calculating status...
    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.

  • jdheard Calculating status...
    Currently Being Moderated
    Jul 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.
  • jdheard Level 1 Level 1 (10 points)
    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)
  • johne-dm Level 1 Level 1 (25 points)
    Currently Being Moderated
    Jul 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
  • kb1ooo Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jul 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.

  • johne-dm Level 1 Level 1 (25 points)
    Currently Being Moderated
    Jul 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.
  • xoumi Calculating status...
    Currently Being Moderated
    Jul 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)
  • kb1ooo Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jul 15, 2008 10:34 AM (in response to 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.

  • kb1ooo Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jul 15, 2008 10:43 AM (in response to 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?

  • johne-dm Level 1 Level 1 (25 points)
    Currently Being Moderated
    Jul 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
  • applephan Calculating status...
    Currently Being Moderated
    Jul 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

    It may just be a glitch. We don't know any more than you do on this unfortunately.

    Andrew Erlichson
    Phanfare, Inc.
    Macbook Pro, Mac OS X (10.5.4)
  • blazespinnaker Calculating status...
    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..
  • kb1ooo Level 1 Level 1 (0 points)

    Sample code has been all over the internet for almost a year. You need the PhotoLibrary classes, in particular CameraController. Do a search at for iflickr as an example. Also visit the forums at You'll need the headers which you can get from the iphone dev team. Just do a google search for iphone dev team.

1 2 Previous Next


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.