iOS silent push not work when APP in background - swift

I used JPush to post a silent_push.
I can not recived silent push when APP in background.
The AppDelegate's method
application:didReceiveRemoteNotification:fetchCompletionHandler
not fire.
But It was working in foreground.
Background Modes:
enter image description here
Where I missing?
// plist
enter image description here
NEW UPDATW :
I closed my idevice's background refresh feature....

Did you added this in your plist
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>

Related

Microphone stops working in Flutter iOS app using flutter_inappwebview when it goes to the background

I'm using flutter_inappwebview to show a webview, that has webrtc capabilities, using both camera and video it works fine until the app is set to the background.
When the app is minimized (goes to background), I can still hear other users on the call but my microphone stops working and others cannot hear me.
This does work fine in Android but does not on iOS.
I'm using flutter_inappwebview version 5.3.2, and has the Audio background mode:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
</array>

Xcode 8 & Swift 3 -- Adding a 'status bar' feature when user exits app?

I was using an app called "sleep cycle" the other day and noticed that when I exit the app (and an alarm is set) a status bar appears prompting me to return.
I want to implement this feature in an app I'm currently working on, but do not know where to start/what the feature is even called. I have included an image of it below. Any input/advice is appreciated. Thank you!
This red bar is a system level bar shown to indicate the app is recording audio while in the background.
iOS uses different colors to indicate different things (the bar is green when on a phone call, for instance).
In order to implement this in your own app, you need to be recording audio in the background. The system will then show the bar to the user while the audio is being recorded. To add the audio background mode to your app, add the following key to your Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>

AIR 2.7 iOS App will not quit when hitting iPhone home button

When publishing to iOS device the game plays well, when hitting homebutton it disappears as normal, but next time you open it - it starts to play at the state or level it was when quitting - as it only was paused. It should start up from default startupscreen.
does anyone have the same problem? or solution tho this?
ps we had an 103 error that we solved with this:
http://kb2.adobe.com/cps/909/cpsid_90916.html
When you write an iPhone application, to disable the background mode, you have to set the "UIApplicationExitsOnSuspend" key to YES in the info.plist file.
When you develop mobile Air application the equivalent of the info.plist is located into the "name of the app"-app.xml. I have never tested it but you may have to specify it there like that:
<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
<key>UIApplicationExitsOnSuspend</key>
<true/>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
I hope it'll help you.

iPhone - keep radio running in background

I am creating a Radio application , in that I want to keep my radio running even though the application goes to the background.
i.e. streaming must be continued , right now it gets stopped.
Please help me out from this situation
thanks
Add a "Required background modes" entry to your application .plist. This is an array, add an item of "App plays audio".
if you look at the plist source, it'll be:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
This might be worth looking into:
iPhone ios4 - Replacing iPod dock icon whilst playing background audio stream

launch the ipad app again

when user presses home button the app should relaunch or it should not allow user to terminate.
what is the possible way to do this? The app should remain on ipad unless user quits the app from inside the application not from home button.
I am considering the termination of app if it crashes or some other reasons that is ok app should quit no doubt, but not normally as user press home button the app should relaunch.
There is no way to do this. It would be a horrible user experience anyways, and as such, not encouraged.
This behavior will with 99% certainty get your app rejected on the App Store.
The normal behavior a user (and Apple) expects is to have the app quit only when the home button is pressed. Any other means of quitting an app, including special buttons, excessive crashes, etc. will flag it for rejection.
You can do this only for iOS 3.2
In applicationWillTerminate do
NSString *UrlString = [NSString stringWithString: #"yourAppSchema:"];
[application openURL:[NSURL URLWithString:[UrlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]]];
First you need to update your Info.plist of your app to support an url schema
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>yourAppSchema</string>
</array>
<key>CFBundleURLName</key>
<string>com.yourCompany.yourAppSchema</string>
</dict>
</array>
The way you do this is to put your iPad in something like This
And also read this thread.