Push Notification icon in Settings - iphone

I've got an app that uses Apple's Push Notification Service. I'm registered, and receive the notifications just fine. However, when I go into the Settings -> Notifications area, my app is listed, but there's no icon visible. Is there a flag, or a special PNG I need to include in my bundle?
Thanks!

Okay, stupid mistake. The info.plist icon field was empty. By default, the OS still looks for an icon.png file for Springboard, but doesn't use the same trick for the Notification settings.

Related

How to change app icon within In-App Purchase?

Is it possible even to change from demo icon to full version image after purchasing full version via InApp Purchase? Or should I make two versions with lite/full icons ?
Please refer to
https://stackoverflow.com/a/45602449/195186
This was true before iOS 10.3 only:
No. This is not possible. The icon is fixed.
UIApplication has a new instance method that will do what you want. The Apple docs spell out exactly what you need to do to accomplish this: https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname
This is not possible, since iOS apps run in a sandbox and can therefore not write (while they can read) the app's bundle, where the icon is located.
1) In info.plist set up key Icon file with value ../Documents/icon.png.
2) Add key Icon already includes gloss effects with value YES
3) In first launch move picture to /Documents/icon.png
After second launch Icon app will be changed!
If you change icon.png in Documents folder need to make respiring for refresh Icon app.

Invalid background modes error message when submitting to the App Store

I have an issue with submitting my app to the app store. My app wants to run in the background, so I have set "App registers for location updates in required back ground modes" array in the plist. When I try to upload to the app store, I am getting the following error message:
Invalid UIBackgroundModes: the UIBackgroundmodes key contains an invalid value
You should open your apps info.plist in Text Edit, find the background modes section and see if there is anything strange or off about it. If you can't figure it out from there just post the contents of the plist in your question.
sorry i can not comment so i want to clear my query on this.
My app need to work in background mode for push notification & location.
I am facing same issue & i am unable to get what is wrong in this.
Thanks
Updated:
I then found that Removing the "Location" attribute which was added manually which was not required once added in capabilities section. (for new versions of Xcode the provision is given in capabilities section under background mode to configure that your app is using background mode for location, push notification etc.)
I also got the similar issue when i copied the background mode from other target's plist.
I follow the below steps to fix it
info.plist > open as > source code
Then search for UIBackgroundModes.
What i see is wrong is :
To fix this i have change the UIBackgroundModes to :
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
There is other convenient way of doing it is
Just turn off the the background mode from "Signing and capabilities" and on it again your plist will update automatic.
hope it will help to others who are facing the same issue.
Check "Required background modes" on info.plist, I had an empty <string></string> there, after I deleted it the problem was solved!
info.plist image

xcode iphone prevent app from backgrounding?

How can I prevent my app from backgrounding? When I press the home button the app does not seem to close but save its state. Do I have to add some code to - (void)applicationWillTerminate:?
I believe you are referring to preventing the application from Running in the Background?
This is controlled via the application's Info.plist.
Add:
Application does not run in background setting it to YES
or in XML
<key>UIApplicationExitsOnSuspend</key>
<true/>
If you mess around with the home button's functionality Apple will NOT allow your app in the store. I tried to do the same thing but the app got rejected with reason: "The Home button's functionality is absolute and should not be changed without a valid reason.".

Can an iphone app change its home screen icon and name after installation?

Can an iphone app change its home screen icon and name after installation?
What i want to do is make a generic application for several of our clients, that upon installation and login by users it detects which of our client it applies to and changes its icon and name to reflect the appropriate branding.
Is this going to be possible? Or are we simply going to have to make (and submit for approval...) one app per client?
Thanks
Updated: since iOS 10 it's possible to change the application icon from the list of pre-defined ones in the Info.plist. However display name still stays the constant.
Outdated: Since app's name is in Info.plist which resides with app's icon in app's bundle (which is readonly) - it cannot. You can only change your app's name and icon after releasing an update into the appstore. You may though change application icon's badge value. But as I see in your scenario - it won't fit your needs at all.

Is it possible to change the app icon programmatically?

I want to make two different app icons, and programmatically switch betweem then. When the user quits the app without finishing an workflow-process, then I want to switch to an icon that will indicate that there's something undone when launching the app. Well, just theoretically, just for testing.
I think that the icon file is just a normal file as any other, so if I would just rename it programmatically and then give another icon file the name of the icon file that's named the Info.plist, then the app should show up with another icon, right? Would that be possible? Or do I have no access to that file for renaming it?
icon file stored in "application bundle" folder.
And your application has read-only rights to this folder
There is no oficial way to change/rename thees files.
You can add integer badge to youy icon
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:666]
But it is not official method.
It sounds like a good idea, and I would definitely give it a try, but I get the feeling this isn't possible.
I believe the app icons get stored in another file structure global to the iPhone. I say this because after I installed 3.0 beta 5, I saw a bug where the app icon disappeared from an app I developed. Then after installing two new apps from the app store, the new app's icon appeared on my app, and the 2nd new app's icon appeared on both new apps. Essentially the new app icons shifted to fill in for the missing app icon.
Removing and re-adding the apps, then rebooting the phone, restored the icons properly.
I don't know for a fact how the app icons are managed and stored on the phone, of course, but it would fit to say they are stored in some sort of cached list that gets rebuilt occasionally, perhaps after a reboot. That would mean even if you could change the icon from within your app, it would take more effort to see the effects on the phone.