How to change Apple Watch app icon? - ios

I looked into Info.plist of the Watch Kit Extension but there is nothing about the icon. Also the Images.xcassets is empty. Probably I am missing something really simple.
How can I change the icon of the Apple Watch icon shown in the picture?

The image asset for the icon is in your WatchKit app and not the WatchKit extension. Look for the image asset named AppIcon in your watch app's asset catalog.

your app's image asset catalog has app icon sizes for everything -incl watch

Even though I had my images in the WatchKit App's xcasset's folder, it wouldn't pull in the AppIcon, instead going for the icon with the same name in the main app's folder. If you're still not seeing the icon appear, try changing the name of the WatchKit App icon to something unique. Then in your app's targets be sure to specify the new icon's location.

Edit:
I learned the hard way the method I described below does not work. If you try to submit by doing that, you will get a bunch of errors. I'll leave it here so nobody makes the same mistake.
For the sake of simplicity (having 1 Images.xcassets folder), I deleted the Images.xcassets folders that are created when you create a watch app, I then went into my existing Images.xcassets and added the new images (you can do this by enabling Apple Watch icon in Attribute Inspector). Then I just included this folder for the Apple Watch app target (not the extension target).
By having done this I can see the icon show up in the Apple Watch app for my app (you may need to reset simulator for it to show up).
The only downside to this approach is that it will add the unused icons to your watch app, which will increase the size of the app file. For my case the added size is less than 1 MB, so it is not a huge deal.

Related

The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels

I've looked at other questions with the same issue and did what was suggested in them but keep getting the same error.
I've dragged 120x120 file into my project, cleaned, built, archived, same error.
I've dragged 120x120 file into the asset catalog manually, cleaned, built, archived, same error.
Here's a pic of my asset appicon:
There is no drag and drop for 120x120. Where am I suppose to add it?
Thanks
Dont drag images in asset.
Go to this link - https://makeappicon.com
Upload your 1024 image, it will email you the icons for iOS and Android as well.
Just copy and paste AppIcon.appiconset file into bundle.
You probably have already solved this, but I'd like to share an observation about this topic as I'm currently struggling with the same problem.
When you generate an app icon set with tools like makeappicon.com, chances are that not all possible icon variants are created. For example, old icon sizes (for iOS 5/6) are probably not produced.
In Xcode's assets editor (at least in Xcode 8.2.1) you only see the slots for which an icon is provided; for me this led to the misinterpretation that all possible icons are present. However, if you manually add an empty icon set in Xcode ("+" -> "New iOS App Icon"), you will see that there are more possible slots then are filled by the icon tool.
In my case the problem was that the deployment target was set to iOS6, but some icons required for iOS6 were not included in the icon set; so I created a new, empty icon set, manually dragged in the files which were created by my icon tool, and then created the missing icons by hand.

How to set the apple watch icon image in iOS

I want to add the apple watch app icon image in Glance option shown in iPhone(Please refer attached image).I have added all the appIcon images shown in asset file. But icon image is not visible in iPhone for glance option. So where to add icon image for this ? Thanks in advance.
2 Points:
Make sure that you have added your app icon in XCAsset of "ProjectName WatchKit App" folder.
Turn on car play as well. (I am not sure if it is required, but you can try.)
Just as an fyi make sure all icons are .png format and de-interlaced. Also no transparency on the Home Screen icon.
It may be a bit unclear, because if you use a standard XCode template App, you may find two Assets.xcassets. The first would be under the WatchKit App and the second one under the Watch Kit Extension, usually where you insert your code logic.
Well, check out the Assets.xcassets under the WatchKit App group-folder, that’s the one. You will find in this image assets the AppIcon group, fill the icons and you are good to go.
Original source:
https://www.jazzcoding.com/locate-real-watch-icons-assets/

Why is my iOs launcher and appicon not applying?

I need some help figuring out why I can't get a launch icon and appicon to apply to my project. I am running xcode Version 6.3.2. Note: another developer has already applied an appicon The following I have tried:
I created an asset catalog and added new app icon and launcher image via the plus sign button in the lower left of the asset window.
In the general settings of the app I clicked on "Use Asset Catalog" for both the launcher icon source and app icon source. I selected my asset catalog and it prompts me to migrate images, which I did.
My icon and launch icon are not applying even though I have followed these steps. How do I figure out why they are not applying?
EDIT:
All of the slots for the different devices are filled with a .png image. Now that I look at it I wonder if this could be the issue- when I select use asset catalog it migrates my images which creates a new subset of launch icons and all of those slots are empty. With that subset selected my project builds fine. If I select my original subset with the icons in the slots the build fails with message - The app icon set named "AppIcon" did not have any applicable content. Same for the launch icons.
Delete the app from the simulator or device and try again. Due to caching optimizations, sometimes resources are not updated if the name doesn't change.
You might also need to clean your project and rebuild it. Select Clean from the Product menu in Xcode.
It's a long shot, but your Asset Catalog may not be included in your target. Select the catalog file, open the File Inspector and check the Target Membership. Although I believe #Dave Batton has provided the correct answer.

Updating App icon for an iOS app

This question has been asked before also but i have a slightly different question to the previous ones or we can say an extended version
Q1) I tried updating the icon app by adding the image in asset catalog and pointing the "Target" app icon setting to that. The app icon is updated in my Xcode but not reflecting when i run the app.I read somewhere that i have to update this in my "Project" file as well. this can be done by following the path Project->General->App icon.
The problem is that this "General" panel is visible for me only in Target and not in "Project" File.I only have "Info" and "build Settings" for Project. I am using Xcode6.1
Q2) I'll go ahead and be optimistic in assuming that i'll get a solution for this which takes me to my second question.
Is it possible to dynamically update an app icon?
For eg-> i have my app icon as red, now once i launch my app i have a menu of colours to select from. Once i do select one colour say green.., my original app icon should update to green. so that when i minimize or quit my app the icon has turned to be green.One live example of this is the Calendar app and the Clock app available in iOS where the icon keeps changing relative to date and time
Thanks for the solutions in advance.
For your first question, I changed all my icons by simply creating a new icon set in Images.xcassets in the project Source tree. You will need to make sure you have icons of the right size for all your targets. You can either point your project at the new set or rename the old set and call your new set AppIcon. If you want to change the set name, the icons set used is defined in project settings in the general tab under the title "App Icons and Launch Images". Apart from that you should not need to do anything else. On the simulator, removing the app and restarting might help.
For your second question the answer would seem to be that you cannot but Apple can. Never noticed before, but the clock app icon actually has a moving second hand and has the current time. So clearly possible but looks like it is not allowed for normal folks: How to animate application icon in iOS?
You cannot dynamically update the app icon.
When you update the app icons (just the assets, no need to update project settings), clean and build your app in order to see the new ones. If you cannot see them, just delete and reinstall the app. Make sure that you include all the needed image resolutions for your icons.
Make sure that your icon asset is selected as the app icon.
No, you can't change your app and the resources in its bundle.
Apple's own apps are exceptions of course.

iOS 8 action extension icon is blank on device (works in simulator)

Edit2:
I've distilled the problem down to the simplest project I can. Here's the setup.
I created a new single view app and immediately added a new Action extension target. I created a new icon set in the .xcassets file and added an iPad retina sized icon (I've tried filling in all the icons, the results are the same).
I made sure to include Images.xcassets in the Copy Bundle Resources build phase:
And then when running the app in the simulator everything works!
Compiling to device however results in a blank icon:
I thought maybe that means something is wrong with the PNG file I'm using, but everything looks OK here too:
Has anyone encountered similar?
I've already visited questions like this looking for an answer and I think I'm doing everything right but I'm still not seeing an icon in the action sheet.
Here's what I've done:
Created a working container app that has a working app icon stored in Images.xcassets. Then I created an Action Extension Target as a member of the same project.
Added Images.xcassets from my containing app to my extension's "Copy Bundle Resources" build phase. I know that this worked because I'm able to load images from the .xcassets file using UIImage.imageNamed(...) in my extension.
In the General Tab of the settings for my extension I've pointed the "App Icons Source" under "App Icons and Launch Images" to point to Images.xcassets's resource called "AppIcon", the same used for my containing app.
When that didn't work I did some further reading and discovered that Action Extensions require an "alpha mask" style image. I created another item in my .xcassets file called "AppIcon-2" and populated it with all sizes of app icon, except as a 1-color + transparency PNG. I pointed "App Icons and Launch Images" of my extension to this new "AppIcon-2"
Still my action extension's icon is a blank white square. Are there any steps that I'm missing? Is there some very specific format the alpha mask has to be in? (I'm just saving as a .png in photoshop). Is there some very specific name the resource has to have in .xcassets?
I'm also confused by some of the answers (like the one linked above) which seem to imply that the issue is resolved by adding .xcassets to the build phase. Aren't most app icon's completely opaque? How does iOS generate an alpha mask from a completely opaque app icon?
Edit: I'm not entirely sure what change made the difference (I'll try to deduce it and update this post if I figure it out) but I'm now seeing a working icon based on the alpha mask of "AppIcon-2" on the simulator. I hadn't even thought to check the simulator but it does prove that the icon is being pulled from the correct place. Something about the device is processing the image differently.
EDIT: Apple Fixed this issue in iOS8.1!
------------ OLD ----------------------
I think at this point, the answer is to submit a bug report to Apple at
https://feedbackassistant.apple.com/
If you can submit your barebones example project, that will help our cause!
Here's the one that I submitted:
Summary: The action extension icon shows well from Messages, and the
UIActivityViewController, but when it appears from the Photos App, the
icon is blank.
I think this is a bug with the Apple Photos App
Steps to Reproduce: Follow these instructions but from the Photos App
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Expected Results: Expect the Metadata Extension's icon to appear
correctly as in
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Actual Results: The icon is pure white
Version: iOS 8.0.2, iOS 8.0.0
Notes:
iOS 8 action extension icon is blank on device (works in simulator)
Here is an example of using my extension from Messages App, with the
icon showing correctly:
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
But doing these steps from Apple's photos app, results in the icon not
showing correctly.
Configuration: Any iOS device running iOS8. iPad 3rd Gen, iPhone 5,
iPhone 5c, iPhone 6 Plus
Attachments:
Edit:
They closed it as a duplicate of ID: Ticket ID: 17208813
Progress!
You didn't mention the extension's Info.plist settings, so I assume you didn't include an entry for the icon file. You'll need to add a key named NSExtensionServiceToolbarIconFile in the NSExtensionAttributes dictionary. The value is the name of the icon file.
At least that's how it's supposed to work. In practice it seems that you currently need to have a top-level CFBundleIconFile key with the icon's name. Supposedly that's only used if NSExtensionServiceToolbarIconFile isn't present, but at least for now it's necessary. I have both, which is probably not necessary, but I'd prefer to leave the key that's documented as being correct in place in case it starts working at some point.
I had the same problem. What worked for me was to follow Tom Harrington's answer, but then also make sure the 'Target Membership' (right side pane) of the extension icons includes both the extension target AND the app target. (Under Build Phases, it should be listed under Copy Bundle Resources for both targets as well.)
Also, note that your extension icons must have a fully transparent background, NOT solid white. Any white, or any colour other than transparent, will be rendered as solid dark grey.
Hope this helps. Sorry, I wanted to add this as a comment to Tom's answer, but Stack Overflow wouldn't let me because of my reputation.
We have the same problem for our Yarnee App. But I figured out that beside Camera Roll, the icons work on other Apps, for example Dropbox, see this screenshot:
It feels a little bit like a bug...
To get this to work with my existing Asset Catalog, I had to add the following to the extension's Build Settings:
The name of the set in my Assets Catalog is "ExtIcon". I had tried setting the CFBundleIcon and the NSExtensionServiceToolbarIconFile keys in the info.plist for the extension, but had no luck. This actually seems to make sense since it is the same way that icon sets are linked to the container app, not via info.plist, but via the Build Settings.
Problem seems to be solved on iOS 8.1.

Resources