How to hide the app icon programatically in iphone app - ios

I am making an app in which i will track user location.
so the point is that whenever user install the app, after installation the app will be hide and works in background and give data of user location through gps to server.
so i want how to hide app icon and works done in background.
please help.

You can't remove your App icon from the home screen completely, you can make it invisible. However, the icon, while invisible, can still be tapped.
Here is how you make your App invisible:
Create a completely transparent PNG file, and use it as Icon. Enable the "Prerendered" checkbox to make sure no gradient is applied to your icon.
In your .plist file, remove the string "${PRODUCT_NAME}" from "Bundle display name"
Also, your App would never be approved for the App Store that way.

Related

Avoid external display to show native iOS screen when app entering background

My app has an external display when a second screen is connected. It displays the main content I want that people see while I navigate through others views. it works fine.
Is there a way to keep this external display active when app is entering background ?
I enabled background mode in Capabilities tab, I'm able to run code in background, it refreshes correctly when I enter foreground again.
AFAIK the answer is No.
As soon as your app goes to the background, it loses control of the external screen.

Is it possible to display progress on App icon

Is there a way to display progress on Ios App icon on the launcher/ main screen like they have default when installing or downloading an app from App store?
I have content that is being downloaded/uploaded in the background. I want to display continuous progress on app icon.
A circular progress bar is not important. I am just looking if there is any provision for such situations.
This is not possible.
Apple does expose any API methods for adding a layer to the app icon on the springboard.
Also changing your apps icon to include the progress will not work, since the app icon is in your apps main bundle which is readonly.
i don't know if it is still possible to use these red numbers like for whatsapp when you receive a message.
Maybe that would be an idea. You could Show the "%" of the upload/download that way.

Is there any way to change notification image

i want to show or change present image in notification with latest image icon, the image icon will be provided either in the notification data or saved previously in the app like this one and this one image
i want that if notification came on the IOS device then the image in the notification will show accordingly
this text from iOS Human Interface Guidelines
A banner is a small translucent view that appears onscreen and then disappears after a few seconds. Users can also see a version of the banner on the lock screen and in the Notifications view of Notification Center. In the banner, iOS displays your notification message and the small version of your app icon (to learn more about the small app icon, see App Icon). Users tap the banner to dismiss it and switch to the app that sent the notification.
I believe that you can't change it, but may be if you change some pictures in App icon source, you will achieve the necessary result, but I repeat, hardly everything will correctly work
for example
U can try to change Spotlight images or any else....

iOS: is it possible to get an app to show on the top area of the screen whilst in background?

The above is what can bee seen in iOS when the Maps app goes in background state. Is it possible to achieve the same with custom apps or is it only something that Apple apps can do (e.g. Garageband)?
The behaviour is:
user opens Maps app and sets navigation
user sets Maps in background
iOS top navigation area becomes blue and stays visible whilst using other apps
once the user taps on the bar it returns to the Maps app
Those are the background modes available on Xcode:
Is it possible to do this for all these modes?
Yes you can do it by setting
CLAuthorizationStatus = kCLAuthorizationStatusAuthorizedWhenInUse
instead of kCLAuthorizationStatusAuthorizedAlwaysUse
and add this in your .plist
you have to request when in use authorization , but this is not the trick , here is the trick
click on your project in the project navigator
select your target .
click on the capabilities tap
turn background modes one
List item
check the location updates check box .
of course you have to set the NSLocationWhenInUseUsageDescription property in your info.plist

Detect if home button is pressed while the app is running in the background

I need a way for my app to know if the home button is pressed, while the app is running in the background. If the home button is pressed, something is gonna be added to a list inside the app. Is that possible somehow?
If your app is in the background, your app wont receive any updates. Furthermore, there isn't any way to hook into the home button click even if your app is in the foreground.
Perhaps there is a private api way to handle this, but your app certainly won't be able to both achieve this goal and be in the Apple App Store. Sorry!
In case you wanted some idea why Apple doesn't allow this, it's because they don't want the home button switch's default behavior to be altered. See this:
10.5 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, will be rejected

Resources