Loading resource items in iphone via itunes - iphone

I have an app that has about 60 png files and a couple of cfg files in the main bundle. Runs great in the simulator, and when I download from Xcode to iTouch. But I'm stumped on distributing to my testers. I have their provisioning profiles, etc. But when I created the app and sent it to them, it showed up as a folder (NR1.APP) with all the individual resource files under it.
Do they drag this entire folder into iTunes/applications? Or is there something in xcode that creates a single binary app with all resources in it?

Application bundles are just folders. Navigate to one in finder, and right-click -> 'Show Package Contents'. An exciting world awaits.
Dragging the application bundle into the library in iTunes should take care of it, however you can also distribute an .ipa file, which is just a renamed .zip with a directory called Payload in it, with the application bundle inside.

I presume your testers are on Windows? The short answer is that iPhone apps are in fact folders (called bundles) with a specific file layout. On Mac OS you don't notice because finder hides it for you, though you can look inside by selected "Show Package Contents" from the contextual menu in finder.
Anyway, yes, they can install it by just dragging the app, assuming everything was decompressed correctly. THe problem is that the most Windows decompression tools mangle archives of bundles (at least with respect to how iTunes expects them). You can read all the gory details on what you can and can't do in this blog post.

Related

iPhone App using MonoTouch - which files/folder binaries do I upload to the AppStore?

I have created a small iPhone app using MonoTouch - got all provisioning files etc set up etc and I have done a Distribution build which has created a Distribution folder (under the bin\iPhone folder).
Now in this Distribution folder I can see two more folders called MyGame.app, MyGame.app.dSym and two files MyGame.exe and MyGame.xcent.
Which of these files or folders do I need to zip and upload to the App store??
My guess is it is the MyGame.app folder which is full of files, images, Info.plist, embedded.mobileprovision but it also seems to contain monotouch.dll's and Microsoft's System.Core.dll etc. ??
Thanks
There is a good tutorial in MonoTouch website
http://monotouch.net/Documentation/Building_for_Distribution
the last lines are
navigating to the bin/Distribution/iPhone directory. Zip the app bundle, and submit it to Apple.
The file with the .app extension is the application bundle. It's really a "folder" disguised as a file. You need to zip it up before you can submit it. Curious, what is the name of your game? I'm interested in seeing one of these "ported" applications.
Good luck, sir

Changing the .ipa file artwork of compiled iPhone application [duplicate]

I've got an iPhone app with icon file Icon.png.
This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes.
What do I need to do to get it to show up properly?
The cleanest way to do this is described in the official Apple documentation, in a section called Publishing Applications for Testing. Below is the exact instructions given to you on that page:
The iTunes artwork your testers see should be your application’s icon. This artwork must be a 512 x 512 JPEG or PNG file named iTunesArtwork. 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).
Create a 512x512 png of your icon, name it "iTunesArtwork" (no extension, no quotes) and add it to your project under Resources. Then build.
More details here:
http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/000-Introduction/introduction.html
In order to make it easier for those arriving at this post, here are the actual instructions (straight from the blog post linked from the accepted answer).
There has been some talk on twitter about how to create your own IPA file for your iPhone app, so I thought I would give the instructions that I have used to build an IPA before. Enjoy.
Create a folder on your desktop called “working”. Open that and create another folder inside of it called “Payload” (case-sensitive)
Move your iTunesArtwork file into the “working” folder and your .app into the Payload folder.
Open Terminal and run the following command: chmod -R 775 ~/Desktop/working/Payload
Go into your ProgName.app folder within Payload.
Double-click the Info.plist file. Make sure there is a item called: SignerIdentity with a value of: Apple iPhone OS Application Signing. If there is not, add it.
Zip it all up. Zip the iTunesArtwork and Payload folder. (So zip up what is inside of the working folder)
Rename the zip file to have the name you want, and the extension of ipa.
Double click to install with iTunes
Actually, it is possible to provide iTUnes icons for iPhone software released as ad-hoc. See this blog post for more information.
I'll just add my recent experience. I had fooled around trying to get my ad hoc app to show up in iTunes with an icon (strictly, iTunesArtwork). Finally, I was convinced I had followed the instructions to a 'T' but it still wouldn't show up in the grid view. However, my artwork was properly displayed in the Cover Flow view. I deleted and reinstalled my app from/to iTunes to no avail. Then I quit iTunes and restarted - and, voila! - my artwork was correct in all places. It appears there is some kind of caching that is not reset in Grid view.
If you see a black square instead of you icon in iTunes, be sure that file type of iTunesArtwork in Xcode isn't "image.png". If so, in the copy resource build phase, CopyPNGFile will crash the file which invalid save for iOS divices.
Open your project in Xcode.
Copy iTunesArtwork.png file into project folder.
Edit iTuneArtwork.png file and remove .png from iTunesArtwork.
Generate build.
You can see image on iTunes.
The application icon only shows up in iTunes if your app is distributed through the app store.
I assume you are asking about a developer or ad hoc build. Those get the default black "A" icon.

iPhone application doesn't install from anywhere else other than the dev machine

I created an iPhone application. I am distributing it with the ad hoc method. It installs just fine from the iTunes installed on the machine where the app was created. Anywhere else the iTunes just gives the error 'Resources have been modified'.
Please help.
It's possible it is being changed. You should distribute your app as an .ipa file, this will shield it from changes.
Create a folder called Payload and place your .app folder inside of it. Zip up the Payload folder using normal compression, then rename the file with a .ipa extension.
In addition to tewha's answer:
One thing to note is that if you want the app's artwork to appear in iTunes (rather than a generic app icon), you need to place a file called iTunesArtwork (with no extension) into the zip file on the same level as the Payload folder (not in it). This is actually a jpeg file of a 512x512 image and this will appear in iTunes for the app. When I was converting folders, I didn't have the original images so I just left them off, the app works fine you just get the generic icon.

Decompile iPhone app binary

Is there a way to decompile an iPhone binary file in order to extract it's resources like images and sound files?
If you have sync the app to you Mac, just open the following folder:
/Users/YOUR_USER_NAME/Music/iTunes/iTunes Media/Mobile Applications
Or open iTunes and go to Apps and right mouse button on the app and select "show in Finder"
Copy the app you want to inspect, f.e. Demo.ipa
Change the extension ipa to zip => Demo.zip
Extract the zip
Open the folder and then the folder "Payload"
Right Mouse Click Demo.app and select "Show Package Content"
Change your .app file extension to zip and then extract the files. You will be able to get all resource files.
An iPhone .app file is simply a folder. If you're viewing it on a Mac (or even on the iPhone with iFile), just remove the .app extension and you should be able to view the resources. On Windows and Linux (tested with Ubuntu 14.04), it should "just work" and you'll be able to view the folder's contents without any renaming.
Edit: Removed the assumption that images/sound would be used in another application.
First, off you shouldn't be reverse compiling code so that you can get images/sound files from an iPhone or any other application for that matter.
Second, reverse compiling does not always guarantee a successful file generation of whatever file you're looking for. Whether it's an audio or image file.
It would be a much better approach for you in the long run, and in the process of learning that you either contact the authors of the app and ask for permission to use the images/audio that you're seeking (since you think it's such an awesome sound/image that you can't live without). Or you can do an audio mixing or image generation yourself.
If your lacking the time, skills or applications that would get you the quality of work you're looking for. I would recommend bring in a graphic artist or sound engineer/mixer.
You'd be learning how to manage a group or individual, convey your ideas correctly and informative, and you're more likely to build a better application as a result. And that is something you can't get from reverse compiling an iPhone application :-)

How can I make my ad hoc iPhone application's icon show up in iTunes?

I've got an iPhone app with icon file Icon.png.
This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes.
What do I need to do to get it to show up properly?
The cleanest way to do this is described in the official Apple documentation, in a section called Publishing Applications for Testing. Below is the exact instructions given to you on that page:
The iTunes artwork your testers see should be your application’s icon. This artwork must be a 512 x 512 JPEG or PNG file named iTunesArtwork. 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).
Create a 512x512 png of your icon, name it "iTunesArtwork" (no extension, no quotes) and add it to your project under Resources. Then build.
More details here:
http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/000-Introduction/introduction.html
In order to make it easier for those arriving at this post, here are the actual instructions (straight from the blog post linked from the accepted answer).
There has been some talk on twitter about how to create your own IPA file for your iPhone app, so I thought I would give the instructions that I have used to build an IPA before. Enjoy.
Create a folder on your desktop called “working”. Open that and create another folder inside of it called “Payload” (case-sensitive)
Move your iTunesArtwork file into the “working” folder and your .app into the Payload folder.
Open Terminal and run the following command: chmod -R 775 ~/Desktop/working/Payload
Go into your ProgName.app folder within Payload.
Double-click the Info.plist file. Make sure there is a item called: SignerIdentity with a value of: Apple iPhone OS Application Signing. If there is not, add it.
Zip it all up. Zip the iTunesArtwork and Payload folder. (So zip up what is inside of the working folder)
Rename the zip file to have the name you want, and the extension of ipa.
Double click to install with iTunes
Actually, it is possible to provide iTUnes icons for iPhone software released as ad-hoc. See this blog post for more information.
I'll just add my recent experience. I had fooled around trying to get my ad hoc app to show up in iTunes with an icon (strictly, iTunesArtwork). Finally, I was convinced I had followed the instructions to a 'T' but it still wouldn't show up in the grid view. However, my artwork was properly displayed in the Cover Flow view. I deleted and reinstalled my app from/to iTunes to no avail. Then I quit iTunes and restarted - and, voila! - my artwork was correct in all places. It appears there is some kind of caching that is not reset in Grid view.
If you see a black square instead of you icon in iTunes, be sure that file type of iTunesArtwork in Xcode isn't "image.png". If so, in the copy resource build phase, CopyPNGFile will crash the file which invalid save for iOS divices.
Open your project in Xcode.
Copy iTunesArtwork.png file into project folder.
Edit iTuneArtwork.png file and remove .png from iTunesArtwork.
Generate build.
You can see image on iTunes.
The application icon only shows up in iTunes if your app is distributed through the app store.
I assume you are asking about a developer or ad hoc build. Those get the default black "A" icon.