When I look my Info.plist their is nothing about icon in it, but after I deployed the app, I look in it for the the Info.plist and I can see that it's contain :
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon60x60</string>
</array>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon60x60</string>
<string>AppIcon76x76</string>
</array>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</dict>
I can see that also the root folder of my app contain 2 files :
AppIcon60x60#2x.png
AppIcon76x76#2x~ipad.png
but nothing in my project, in deployment option, is speaking about those 2 icons. so where they are coming from ? what process add the CFBundleIconFiles key value to the info.plist ?
I want to specify myself the icon (and not from the ide of delphi, I want to update myself the info.plist, and i want to deploy myself the icon), how can I do ?
I only have a partial answer but hopefully will point you in the right direction.
The default info.plist.TemplateiOS.xml contains:
<%VersionInfoPListKeys%>
<%ExtraInfoPListKeys%>
<%StoryboardInfoPListKey%>
Each of these is expanded with information from your project settings. By deleting the corresponding key, you can replace it with your own settings. It might take some trial and error to determine which one inserts the icons.
Related
I am trying to get my app to import a csv file from the open in menu from other apps. I know that I need to register that in my info.plist, but I can't find much clear documentation that isn't either outdated or just not helpful.
Still new to iOS development so any help would be great! Thanks in advance!
Here is what I have so far in my info.plist. From what I gathered a URL Scheme is the best way to achieve this. I have no idea what to set these parameters to as my Xcode does not seem to want to show me any documentation for them.
info plist
You do not want to use the URL Scheme setting for this. That defines URL schemes unique to your app for launching your app.
You need to enter details in the Document Types section of Info.plist to register the types of files that your app can open.
Here is an example to support CSV files:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Comma Separated Values</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.comma-separated-values-text</string>
</array>
</dict>
</array>
You will also want to define the CSV UTI in the Imported Type Identifiers section:
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.plain-text </string>
</array>
<key>UTTypeDescription</key>
<string>Comma Separated Values</string>
<key>UTTypeIdentifier</key>
<string>public.comma-separated-values-text</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>csv</string>
</array>
</dict>
</dict>
</array>
Once both of those are in place you can build and run your app and then when you view a CSV file in the Files app (or a 3rd party app shares a CSV file using UIActivityViewController), your app will appear in the list of options for sharing the file.
I've been trying to change my app icon using CFBundleAlternateIcons, but nothing happens.
I'm actually using a plugin for the Flutter SDK - flutter_dynamic_icon, when I change the icon using the plugin, it show a popup says 'You have changed the icon for MyApp' but nothing changes.
My question seems to be a repeat of this question: [https://stackoverflow.com/questions/64426880/xcode-ios-cfbundlealternateicons-not-changing] which already has an answer but it doesn't work for me.
I'm also trying to do the same as this article on medium: [https://medium.com/flutter-community/programatically-change-ios-app-icon-in-flutter-c9e84bc541a2] and the result is the same as when I used flutter_dynamic_icon.
Here is my info.plist:
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>teamfortress</key>
<dict>
<key>UIPrerenderedIcon</key>
<false/>
<key>CFBundleIconFiles</key>
<array>
<string>teamfortress</string>
</array>
</dict>
<key>chills</key>
<dict>
<key>UIPrerenderedIcon</key>
<false/>
<key>CFBundleIconFiles</key>
<array>
<string>chills</string>
</array>
</dict>
<key>photos</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>photos</string>
</array>
</dict>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
I think something is wrong with my info.plist.
Has anyone experienced this problem?. Please help me, thanks a lot.
I've figured out the answer recently, for some reasons, my app can only be able to change app icon dynamically when I add icon images directly in Runner folder in Xcode and run flutter project from it.
Hope it's helpful for you if you're encountering with above problem.
I have been struggling with this issue for over a week. Whenever I try to validate a build or use application loader lately I have been getting this error:
iTunes Store operation failed.
Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons':'AppIcon20x20'
Now, the problem is there is no AppIcon20x20 key in my plist.
Here's my AppIcon asset and attributes settings:
AppIcon, Attributes
Nowhere is a 20x20 asset even mentioned in my Plist, as seen by the source code version here :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon603x.png</string>
<string>icon602x.png</string>
<string>icon403x.png</string>
<string>icon402x.png</string>
<string>icon293x.png</string>
<string>icon292x.png</string>
<string>icon203x.png</string>
<string>icon203x.png</string>
</array>
</dict>
</dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>https://millsfitnessapparel.myshopify.com/</key>
<string></string>
</dict>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
And lastly, I have googled the heck out of this topic and they all say to just add CFBundleIcons to your plist, which I did, but it's still throwing the error. I have also done this in versions of this project where there are pods, no pods, workspaces, regular xcproj. files, and even with 1 view controller and just some icons [this latest build].
I have also tried to achive this build in xcode versions 8.1, 8.2, and 8.3, all receiving the same error.
Any help here would be greatly appreciated. These are apps for a client and I am currently late on delivering because of this issue. Thanks.
Its basically, that the 120px icon is not exactly 120px, I ended up recreating the icon and finally was able to get the app submitted to Apple Store.
Okay non of the steps online worked for me so I'm gonna post how I resolved my problem, I had a very old project which was originally created before iOS 5 but it was upgraded up until iOS 9 but it carried over old icon system.
Even though I didn't have CFBundleIcons nowhere in my plist file and have everything properly setup in the asset manager under AppIcon key but it was giving this message so this is what I did
I created CFBundleIcons key in the plist file by typing the exact key ( CFBundleIcons ) without selecting anything from suggestion window as that key no longer exist in the suggestion window.
After you hit enter Xcode translates you key into 'Icon Files ( iOS 5 )'
Then go to your project's target node where you can see the project's target settings.
In there you should see the Migrate button shows up in from of the 'App Icon Source'
Click to Migrate to the new Icon system ( eve though you may have
already done it before )
After you migrated create a new icon set in the assets manager or
point to an existing one if you have already created one.
This should clear out that issue, basically we just needed re-invoke the migration process to clean up what was left over.
I need to change the app icon based on region, is this possible?
Yes, this is possible since iOS 10.3.
First, you need to define all alternative icons in your Info.plist file, you can't fetch them dynamically.
In the example below we define 2 alternative icons: "de" and "fr":
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>de</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_de</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>fr</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_fr</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_none</string>
</array>
</dict>
</dict>
Then you can set the icon name based on anything you like (game progress, weather conditions, premium user, etc.). To change the icon use:
UIApplication.shared.setAlternateIconName("de") { (error) in
if let error = error {
print("err: \(error)")
// icon probably wasn't defined in plist file, handle the error
}
}
Result:
The gif is from a Medium article by Julien Quéré.
This feature available in 10.3 (Beta)
Discussion
Use this method to change your app's icon to its primary icon or to one of its alternate icons. You can change the icon only if the value of the supportsAlternateIcons property is true.
You must declare your app's primary and alternate icons using the CFBundleIcons key of your app's Info.plist file. For information about how to configure alternate icons for your app, see the description of the CFBundleIcons key in Information Property List Key Reference.
Take a look at:
apple documentation
I need to change the app icon based on region, is this possible?
Yes, this is possible since iOS 10.3.
First, you need to define all alternative icons in your Info.plist file, you can't fetch them dynamically.
In the example below we define 2 alternative icons: "de" and "fr":
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>de</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_de</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>fr</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_fr</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>ic_none</string>
</array>
</dict>
</dict>
Then you can set the icon name based on anything you like (game progress, weather conditions, premium user, etc.). To change the icon use:
UIApplication.shared.setAlternateIconName("de") { (error) in
if let error = error {
print("err: \(error)")
// icon probably wasn't defined in plist file, handle the error
}
}
Result:
The gif is from a Medium article by Julien Quéré.
This feature available in 10.3 (Beta)
Discussion
Use this method to change your app's icon to its primary icon or to one of its alternate icons. You can change the icon only if the value of the supportsAlternateIcons property is true.
You must declare your app's primary and alternate icons using the CFBundleIcons key of your app's Info.plist file. For information about how to configure alternate icons for your app, see the description of the CFBundleIcons key in Information Property List Key Reference.
Take a look at:
apple documentation