<
From version < 44.3 >
edited by Simon Morlat
on 2020/06/23 14:20
To version < 44.5 >
edited by Simon Morlat
on 2020/06/23 14:25
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -98,6 +98,41 @@
98 98  
99 99  For Swift, online documentation is available [[here>>https://www.linphone.org/snapshots/docs/liblinphone/swift/index.html]] .
100 100  
101 += Guidelines for integrating with push notifications =
102 +
103 += CallKit Integration =
104 +
105 +Starting from linphone-sdk >= 4.3, **Callkit** must be integrated in the following way:
106 +
107 +* Add the **CallKit** framework into your application's dependencies in Xcode.
108 +* Implement the **CXProviderDelegate** protocol within your **ApplicationDelegate**
109 +* Add the configuration **"use_callkit=1"** in the section **"app" **or call **linphone_core_enable_callkit** before the linphone core starts.
110 +* Since iOS 13, Apple requests **CallKit **to be invoked to display the incoming call immediately when a **PushKit** notification is received. So sometimes you can answer the **CallKit** before a **LinphoneCall** is received. In the callback **CXAnswerCallAction**, if a **LinphoneCall** has not yet been received, you need to configure your **AVAudioSession** and accept the call when you receive it. Otherwise, accept the call directly.
111 +
112 +{{code language="swift"}}
113 +func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
114 + if (call == nil || call.state != Call.State.IncomingReceived) {
115 + // configure audio session here. Use 48000 Hz as sampling rate.
116 + } else {
117 + // accept call here
118 + }
119 + action.fulfill()
120 +}
121 +{{/code}}
122 +
123 +* **CallKit** MUST inform the **LinphoneCore** when **AVAudioSession** is activated, as follows:
124 +
125 +{{code language="swift"}}
126 +func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
127 + lc.activateAudioSession(actived: true)
128 + }
129 +
130 +func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) {
131 + lc.activateAudioSession(actived: false)
132 + }
133 +{{/code}}
134 +
135 +
101 101  = Handling liblinphone log =
102 102  
103 103  In order to see liblinphone logs in your IOS app (for example in your Xcode console) follow these steps :
... ... @@ -167,47 +167,6 @@
167 167  {{/code}}
168 168  
169 169  
170 -= Full ipv6 support =
171 -
172 -{{info}}
173 - [[Starting June 1, 2016, all applications submitted to the App Store must work within IPv6-only networks>>url:https://developer.apple.com/news/?id=05042016a]]. Linphone supports these requirements since version [[3.13.9>>url:https://github.com/BelledonneCommunications/linphone-iphone/blob/master/CHANGELOG.md]] released June 15, 2016.
174 -{{/info}}
175 -
176 -To comply with Apple requirements, you will need to:
177 -
178 -* Update your Linphone-iphone application to [[3.13.9>>url:https://github.com/BelledonneCommunications/linphone-iphone/releases/tag/3.13.9]] minimum.
179 -* Make sure not to disable IPV6 accidentally in the application, with
180 -
181 -{{code}}linphone_core_enable_ipv6(){{/code}}or by setting
182 -
183 -{{code}}ipv6=0 {{/code}}in
184 -
185 -{{code}}[net]{{/code}}section of your linphonerc default or factory configuration files.
186 -
187 -{{code}}ipv6=1{{/code}}becomes the default in the 3.3.19 linphone-iphone release.
188 -
189 -
190 -== App upgrade ==
191 -
192 -* For app upgrades, since version 3.13.9 liblinphone automatically switches on IPV6 during installation.
193 -
194 -== Server side ==
195 -
196 -* Thanks to NAT64/DNS64, IPV4 SIP servers can still be used without modifications, assuming that there are prepared to receive IPV6 addresses in both, VIA, Contact and SDP fields.
197 -* As NAT64 implementation leverages features only available since 9.x (I.E NAT64 aware getaddrinfo), NAT64 is only supported on IOS version >= 9.x.
198 -
199 -== Testing ==
200 -
201 -* Macos 10.11 provides a way to create a testing IPV6 NAT64/DNS64 network. See [[ Test for IPv6 DNS64/NAT64 Compatibility Regularly>>url:https://developer.apple.com/library/prerelease/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1]] for details
202 -
203 -= IOS 10 - Important changes =
204 -
205 -* It is no longer possible to listen to a SIP socket in order to detect incoming calls, or new messages, when the application is in background. Now using the push notifications is the only way to do so.
206 -* Linphone uses VoIP push notifications (from the PushKit framework), in replacement of remote notifications and VoIP sockets, since commit : f84fb0bc0fe5cfa34b0029cb775668cd96a13ce3
207 -* For IOS 10 and more a new parameter is needed to register for push notifications : pn-token. When registering for push notifications, it is necessary to add "pn-timeout=0" to the request so that the push gateway sends the notifications as soon as possible.
208 -* FlexiSIP supports VoIP push notifications since commit : a50538897674b2c8cb723e73f6e9d6a969e0b6e0
209 -* Please find more information about push notifications in FlexiSIP [[here>>doc:Flexisip.Modules Reference Guide.PushNotification]].
210 -
211 211  = CallKit Integration =
212 212  
213 213  Starting from linphone-sdk >= 4.3, **Callkit** must be integrated in the following way: