VoIP and Callkit framework audio issue - ios

I am using VoIP Push and Callkit Framework for audio and video call feature in my app. I am able to display incoming call screen when app is in background mode.
I am facing one issue, that is when I answer the call, I am hearing my own voice again from device speaker.So please help me to resolve this issue.
I checked with the Speakerbox sample app given by apple developer, It that also same thing happening.
Thanks in advance.

The issue could be the setup of the IOUnit in AudioController.mm.
Check my answer here: https://stackoverflow.com/a/42034409/3990192

Related

flutter - FCM: custom vibration on iOS

I wrote an app that should notify people if something happend. Because of that it is important, that the people hear the notification. i have chosen flutter to develop parallel for android and ios. For android I have now got everything done.
For iOS I have been able to get my own sound on notifications.
But I don't found a solution how I can set my own vibration.
Do either of you know how I can set a vibration other than the short twitch?
I used the tutorial from firebase_messaging on flutter.io and set the sound during the notification rest call on the server.
If you want to see the source code, I can add it.
I thank you in advance for your support.
Kai

How to keep XMPP connection alive in the IOS App when app in background?

I have create basic chat app with XMPP Server in swift 2 (from this tutorial: http://shubhank101.github.io/iOSAndroidChaosOverFlow/2016/08/Chat-Application-Using-XMPP-Swift-Tutorial). My app is working good. but when my app went into background then my app unable to receive any message from XMPP server. i think this is because of XMPP connection break while entering the app in background.
i have tried to found the help on google for the same but nothing found related to Swift 2
Please help me. if some one put some sample code that would very helpfull for me because i m new to IOS development.
Third-party apps on the iOS are not allowed to keep network connection in background. See Apple guidelines how to avoid background networking.
You need to create a background thread to maintain XMPP connection. You can follow this tutorial to see how background thread works. https://thatthinginswift.com/background-threads/

watchOS Show App When Message Received [duplicate]

I know that an apple watch app can launch its parent application in the background to pass data back and forth but can it work the other way around? Can my iOS app launch the related watchOS app?
For a bit more insight, I'm trying to accomplish this so that I can monitor data periodically for the sake of notifications. The 70 seconds apple gives me to keep an app active and pulling data from healthKit isn't conducive to an app that provides alerts to users based on changes in behavior.
I apologize if this is a basic question. I'm new to watchOS development and haven't been able to find the answer to this anywhere. =/
No it cannot happen.
At the moment communication between the Watch and the Device is limited to the Watch App initialising communication with the iOS app and not the other way around.
This might help:
https://developer.apple.com/library//ios/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29-SW1
Yes, you can. Try the startWatchApp(with:completion:) func in HealthStore. However, it can only be used in a workout app that enable the background mode of "workout processing".
Unfortunately I think I found the answer here How to programmatically open Apple Watch companion app from iOS app.
It doesn't look like it can be done. If anyone finds otherwise, let me know!

Is it possible to send information from the iPhone to the Apple Watch?

I made some researches and I found that it was possible to call the iPhone from the Apple Watch Extension (with the method openParentApplication) but I didn't find anything talking about calling the Apple Watch from the iPhone app (like openChildApplication).
Is it possible ? If it is, can you please tell me how ?
Thanks in advance
It is possible with CFNotificationCenter and Darwin notifications. You need to look at MMWormhole.

Running an app function from background- iPhone

I need to create an app which can handle movement events while running on the background.
i.e each time an accelerometer event is happening it should be tracked in the application memory-when the application is running in the background.
My questions are :
1. Is it possible on IOS?
2. How can it be done?
(I came up with some relevant questions but i'm not sure that the answers are up to date due to IOS changes.)
Thanks,
Asaf
You should have a look to this thread (and the links inside) and the apple documentation.
To summarize no third party apps can run in the background (even though some of apple apps do this) excepting for:
Tracking the User’s Location
Playing Background Audio
Implementing a VoIP App
Downloading Newsstand Content in the Background
Communicating With an External Accessory

Resources