Examine the content of created plist - iphone

In my program I store some data in a plist. The plists content changes during user activities. Is there any option to examine the content of such created file in xcode?

If you want to retrieve the plist from a device, you can use Xcode's "Organizer", choose "Devices" tab, and then you can download the data associated with a particular app there:
When you download the xcappdata file, you can control-click on the file and choose "Show Package Contents" to navigate to the various folders in the app's sandbox.
Or if running the app on the simulator, you can navigate to "~/Library/Application Support/iPhone Simulator" and see the files there. If you don't see your "Library" folder, you can execute the following from the Terminal command line:
chflags nohidden ~/Library

Related

Is there a way to view your app's .entitlements file from your app's .ipa archive?

I think there's an issue with my app's .entitlements file when a .ipa is created and so I want to check the Bundle ID of the entitlements file. There's a fairly complicated build script I am using to change some stuff in there before building so I want to see what the final product is. I know that there used to be an Entitlements.plist that I could get off of the ipa but it doesn't seem to be there any longer. Is there any way to access the .entitlements file now?
For those getting here via Google, the Information Apple provides at https://developer.apple.com/library/ios/qa/qa1798/_index.html is a lot more recent.
Specifially, after unzipping the IPA:
Display the entitlements in the app by running:
codesign -d --entitlements :- "Payload/YourApp.app"
and display the provisioning profile by running:
security -D -i "Payload/YourApp.app/embedded.mobileprovision"
Sure, unzip the .ipa file which will create a Payload directory. Inside of the Payload directory is the application package. Right-click the app package in Finder to "Show Package Contents".
Look for the embedded.mobileprovision file which you can open with a text editor or plist editor. Look for the <key>Entitlements</key>

physical path for application documents directory

what is the physical path of any application's document directory ? (on Mac OS X Lion)
I know that there is UUID for each app on that folder but could not find it on my system until now
Open
/Users/UserName/Library/Application Support/iPhone
Simulator/4.3.2/Applications
Assuming 4.3.2 is the sdk version being used. Note that there's a Library folder inside MacintoshHD too, but you have to goto the one inside the current user's home directory. Also in Lion the user's Library folder is hidden by default. You'd need to click on Go on menu bar, holding the option key, to see it.
In Ios 5 this path has change it is as below
find this from GO menu of finder and find with Goto Folder and past this link
/Users/admin/Library/Application Support/iPhone Simulator
/Users/System Name/Library/Application Support/iPhone Simulator/4.3(target)/Applications
here you will see a bunch of folders for each application.Better rearrange them by date.Find yar application's folder inside that.And you will get your application document directory there.

How to download app data in Xcode 4.2

In the latest version of Xcode I could simply go to Organizer->MyDevice->Applications and then select the app I wanted to look at and download the appdata in form of a folder with all the app content. Now I only get a .xcappdata file.
How can I access this file for take a look in a .sqlite file?
Under the Data files in Sandbox pane in the Organizer, you'll find all the individual files that the selected app stores on the device and uses, displayed in a hierarchical view.
For my app, it looks like this:
To view the files in Finder, download the .xcappdata file, go to where you save it in Finder, Control-click on it and choose Show Package Contents. The directory structure is identical to what you see in the Organizer, and you can open and/or copy out the files as usual.
I'm constantly checking my app's database, so to speed things up I always download the .xcappdata to the same folder. I then run the following script that's sitting in that folder to look at the latest version of the database in 'sqliteman' (a sqlite program available through MacPorts):
#!/bin/bash
shopt - nullglob
for PACKAGE in *.xcappdata; do
CURRENT=$PACKAGE
done
sqliteman "$CURRENT/AppData/Documents/yourapphere.sqlite"

.ipa , where i can found it

I have a great problem. How i can generate the .ipa of my iPhone application, and i can found it ? in iTunes ? i have all provisionnig profile, just the .ipa is my problem
i have done build for archiving but i am seraching all and i don't found the .ipa to send it via email .
please, Help.
Thanks for yourn answers
Don't use "build for archiving", select "Archive" instead. You need to select a scheme targeted at a device (not the simulator) to do that. Then, in the organizer, click on the archived build and hit "Share" to generate your .ipa file.
Here is the steps for make .ipa file.
build your project.
Go to build folder -> select target build folder -> select builded application file.
Make zip of that selected application file.
Rename that .zip file to .ipa then press enter -> click on Use .ipa option.
Put that .ipa file on /Users/ *userName */Music/iTunes/iTunes Media/Mobile/
Open iTune -> click on App tab and then you can see your app there.
Now Sync it for use in device.
Try this
Build->Products->urProduct.app->drag
into iTunes->select
app->right-Click->showInFinder->ipa
Build your project.
Go to Products in work tree
Select appname.app
Drag into iTunes
Right-click app and "Show in Finder"
Access .iPa

How to make an ipa file?

How can I create a ipa file for my iOS application?
I have written the complete code for my iPhone app and now I'd like to make .ipa file.
Within XCode choose Build > Build & Archive.
In your XCode Organizer (Window > Organizer), you'll see your archived apps
Select one, hit 'Share...' and 'Save to Disk'
The one suggested by #heinklein is the easiest way but another option is to do the following.
Add necessary profiles and adjust build settings.
Set device as target to run the application.
Build the product.
Go to Products->yourAppName.app. Right click and show in finder.
Drag & drop to itunes profile and binary file.
Select app in iTunes and right click to show in Finder. And there you can get the .ipa file.
Sometimes it may happen that Xcode Archiver fails to generate ipa file. Then here is the another option.
Build the application.
After successful build go to "Products" folder in your project navigator.
Right click on it and go to "Show in Finder".
Copy the .app file.
Create a new folder at some other location lets say on Desktop with name "Payload".
Paste that .app file in Payload folder.
Zip the Payload folder.
Rename that zipped folder with .ipa
Thats it.
Reverse procedure is used to retrieve the app file from an ipa file.
Hope this answer helps.
Stepwise Procedure to create an IPA file,
1.First of all,choose your device as IOS Device in Scheme near Breakpoint tab in Xcode.
2.In Xcode menu,Product->Clean and build your application.
3.If the provisioning certificate is not valid,it will lead to build failed with an error.If so you have to change it to a valid certificate through your project->build settings.Else if build succeeded just leave this step.
4.Then select Product->archive,it will create an archive file in Organiser->archives and open it up for you after archive finished.
5.choose share tab in Organiser followed by contents->.ipa and Identity->choose your valid distribution certificate and click next.
6.within a minute it will ask name for your IPA file to save.Give a name and save it in Desktop.
7.Open iTunes and drag and drop your IPA file in Library->Apps.
8.Now connect and select your Device in itunes->choose apps tab under it and sync your app ipa to the Device.It will install your IPA file to the device.
9.Thats all.Now you can run your App IPA file in your device.
Using Archive process with Xcode 9.0
Clean your project from Product -> Clean (cmd + shift + k)
Select Product -> Archive
Once archive is successfully completed it will open in Organizer window
Press Export button present on right side
Now select the distribution method as per your need and click on Next button
This will show the App Store distribution options. Now click on Next button
Re-sign your project (preferred is Automatically manage signing) and click on Next button
There will be Review window containing IPA content details. Click on Export.
Now choose the location where folder is to be saved and Click on Export.
This will create an folder containing IPA, packaging.log, DistributionSummary.plist and ExportOptions.plist file
As of Xcode 4.3, there is no option of Share in organizer. You need to select distribute and then select the option for save as enterprise or adhoc application.
First complete your coding check it with your provisioning profile.
Then click to run on device or ipad.
then go to menu -> prodcut -> clean.
After cleaning menu -> product -> Archive .
After completing it click on share and click on next button.
It will take a minute as per your app file size.
then give a name of ipa and save it where you want.
I'm using xCode 7.2 and have just exported an .api .ipa file to upload to Diawi to share the app with my friends. So here is how I did it:
Product -> Archive
After a while, the Organizer would show up -> Export
Choose something with Ad-hoc, xCode would generate a folder with the .api file in your desktop
Hope this would help!
Hope it helps someone: if you are kicked out of organiser this is how to re-open it. From there you can compile ipa file as recommended. AD Hoc is for sharing ipa by email and you need to archive for "Generic iOS device".