iOS: Customize App Icon and Splash Screen via Enterprise (In-House) Distribution - ios

When deploying an App via the Enterprise Developer Programs In-House Distribution there is a .plist file acting as descriptor for the .ipa file.
Does anyone know if it is possible to change standard info.plist values via this file?
The background is that I want to adjust the App Icon and Splash Screen. I want to customize the app for different customers without recompiling it. If the above approach is not possible what else can I do to ease that process?

I want to customize the app for different customers without recompiling it.
Not possible. The app is signed before you distribute it. Any change will invalidate the signature and the device will refuse to run it. You'll need to recompile if you want to change things like the app icon.
The splash screen is somewhat different. You can't change the default image, but you can omit the default image and display your own splash screen as soon as the app is loaded. That screen can contain an image that you download from a server, for example.
Give that you're talking about enterprise distribution, I think the best plan is to simply create separate targets in your project, one for each customized version. Each target would reference different icon and default image files. You can even create an aggregate target, so that all the customized versions are built at the same time.
Instructions for adding a customized target, assuming Xcode 4:
Select the project in the project navigator.
Click the Add Target button at the bottom of the detail area, or just select the target and use the Edit->Duplicate command.
Make a copy of the Info.plist file from your first target and add it to the project.
Select the new target and change it's "Info.plist" setting in the Packaging section of Build Settings. (You may also want to adjust the product name.)
To add an aggregate target that builds all the others, add a target using the Aggregate target template (under Other in the template picker). Then select the new aggregate target, click Build Phases, and add all your other targets as target dependencies.

Related

A gear icon appeared in my Xcode app icon project and I cannot run it anymore

I've added a framework and a library (spring) to perform animations with buttons, etc.
Now instead of one app icon to launch, in x-code, I got three, and can launch them all except the main one. The main app icon it's now a gear, and I cannot run it because x-code don't let me select any device to launch it. I can only select my mac, as you can see in image...
There is also another thing. The yu.app in product folder turns to red only when I'm in the main app. When I choose spring it turns black again. Anybody know how to fix this issue?
Do following
1 - Navigate to manage scheme
2 - Remove older scheme
3 - Create new scheme
For removing files of older scheme you need to remove derived data.
From XCode Window > Projects > Select Your Project > delete derived data
All the answers here suggest a way which may work but not the proper solution.
Just select your scheme, go to Edit Scheme. Go to Run. In Executable dropdown select the correct app and it will start working. No need to create new scheme or delete any scheme.
Navigate to Manage Schemes add a new scheme for your app target yuApp and remove any outdated schemes.

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

Prevent an iOS app from being updated

I am doing some research to find out if an app developer can set up an app in a way that it can't be updated, at least in some circumstance.
Or in another way: what can be done by a developer in order to create on purpose issue during the update of its own app?
It sounds like what you actually want to do is create another Target in your project. This way, you can have multiple copies of your app on the same device. For example, you could have a dev target that is constantly moving and a release target that you don't want to override.
You can do this by selecting your project in the project navigator, right clicking on your app's target, and then selecting Duplicate. It will create a new target called YourAppName-copy. You can then select your target next to where you select the device/simulator to run on & select the new target. Run the new target & it will install the new target and leave your other one alone.
For an enterprise app, you could support your own app updating (and create a web service to check to see if the app needs to be updated -- or if the user's credentials are still valid, etc.).
For a public App Store app, this is not currently possible.

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.

Resources