Get Iphone User Wallpaper? - iphone

In xcode, is it possible to get the image file that is currently being used at the user's wallpaper? I would like to display it as a background in my app.

It is not possible through public API-s, however if you wanted to use it as an iOS7 UIWindow background, maybe this question will help you.
If you are jailbrooken then you can find the images there:
Homescreen: /var/mobile/Library/SpringBoard/HomeBackground.cpbitmap.
Lockscreen: /var/mobile/Library/SpringBoard/LockBackground.cpbitmap.
When wallpapers are the same there will be only one of those files.
source

Related

How to use FLICKR API on xcode to show an image of the current position?

My question is simple: how can i use FLICKR api to show on the screen of my iphone/ipad an image of the place in the courrent position or, in alternative, an image of a choosed place?
thanks
i have not done an app related to this before. but you might want to try:
https://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html
and a library like this:
https://github.com/lukhnos/objectiveflickr

iPhone: iPhoto like tile view for image browsing

In an iPhone application I want to create an UI that just look like iPhoto application where photos will be loaded like iPhoto's tile view.
I am planning to use UITableView To achieve this.
How can I manage showing random sizes images just like iPhoto app shows in there gallery view?
Any library which will help to achieve it? Can you please provide code sample url's?
Shiv you can try AQGridView that may help you to achieve what you are looking for.
You can also wait for IOS 6 and see photo tools.
check out http://three20.info/ as well and may help you. Probably you may have hit iPhone show photos/images sliding (like photo library and Facebook app)? link. but be sure to check this link.
Hope this many things would help you; I tried to give answer in noon but it take me late and it's evening now.

Get a screenshot while App is in background? (Private APIs allowed)

I am developing a monitoring application for the iPad. It already uses private frameworks to send artificial events and simulate user input, while my App is on the background and another App on the foreground.
Now my problem is, I need to get a screenshot of the iPad as an image programatically. I know the UIGetScreenImage method, and also rendering every view on the screen to get the image. However, UIGetScreenImage cannot be called from the background. (I get an error telling me that when I try it from the background) And I cannot render the views from another App, since I only know my App's views.
OPTION 1
I am able to simulate a click on the home and lock keys, for the iPad to generate a screenshot. Afterwards, I use private APIs to access this image from the photoalbum, using the [PLPhotoLibrary](https://github.com/nst/iOS-Runtime-Headers/blob/3686717e107fa36a990fac20c30da2da9a25b698/PrivateFrameworks/PhotoLibrary.framework/PLPhotoLibrary.h
), PLPhotoAlbum and PLPhoto.
id lib = [PLPhotoLibrary sharedPhotoLibrary];
id allPhotosAlbum = [lib allPhotosAlbum];
id contents = [lib albumContents];
id lastPhoto = [contents objectAtIndex:[contents count] -1];
UIImage *screenshot = [lastPhoto newFullSizeImage];
The only problem with this approach is that the screenshots will stack up ont he album, filling the iPad's memory. So either I need another way, or I need a way to delete this pictures. But, when I call the delete methods in the photo album and photo library, I get a "SQLITE error 8 [attempt to write to readonly database]
Any suggestions on how to achieve this screenshot thing in a better way would be appreciated.
I will not be uploading this App to the App store. It is for private use.
It used to be that you could capture a screen-shot of the entire device screen, from the foreground or the background, using IOSurface. Apple blocked that API in iOS 9. It's no longer possible without jail breaking your device, private API or not.
Jailbreaking your device is probably the only recourse, not that I recommend doing that.
However, Apple never intended for people, developer or not, to use their iPad in the manner you describe.
After massive testing and trying, I concluded that even with private APIs erasing the photos from the photo album is too much of a problem, maybe even impossible.
I ended up writing a script that simulates user inputs and erases the photos.
You can use following private API: [[UIWindow class] performSelector:#selector(createScreenIOSurface)];

iPhone/ iPad app development TV Out

HI,
I have just submitted my first application to iTunes for approval, however, there is one thing I really want to add to it ASAP.
I would like to code into an app that it can use the TV Out functions of both the iPhone and iPad? Ideally it would work in a similar way to how keynote works i.e. you see a bit more on the iPad itself than is projected on the TV, but even just mirroring the screen would be a step in the right direction.
I have searched all over for this and all I keep getting is about downloading jailbreaks for you iPhone to mirror the screen, which doesn't really help.
Thanks in advance,
If you just want to mirror, use my TVOutManager singleton. I've put up code to do this on github: https://github.com/robterrell/TVOutManager (Hmmm... I just noticed I haven't pushed the most recent code. I'll review and push new code asap.) I wrote up some detailed info about it at http://www.touchcentric.com/blog/archives/123 if you want to know the how's and why's.
Basically, just add the files to your project, and call:
[[TVOutManager sharedInstance] startTVOut];
If you want to do more than mirroring, read the docs on UIScreen. It's fairly trivial to create a UIWindow on the external screen (steal the bits from TVOutManager if you need to) and add subviews to it. This way you could have a Keynote-like controller on the device screen, while the main display is on the external display.
http://mattgemmell.com/2010/06/01/ipad-vga-output should get you started ...
Mirroring is not possible.
But to draw on an external display, just get the UIScreen object for the external display, then set the screen property of a UIWindow to it, (making sure to set the frame correctly etc) everything in that window should be drawn on the respective display.
Relative links:
developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html (look at screen property)
developer.apple.com/library/ios/#documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html (look at +screens)
(I don't have any reputation => can't post clickable links)
I think, you can't do this. You can only stream videos from iPod app.
But, if you have jailbreak on your device, try this (link) or take a look at this great YouTube video (link) showing exactly what you need.

How to make UI Image Picker Controller read a custom source type in iPhone

I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app.
UIImagePickerController reads only the following source types.
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum
I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read them and display.
Looking at the class references I found UIImagePickerController reads only from the resources mentioned above. Which means it can only pick the images from camera roll OR saved photo gallery OR allow user to take a pic and use it.
Does anybody know how to make UIImagePickerController read from custom source type or images?
OR
How to create a photo gallery app in iPhone :-)
Thanks,
AJ
I don't believe it is possible to make the UIImagePicker pick images from your own source. You will have to write the picker yourself (which, performance aside, doesn't seem to hard... Just a couple of UIImageViews in a UIScrollView).
Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController