Retrieving a file from iPhone device - iphone

I'm making a game and writing save files into the document directory on the iPhone.
Is there a way for me to retrieve these files from the actual device? I know I can find the ones saved from the simulator.

You can plug the phone into your Mac, and open Xcode and then Xcode's Organiser window.
From there, you can select your iPhone from the device list on the left. This will show the details of your iPhone, (provisions, installed apps etc).
You should be able to see your app in the list of installed apps, with a disclosure arrow next to it ( > ). Click that and it'll expand to show a package icon with the text Application Data, and a "download arrow" icon to the right.
Click the download arrow and it'll ask you where to save the data.
The result is a folder containing the Documents, Library and tmp directories from your application.
Hope this helps.

Related

iOS simulator options changes

When I open any song site through simulator of iPhone or iPad say mp3skull.com . and when i click on option download It gives me the Alertview option to COPY and OPEN . IS there any way I can give one more option in this .say open copy download. for more clarity shown in page :
1st off: I no not think that adding a specific item there is possbile.
Now assuming you actually want to add a "Download" button, consider this:
Opening a file by default means you have to download the file first
"Download" on a PC/Mac just puts the file into a "known" folder where you can open it with any program later while "open" puts it into a (possibly) random temp folder and then runs the default program
Due to the nature of safari in iOS a "Download" button would be more like "Store in Safari for later"
Open in safari is -> Download, Store, Ask user what app he wants to use to open the file type.
So considering the above points I do not see how a "Download" button would function. If you have some more details what you want your button to do, maybe there is an alternative that will work for you.

Objective C - iPhone simulator path is not found in MAC LION

Am using Mac lion for developing iPhone application, there I created database and copied into documents directory of the application, But the path to the applications documents directory not found in my lion, even the "Library" folder is not available under the lion's username.
I searched completely on my lion for the folder Library which has "Application support" following with "iPhone simulator" is not found. I checked for the moving of deletions of the folder, But it's not happened.
Anybody knows for what I can't find the folder.
Please advice me, I not available what can I do to resolve this.>
Thanks in Advance!!!
Your library folder is bydefault hidden so you will have to unhide it.
You can get information about showing hidden files here
Edit1:
You can also go to library in following way
Right click on Finder icon of your Dock
Click on "Go to Folder".
Type `/Users/yourusername/Library.
Click on Go.
Edit2:
you can permanently unhide the folder with following command
chflags nohidden /Users/yourusername/Library
From the Xcode menu on top, click preferences, select the locations tab, look at the build location option.
You have 2 options:
Place build products in derived data location
Place build products in locations specified by targets
By default, your derived data directory will be under ~/Library/Developer/Xcode/DerivedData/AppName/Build/Documents.
Please confirm whether you got ?
You can also check my answer.
See my answer in this post.You should clear your trash folder and reset it.For more detail click below link.
No iphone simulator folder in Application support
Please look at the following solutions: http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-files.html
Apple made the user library folder hidden by default with the 10.7 release. If it's necessary to access these files for Adobe-related troubleshooting, use one of the following methods to make the user library content visible.
Method 1
In the Finder, choose Go > Go To Folder. In the Go To Folder dialog, type ~/Library Click Go.
Method 2
Hold down the Alt (Option) key when using the Go menu. The user library folder is listed below the current user's home directory.
Note: After you open the Library folder, you can drag the Library icon from the top of that window to the Dock, Side Bar, or toolbar. That way, it's readily accessible.
Method 3
The following method makes the user library folder permanently visible.
Note: Adobe recommends that only advanced users use this method.
Launch Terminal from Mac HD > Applications > Utilities. From within Terminal type the following command and press Return:
chflags nohidden ~/Library Enter the system administrator password, if prompted, and press Return.
Note: The System administrator password is not visible as you type it.
Close Terminal for this change to take effect.

Icons in distribution application bundle for iPhone are blank

I've set all the icons to use in MonoDevelop (including the correct resolutions). The icon for my app shows up in the simulator correctly as it does show up correctly on my iPhone device.
However after I build the app for distribution I've noticed when I browse the .app package has blank png files titled 'icon', so there's a blacnk Icon-small.png, Icon-Small#2x.png, Icon#2x.png and Icon.png.
I'm guessing these icons sould actually be the icon images?
Since it works on the device, I believe the contents of the app package are encrypted so that if you view it on your mac you won't see anything. The encryption would have to be stripped for you to see the contents.
Edit: I don't know if this actually true though - I looked at an ad-hoc build I have here and I see the same blank icons, however I do see dimension information (60x60) when I get-info in Finder. Presumably if it couldn't read the file at all, it wouldn't be able to see the dimension information? Also I can read the plists in the app just fine.
The answer is in another SO post: "Show Package Contents" of iPhone build release reveals blank PNGs?

How to share files between iOS app and iTunes

I know Google Maps (or VLC used to) lets you share files from iTunes to your iOS Device. Is there a way to share any stuff from iOS app to iTunes and ViceVersa
Here's a tutorial that 10 seconds of Googling yielded.
File sharing from app to iTunes is too easy
In the new Xcode, you can do this in the UI:
1. Select your project in top left
2. Select target in next column
3. Click on Info tab
4. In Custom iOS Target Properties, hover mouse over any row and click +
5. In popup, select "Application supports iTunes file sharing", then set Value to YES on right
6. Click Validate Settings at bottom to make sure all is good

Why is my icon not being distributed to the device?

During the work on my iPhone application the icon changed from time to time. Colleagues or management came with fancy new ideas and .pngS and all I did was changing the Icon.png in the file system. Most times the new icon was distributed to simulator or device with the very next build, sometimes I had to delete and add th icon.png in Xcode (images), but it worked.
Then, the other day I added the UIPrerenderedIcon element to the info.plist to eliminate the icon's shine (it worked) and since I did, I've problems with bringing new icons to the device:
Simulator shows new icon when in debugging mode
Simulator doesn't present new icon in release mode (only when debugging was used before)
Never new icons on any iPhone or iPod
Whenever icon distribution fails, a white square or (even stranger to me) an old icon (corresponding .png is completly eliminated from the file system) is shown
Any ideas?
Try cleaning all targets, that is most likely the case of the old icon showing up.
Also, this happened to me a few times (with in app images)...
The simulator is case insensitive to file names, but the device IS case sensitive.
So, if in the info.plist you say your icon file is: ICON.png
But the actual file is named: icon.png
Then, the simulator will display the icon, However, the device will not.
When ever you change the icon image Try deleting the old application from the simulator/iPhone and thenm reinstall it.. Some times such problem occur with me too.. and also
FOR icon on iTunes
Make the icon image 512 x 512 JPEG or PNG file named iTunesArtwork. Then go to get info and remove the extension. Note that the file must not have an extension.
After generating the file of your application’s icon, follow these steps to add it to your application:
Open your project in Xcode.
In the Groups & Files list, select the Resources group.
Choose Project > Add to Project, navigate to your iTunesArtwork file, and click Add.
In the dialog that appears, select the ”Copy items” option and click Add.
Note that the PNG or JPEG file is just 'iTunesArtwork', with no suffix.
If you try to copy the file into the application bundle after you have built it, it will break the app signing, and you will get a verification error when trying to sync it to your device. Ensure that the artwork file is included in the "Copy Bundle Resources" folder, within your project's target in XCode (step 4, above).
Then drag and drop your app file to the iTunes for cross checkin whether you have done all things correct or not.
Hope this helps..
Start Application in xcode
1 Change the name of the icon.png to icon1.png
2 Remove the app from the simulator or the device
3 Clean all targets
4 Change icon1.png back to icon.png
5 Run app again