Monday 17 December 2012

How to resize the iPhone/iPad Simulator?

+1 for 100%
+2 for 75%
+3 for 50%


OR

The options will only be there if your screen is not large enough to show the window at 100%.

Thursday 13 December 2012

meter to miles conversion

This has already been answered in metric here. Now you just need to convert meters to miles which is:
1 Meter = 0.000621371192 Miles 
or
1 Mile = 1609.344 Meters 

Tuesday 11 December 2012

Creating iPA file using XCode 4.2 & 4.3.2

In this post, I am going to describe ‘How to create iPA file using XCode?’
iPA file means iPhone Application. iPA files are generally used for Ad-Hoc distribution.

Step 1. Open your code Project.

Creating ipa using Xcode 01

Step 02. From Xcode, Go to window menu >> Click on Organizer. Or Press Cmd + Shift + 2

Creating ipa using Xcode 02

Step 03. In Organizer window, switch to Devices Section.

Creating ipa using Xcode 03

Step 04. From the Left Group Tree in Devices Section, Click on Provisioning Profiles Under Library group.

Creating ipa using Xcode 04

Step 05. Click check on – for ‘Automatic Device Provisioning’.

Creating ipa using Xcode 05

Step 06. Click on Refresh button (if one click doesn’t work, click second time. In my case I click it two times ) & then login Screen will appear as follows.  Enter your iOS Developer Account Credentials.

Creating ipa using Xcode 06

Step 07. Now ensure the iOS Provisioning profiles downloaded automatically from iOS Provisioning Portal.

Creating ipa using Xcode 05

Step 08. Close the Organizer & Click on the Project Name for Project & Product Settings.

Creating ipa using Xcode 07

Step 09. Select appropriate Profile. Set same settings for both product & project.

Creating ipa using Xcode 08

Step 10. Now Select iOS Device from the list of targets.

Creating ipa using Xcode 09

Step 11. Go to Product menu & Click on Archive.

Creating ipa using Xcode 10

Step 12. Preparing Archive takes time. Hold on, stay calm as It is matter of few seconds :)
Step 13. If you are using Xcode 4.2 use from step-14 to step-17. If you are using Xcode 4.3 use from step-18 & step-21.
Step 14. Open Organizer & switch to Archive Section.

Creating ipa using Xcode 11

Step 15. Select your Archive & click on Share.
Step 16. Select iPA option & select appropriate Provisioning profile from Identity combo-box.

Creating ipa using Xcode 12

Step 17. Click on next & save it on desired location.

Creating ipa using Xcode 13

Steps For Xcode 4.3
Step 18. Switch to archive tab & select your Archive.

Creating ipa using Xcode 14

Step 19. Click on Distribute button.

Creating ipa using Xcode 15

Step 20. Click on Enterprise ad-hoc deployment & Click on next.

Creating ipa using Xcode 16

Step 21. Select Code Signing Identity & save ipa on desired location.

Creating ipa using Xcode 13

Problem with Icon.png (Icon specified in the Info.plist not found under the top level app wrapper: Icon.png (-19007))

I'm putting together a universal app and I have the icons in my project, but I keep getting a warning from the compiler in regards to Icon.png.
I followed the instructions at http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html but still get the above error.
I've tried doing the following:
Putting the icons in the Shared group and adding them according to the plist according to the tech note. Changing the icon paths to add Shared/ to them to point to the shared folder.
Creating a Resources group (which the tech note fails to point out that XCode doesn't create a Resources Group for a universal app) and moving them into that (I removed the "Shared/" prefixes from the plist.)
Moving the icons to the top level of the project.
I've also double-checked the icon sizes and they are all correct, as well as the names of each.
Anything I might have missed?
share|edit|flag

67% accept rate



Okay, so now the problem has disappeared. I reset the build do Distribute, and reset the code signing. Weird. – Eric Jan 7 '11 at 16:57


Except that I built under debug, so when I built under distribute, the problem came back. – Eric Jan 7 '11 at 16:58


I went ahead and did a build, then distributed it. It seems to be working anyway. – Eric Jan 7 '11 at 17:06


If you look at the build settings for the debug and distribute configurations, you'll find that the distribute configuration has the "Validate Built Product" setting enabled. This is the setting that warns you about a missing icon file. This will be why you are seeing different results. – Jim Jan 7 '11 at 17:22


Validate Product Build is unchecked in my version of the Distribute config. I have to keep copying Release under the Configuration tab in order to create a Distribute config. – Eric Jan 7 '11 at 17:50
show 1 more comment

24 Answers


For some reason the (possibly when adding multiple icons and changing the file?) the item gets moved to item 1-... Make sure your icon is listed as item 0 in the plist
enter image description here
share|edit|flag



I have same problem and find a solution works for me. Please try below steps:
  • Build > Clean All Targets
  • Renamed Icon.png to xcon.png
  • Renamed xcon.png to Icon.png
  • Build > Build and Archive
  • Resubmitted to iTunes connect - success!
Mostly do nothing but change the name of the Icon.png and change it back, but it works!
I have tried to use a 512*512 Icon.png for learning, but I copy a new one of 57*57 back later, then the issue come out, I think maybe it's the reason of this issue.
I am new on mac. My XCode4 crashes about 10 times a day. I am missing Visual studio.
share|edit|flag



This worked, Thanks. – Jirapong Jun 6 at 2:42


2 days of massive headaches. This fixed my problem! – Tony Beninate Jul 9 at 14:28


Thanks, along with cleaning (command K), quit xcode, remove contents of Derived folder. – user1046037Oct 14 at 2:38

Here was my solution to this problem. There was an empty string in the MyApp-Info.plist file. I manually deleted it (in a text editor) and my app verified and uploaded.
<key>CFBundleIcons</key>
<dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string></string> <--------- Extra string shouldn't be there------
            <string>Icon@2x.png</string>
            <string>Icon.png</string>
        </array>
    </dict>
</dict>
share|edit|flag



Awesome, thanks – Adam Waite 19 hours ago

I had this issue. The answer for me was to check the capitalization. In my plist I had Icon-small-50.png Icon-small.png and Icon-small@2x.png I capitalized the S and the issue went away. e.g. Icon-Small-50.png Icon-Small.png and Icon-small@2x.png
share|edit|flag



I had the exact same problem. I spent 2 days. When you build and archive, click show in finder, show the contents of the package of the archive and check if all the files are showing up. For me, the archive was missing Icon.png file for some reason. The archive utility has a bug. I moved the icons out of the resource folder, cleaned and built the project. Then again I moved the icons into the resource folder and cleaned and built it. Then the archive had copied the missing icon files. So try this out!!
share|edit|flag



This worked for me. I only moved out the failing one and then moved it back as per the instructions above. It fixed the issue. That's an issue indeed. – finneycanhelp Mar 21 at 21:40

Had the empty string node as well, but it wasn't reflected in Xcode. Somehow, the info-plist file was out of sync with the filesystem. I had to remove the reference to it and re-add it to my project, THEN I saw the . Fixing that fixed my problem.
share|edit|flag



Remove unwanted file names under Icon files in info.plist - It worked for me – Dhilip May 21 at 6:32

  1. Remove all icon files from xcode interface
  2. Move all files from your project folder to some folder on desktop
  3. rename the files in recently created desktop folder
  4. delete all entries from info-plist file for icons
  5. start assigning icons again by dragging onto Xcode window at appropriate places.
  6. When you create icons for iphone, xcode automatically assigns those icons to ipad. DO NOT DELETE THE ENTRIES IN IPAD SECTION. INSTEAD, DRAG IN THE IPAD RELATED ICONS TO REPLACE THE OLD ONES. Rememeber, this is important.
  7. Create archive.
share|edit|flag



Based on my experience this kind of error usually shows up when one or more of the png files that were used in the project were corrupted. It's possible that the png file is interlaced which will cause this kind of error.
share|edit|flag



I had the exact same error, cleaning the project and building again worked for me. It is definitely an Xcode issue - even on 4.0.2. Which version of Xcode are you using? Try updating to the latest.
share|edit|flag



I also got this error when I had an extra blank line in my Info.plist. I had Item 0, which was Icon.png, and I had Item 1, which was blank. Item 1 had been my iPad icon, but I cleared it. Archiving then gave me the warning you saw. Removing the line for Item 1 completely fixed the issue.
share|edit|flag



I had this problem with a Default@2x.png icon file. It seems that the file was not in the build target (the Target Membership part of its properties).
The solution was to add it to the target. XCode mistakenly allowed files not in the target to be added to the list of icons.
As another answer said, using the finder to browse the Archive file makes it obvious that the file is not present. Still, case sensitivity or other plist errors need to be investigated.
share|edit|flag



In AppName.xcodeproj/project.pbxproj i changed the occurrences of icon.png -> Icon.png and the validations passed.
share|edit|flag



I was getting the same error, also with a universal app. I had a project from Xcode 3 (already submitted to store). I opened in Xcode 4 and saw the fancy image-linking page (click on target, "summary" and "app deployment info") when you click on the target. After linking various icons, testing, compiling, and then archiving, I got this error.
One extra thing- I'd added the icon names byhand in to the plist in Xcode 3. My guess is that this was conflicting with the image-linking feature in Xcode 4. So I removed one entry, "icon" in the plist. The new image-linker creates plist entries as an array. I left that the same, though I did verify the filenames with the image names in my bundle, and capitalized one of them in both places. I removed and added back the problematic image to the bundle.
I validated and it passed.
My guess is that "special" icon names- that are dynamically linked to certain features in the app- are going to be more sensitive than random ones. With the new image-linking ability, you can name your icon files anything you want.
Hope this helps.
share|edit|flag



Had the same problem in xcode 4.2. Noticed my plist had strings for icon had items named both "icon.png' and 'Icon.png'. My icon file was named icon.png so tried deleting the string "Icon.png". This didn't work but decided to rename my asset 'Icon.png', removed them from the project and added them back in. Clean, build and success!
share|edit|flag



I removed them from project, cleaned project. Re-added them and it worked for me. – gotnull Jun 28 at 2:22

Right-click on the icon files and select Get Info. Pick the Targets tab and ensure that the target you are building is ticked. Just because a file is in the project, it doesn't necessarily mean that it is copied into the app bundle.
share|edit|flag



Everything looks good under there as well. – Eric Jan 7 '11 at 16:39


Had the same issue building a 5.1 app.
Just simply removed and send to trash the offending files. Then re-imported, making sure the copy button was ticked.
Clean -> Build
Now works. I guess those files weren't being copied over as they should have been..
share|edit|flag



I spent far too much time on this issue too!
In the Targets / Info tab I found that I had empty rows in two sections, both under Icon files and under Icon files -> Primary Icon -> Icon files.
You need to remove the empty lines in BOTH sections to be able to archive and validate the app.
share|edit|flag



  1. Clean your build
  2. Make sure the file is actually on the file system
  3. Make sure you can see the file in the project navigator.
  4. Most likely step 3 will fail. If so, drag the icon from the finder onto the Project Navigator. When asked, uncheck the "copy ..blabla" option because since the file is already there where you are dragging it to, it would fail. Once the file shows up in the Project Navigator you should be golden.
  5. Vote this answer as "the answer" :)
share|edit|flag



I am using Xcode 4.3.3.
I solved the problem, by dragging my custom icon.png file from a folder where I placed it, into the project (ApplicationName-Resources-icons Folder). After this, my icons folder looked like this:
  • icon-72.png
  • icon.png
  • icon@2x.png
  • icon-72@2x.png
So the before missing "icon.png" has been added. Thereafter the validation passed.
share|edit|flag



This method worked for me and I did not need to rename files and all that other good stuff.
I found a method in the right-click context menu called Add Files to [Project]...
Step 1
Open XCode and make sure you are looking at your project view where it lists the project and top-level files below in a tree-style.
Step 2
Cmd-click or right-click on the Project Name (at top of left sidebar) and then point to "Add Files to [Project Name]..."
Step 3
Browse for files needing to be added. You will notice that files already added are greyed out whereas others that are not added stand out in full colour.
share|edit|flag



Same error here. It happens when I open an old project in Xcode 4. The solutions is to:
  • find the .plist file, search for the key Icon file (Not "Icon files" or "Icon files (iOS 5)").
  • Delete it (minus button).
  • Add it again and put the filename in value
  • Product->Clean and Product->Build again.