Automatically exported from code.google.com/p/iphone-photo-picker
0
stars
0
forks
source link
readme
Customizing PhotoPicker for your own iPhone-based web app
Customizing PhotoPicker for your own iPhone-based web app
XCode Project
Images
icon.png - replace with an iPhone app icon (57x57 pixels)
logo.png - replace with your logo (280x88 pixels max -- will center automatically)
XIBs
PhotoPickerViewController.xib - can be customized with fancier graphics or button labels
Plist
photopicker-Info.plist - replace "yourcompany" with the name of your company. See "Bundle identifier", "URL types":"URL identifier", and "URL types":"URL Schemes". Also replace "${PRODUCT_NAME}" with the name of your product or company.
Source Code
PhotoPickerAppDelegate.m - replace "yourcompanyname" with the name of your company (or update the URL appropriately otherwise -- see comment).
From the Web App
Add the following Javascript section to your web application, replacing the URLs as appropriate.
continue - (required) the URL to open in Safari after the POST operation is complete, or the user cancels. The GET parameter "success=1" is automatically added on success.
context - (optional) a string value to pass as a POST parameter to the upload URL. This can be used to help maintain state information.
source - (optional) the preferred source type, to start out with, if it's available. Options are: "camera" and "library". If left off, a menu of choices may be presented in the application.
maxsize - (optional) the maximum width or height of the image to upload. Images are scaled with their aspects maintained.
On Your Web Server
You will need to write code to accept uploaded images. Images are uploaded using standard http multipart/form-data encoding. The following POST parameters are passed:
context - the string value passed when launching the application.
image_file - the uploaded file. This will always be given the filename "photopicker.jpg".