Must I make icons for iPad if it's an iPhone only app? - ios

Must I make icons for iPad if it's an iPhone only app? Apple says, that it's not required. When I try to send my game using Application Loader, I see this.
Can I just delete CFBundleIconFiles(iPad) from info.plist ?

You do not need iPad icon files if your app is an iPhone-only one. Those errors can occur sometimes if the project isn't cleaned or if the resource files aren't copied into the project properly.
Make sure you've marked the app for iPhone only, and remove the iPad icon files from your info.plist, and also make sure all the files are copied in your copy bundle sources. To check this, go to
Your project target > Build Phases > Copy Bundle Sources
and clean your project pressing cmd ⌘+alt ⌥+Shift ⇧+K.
If that didn't work, delete the images from your project, drag and drop them again, and repeat the steps above.

Related

With Xcode how can I export and share an app with a team member in the simulator?

So I have a teammate/client I need to share an app I'm developing.
They have android and a Mac Desktop so it would be shared through the Simulator only.
I've tried the archive app and there seems to be no way to get this work with the .ipa file which is generated.
Does anyone know of a way to achieve this?
Share the source code, then run the app in Xcode. Voila, it is now in the Simulator. They have to install Xcode anyway to get the Simulator so there really isn't any extra work involved other than building the app.
The .ipa is built for iOS devices and cannot run in the Simulator. I suppose you could transfer the binary to another simulator and get it to work, but I have not heard of anyone doing it that way and, frankly, it seems like potentially more work than "clone this git repo, load the project/workspace in Xcode, click the triangle button and wait a bit."
All you can do is you can just generate the .app file. But how you can run it on a simulator (applies only if Xcode 8.2 or above isn't installed), I really don't have the idea. If you want to have your .app generated, follow this:
Connect any iPhone with your mac
Open your project in Xcode
Wait for the setup (processing symbol files, blah, blah) to be completed
Run your project in that iPhone once
Now just build your project while the iPhone is connected
Search for the Product group (or, folder) and expand it
You will see a file (maybe more) named as your target (project name)
Right click on that file and select show in finder. And voila, you have your .app file
What generates the .app
You will need to have previously built the app for the intended target. The "Product" option in the top menu bar includes a couple of ways to trigger this including: "Build for" of "Destination".
Where is the .app?
The yourApp.app you are looking for is stored in: <<YOURUSERHOME>>/Library/Developer/Xcode/DerivedData/<<YOURAPPNAME-UID>>/Build/Products/Debug-iphonesimulator
Easier way to locate
Open you app in XCODE
Browse the file tree in the left sidebar
Expand the "Products" directory
Right click the .app file you want to share, and select "Show In Finder"
What you are trying to do is not going to work. You can not share the .ipa file for someone else to install it on an iPhone simulator.

Missing required icon file. The bundle does not contain an app icon for iPad of exactly '167x167' pixels, in .png format when trying to upload app

I successfully uploaded my app on Xamarin forms but after it was uploaded I received this in an email from apple:
"Missing required icon file. The bundle does not contain an app icon for iPad of exactly 167x167 pixels, in .png format ."
So it wants an image in my resources file I suppose (not in info.plist icons as they are not asking for 167x there) but should I name it: Icon-83.5#2x.png or Icon-174.png?
Go to xcode > select Images.xcassets > check ipad from the right menu at the top right > you will get new set of dimensions, now it's easy as fill your new app icons for each dimension.
I've had this particular problem in the last couple of days.
The iPad icon didn't show within the Info.plist and kept giving the warning you're getting right now.
My fix was to manually add the icon Icon-83.5#2x.png to the resources folder ( as Prashant pointed out ) and add this to the Info.plist:
<key>CFBundleIconFiles</key>
<array>
<string>Icon-40.png</string>
<string>Icon-40#2x.png</string>
<string>Icon-40#3x.png</string>
<string>Icon-60#2x.png</string>
<string>Icon-60#3x.png</string>
<string>Icon-76.png</string>
<string>Icon-76#2x.png</string>
<string>Icon-83.5#2x.png</string>
<string>Icon-Small-40.png</string>
<string>Icon-Small-40#2x.png</string>
<string>Icon-Small.png</string>
<string>Icon-Small#2x.png</string>
<string>Icon-Small#3x.png</string>
</array>
I used to work with Asset Catalog but I couldn't get it to work with the iPad Pro icon.
For the forum post Andres mentioned in the comments:
Rename the 167x167 icon file to Icon-83.5#2x.png, place it in the Resources folder, and make sure it has a build action of BundleResource.
See https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_resources/ for information about setting BundleResource option.
XCODE 13 2022
In my case, the problem was default AppIcon is deprecated, then we need to use a new App Icon standard. As I publish apps to iPhone and iPad I need all the necessary icons. (This issue no appear when you check only one device(iPhone or iPad))
Go to Xcode >Images.xcassets> And select your App Icon from the assets list.
Right-click on there, You can now see a menu list like that
Select iOS>New iOS App Icon
Then you can find now a new "AppIcon" asset named "AppIcon-1"
There is a difference to "AppIcon" because It has more icons options(iPad icons size)
Remove "AppIcon" (OLD)
Rename your "AppIcon-1" to "AppIcon"
Now you can put the missing icon size.
Xcode 14.1 (14B47b)
You're getting this error because you have checked the iPad option. In my case, I had been developing my app on Xcode 13.x and then after the new version of Xcode 14.x I got this error.
So on Xcode 14 there is no need to create app icons in various versions and put them inside Images.xcassets, just follow the steps:
Click on the Images:
Then try to press + and choose iOS App icon:
You will see it got changed by comparing it to the previous version, it only accepts one and only one 1024x png image.
Now, clean your last build and build your app again.
But if still you want to use the previous version, you can click on AppIcon and then after choosing it, open the right panel of Xcode:
Then by choosing All sizes you would be able to see the previous version set.
I use Visual Studio 2017 on a Windows machine with a MacBook connected to it. I have an Asset Catalog called images that contains an image set called AppIcons where I have posted all of the various required image sizes. I was getting the same error as medvedo except I was getting three errors for 3 different images sizes (2 for ipad and 1 for ipod as I recall) After a lot of searching I found the solution was to reference the Asset Catalog in the Info.plist file.
First I had to find the path that Xamarin was putting my asset catalog in. I did that by deploying the app to the MacBook and then using Finder I went to the Go menu and chose the Library folder (earlier in the day I Googled how to show hidden folders on the Mac) In the Library folder I found the Caches folder and in that I found Xamarin/mtbs/builds/myappname There I found that the folder was Images.xcassets/AppIcons.appiconset. I say all of this knowing that it might always be in that folder but I had to look it up so I thought I would share in case it changes from installation to installation.
Once I knew the path and name I was able to add the following to my Info.plist file inside of branch
XSAppIconAssets
Images.xcassets/AppIcons.appiconset
FYI - I have built and deployed this app to iTunes at least 4 times over the previous 8 months. I am not sure what I did, if anything, to cause the error to pop up.
After trying many things, this is how I fixed the "Missing required icon" error messages:
Go to Solution->ProjectName.iOS->Asset Catalogs->Assets.
See "AppIcons" there? We are going to delete it, BUT FIRST! Find that same folder in your project files and copy it somewhere safe. Now, delete the AppIcons asset in the project. Also delete the "Assets" catalog.
ProjectName.iOS right click select 'Clean'. Go to physical project folder. Delete the "bin" and "obj" folders. Find the empty "Assets.xcassets" folder and delete it as well.
ProjectName.iOS->Asset Catalogs right click select "Add Asset Catalog". It should automatically add an "AppIcons" entry. Go through and set each of the image sizes, pointing to where you copied your images. They will automatically be copied to the Assets.xcassets folder. They will also generate hidden entries in the ProjectName.iOS.csproj file that will include the image in the final binary. The entries look like this:
<ImageAsset Include="Assets.xcassets\AppIcons.appiconset\1024.png">
<Visible>false</Visible>
</ImageAsset>
Edit Info.plist. Set the App Icons Source to "AppIcons".
ProjectName.iOS right click, select "Rebuild". ProjectName.iOS right click, select "Archive". Archive Manager > Distribute > App Store. Verify certificate. Enter Apple login name and App-Specific password to upload. Done!
If you are still facing issue with all the above process steps performed correctly.
Then please check you are logged into appstore connect using your browser and then try to publish it will and work.
If you do not want the app to be available for ipad and getting the same error just uncheck ipad from runner properties below version number

Application rejected iOS -- Confused in naming icon files

I recently uploaded an app to app store, had all the icon files as suggested by apple but my application was rejected because of repeating "icon" files, with different dimensions but same name. Below is the problem specification:
When I add an 80X80 icon image it asks me to rename it to icon~iphone, however that image is already present with dimensions 58X58. If there are two files with same name in my app package apple rejects my app. What is the solution? I am targeting iOS 7.1.
First remove all the icon files by deleting to trash (not just delete references), now import the newly named files (like icon120, icon58, icon80 whatever you need) and click copy files with app target selected.
Now click the map icons to choose the right resources for your app icons.
The good thing about renaming the app icons is that there will be no mix up with other app icons that may linger in your xCode folder. You can now go to Build Phases and look at Copy Bundle Resources, where you can delete the old app icon files. If you can't find it, look at this screenshot (don't delete your new app icon files!):

Why PhoneGap always shows default splashscreen image?

I'm testing a sample iOS app now, although I set all new launch images in Xcode (Summary tab of Project Target screen), PhoneGap 3.0 keeps showing its default splashscreen. Why? even when splashscreen is a plugin and not included by default in PhoneGap 3.0 now.
iOS document say about launch images but not splashscreen, and it even strongly recommend us to use a "first screen" similar as launch image, not something like about screen. Are these same?
It's not about cleaning or caching issues at all. The problem is PhoneGap includes all possible launch images in project template by default. These files are under Resources folder and copied to bundle's root folder on build event. Although I properly selected my own launch images in Xcode (Target/Summary screen), default PhoneGap's specific files e.g. Default~iphone.png overridden my files :(
Once issue is identified, you can fix it someway, but I prefer below steps:
Delete all default icons and splashscreen files under /platforms/ios/AppName/icons and /splash folders. You surely don't need these placeholder images.
In Xcode, select Targets/AppName, then tab Build Phases, delete all file names of images in the above step in section Copy Bundle Resources.
Add your own images files for app icon and launch images here.
Edit Info.plist file (file AppName-Info.plist under /platforms/ios/AppName/) to include your images, you will need to use CFBundleIcons and UILaunchImageFile keys. Go to iOS developer site for reference.
Splashscreen and launch image are the same thing.
You probably did everything right but iOS (especially in the simulator) often just doesn't change those things (splashscreen, icon etc.) during development process. Try to delete your app, clean your project (in Xcode: Product -> Clean (shift+cmd+k)) and reinstall your app.

How to delete my old images located in the bundle during an update?

I make an application with images *.png placed directly in the bundle.
In an update, when I delete an image from the project, it remains in my application!
How to completely remove this image ?
thank you in advance.
If it's the simulator, you need to completely delete the app from the simulator. Xcode isn't super smart about removing non-referenced PNG's and other resources from the built products folder.
If it's the device, then you probably simply need to clean your project's targets (under Xcode's "Build" menu) and then do a new build & install onto the device.

Resources