omikit-plugin 3.2.28 → 3.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -48,12 +48,12 @@ maven {
|
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
```
|
|
51
|
-
//in dependencies
|
|
51
|
+
// in dependencies
|
|
52
52
|
classpath 'com.google.gms:google-services:4.3.13'
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
```
|
|
56
|
-
//under buildscript
|
|
56
|
+
// under buildscript
|
|
57
57
|
allprojects {
|
|
58
58
|
repositories {
|
|
59
59
|
maven {
|
|
@@ -235,12 +235,12 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
235
235
|
- Add Firebase Messaging to receive `fcm_token` (You can refer <a href="https://rnfirebase.io/messaging/usage">Cloud Messaging</a> to setup notification for React native)
|
|
236
236
|
|
|
237
237
|
- For more setting information, please refer <a href="https://api.omicall.com/web-sdk/mobile-sdk/android-sdk/cau-hinh-push-notification">Config Push for Android</a>
|
|
238
|
-
|
|
238
|
+
## Config for IOS
|
|
239
239
|
#### iOS(Object-C):
|
|
240
240
|
|
|
241
241
|
- Assets: Add `call_image` into assets folder to update callkit image. We only support png style.
|
|
242
242
|
|
|
243
|
-
- Add variables in Appdelegate.h
|
|
243
|
+
- Add variables in **Appdelegate.h** for **Old Architecture**:
|
|
244
244
|
|
|
245
245
|
```
|
|
246
246
|
#import <UIKit/UIKit.h>
|
|
@@ -256,22 +256,49 @@ You can refer <a href="https://github.com/VIHATTeam/OMICALL-React-Native-SDK/blo
|
|
|
256
256
|
@property (nonatomic, strong) PKPushRegistry * voipRegistry;
|
|
257
257
|
|
|
258
258
|
@end
|
|
259
|
+
```
|
|
260
|
+
- Add variables in **Appdelegate.h** for **New Architecture**:
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
#import <UIKit/UIKit.h>
|
|
264
|
+
#import <UserNotifications/UserNotifications.h>
|
|
265
|
+
#import <OmiKit/OmiKit-umbrella.h>
|
|
266
|
+
#import <OmiKit/Constants.h>
|
|
267
|
+
|
|
268
|
+
@interface AppDelegate : NSObject <UIApplicationDelegate, UNUserNotificationCenterDelegate, RCTBridgeDelegate>
|
|
269
|
+
|
|
270
|
+
@property (nonatomic, strong) UIWindow *window;
|
|
271
|
+
@property (nonatomic, strong) PushKitManager *pushkitManager;
|
|
272
|
+
@property (nonatomic, strong) CallKitProviderDelegate * provider;
|
|
273
|
+
@property (nonatomic, strong) PKPushRegistry * voipRegistry;
|
|
274
|
+
|
|
275
|
+
@end
|
|
276
|
+
|
|
259
277
|
```
|
|
260
278
|
|
|
261
279
|
- Edit AppDelegate.m:
|
|
262
280
|
|
|
263
281
|
```
|
|
264
282
|
#import <OmiKit/OmiKit.h>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
|
|
284
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
285
|
+
{
|
|
286
|
+
|
|
287
|
+
// ----- Start OmiKit Config ------
|
|
288
|
+
[OmiClient setEnviroment:KEY_OMI_APP_ENVIROMENT_SANDBOX userNameKey:@"full_name" maxCall:2 callKitImage:@"call_image" typePushVoip:TYPE_PUSH_CALLKIT_DEFAULT];
|
|
289
|
+
_provider = [[CallKitProviderDelegate alloc] initWithCallManager: [OMISIPLib sharedInstance].callManager];
|
|
290
|
+
_voipRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
|
|
291
|
+
_pushkitManager = [[PushKitManager alloc] initWithVoipRegistry:_voipRegistry];
|
|
292
|
+
if (@available(iOS 10.0, *)) {
|
|
293
|
+
[UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
|
|
294
|
+
}
|
|
295
|
+
// ----- End OmiKit Config ------
|
|
296
|
+
|
|
297
|
+
return YES;
|
|
298
|
+
|
|
273
299
|
}
|
|
274
300
|
|
|
301
|
+
|
|
275
302
|
//Called when a notification is delivered to a foreground app.
|
|
276
303
|
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
|
|
277
304
|
{
|
|
@@ -279,15 +306,17 @@ if (@available(iOS 10.0, *)) {
|
|
|
279
306
|
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
|
|
280
307
|
}
|
|
281
308
|
|
|
309
|
+
// This function is used to send an event back into the app when the user presses on a missed call notification
|
|
282
310
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {
|
|
283
311
|
NSDictionary *userInfo = response.notification.request.content.userInfo;
|
|
284
312
|
if (userInfo && [userInfo valueForKey:@"omisdkCallerNumber"]) {
|
|
285
313
|
NSLog(@"User Info : %@",userInfo);
|
|
286
|
-
|
|
314
|
+
[OmikitNotification didRecieve:userInfo];
|
|
287
315
|
}
|
|
288
316
|
completionHandler();
|
|
289
317
|
}
|
|
290
318
|
|
|
319
|
+
// This function will terminate all ongoing calls when the user kills the app
|
|
291
320
|
- (void)applicationWillTerminate:(UIApplication *)application {
|
|
292
321
|
@try {
|
|
293
322
|
[OmiClient OMICloseCall];
|
|
@@ -343,8 +372,9 @@ if (@available(iOS 10.0, *)) {
|
|
|
343
372
|
We support 2 environments. So you need set correct key in Appdelegate.
|
|
344
373
|
- KEY_OMI_APP_ENVIROMENT_SANDBOX support on debug mode
|
|
345
374
|
- KEY_OMI_APP_ENVIROMENT_PRODUCTION support on release mode
|
|
346
|
-
- Visit on web admin to select correct enviroment.
|
|
375
|
+
- Visit on web admin to select correct enviroment.
|
|
347
376
|
```
|
|
377
|
+
*Note: At Tab Build Setting off Target Project, you need set: ***Enable Modules (C and Objective C)*** : YES*
|
|
348
378
|
|
|
349
379
|
#### iOS(Swift):
|
|
350
380
|
- Assets: Add `call_image` into assets folder to update callkit image. We only support png style.
|
|
@@ -838,3 +868,8 @@ useEffect(() => {
|
|
|
838
868
|
transferCall({
|
|
839
869
|
phoneNumber: 102
|
|
840
870
|
})
|
|
871
|
+
|
|
872
|
+
# Issues
|
|
873
|
+
|
|
874
|
+
## iOS
|
|
875
|
+
- Must use "Rosetta Destination" to run debug example app on macOS Apple chip
|
package/android/build.gradle
CHANGED
|
@@ -30,7 +30,6 @@ def isNewArchitectureEnabled() {
|
|
|
30
30
|
|
|
31
31
|
apply plugin: 'com.android.library'
|
|
32
32
|
apply plugin: 'kotlin-android'
|
|
33
|
-
apply plugin: 'kotlin-kapt'
|
|
34
33
|
apply plugin: 'kotlin-parcelize'
|
|
35
34
|
|
|
36
35
|
|
|
@@ -104,7 +103,7 @@ dependencies {
|
|
|
104
103
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
105
104
|
// noinspection GradleDynamicVersion
|
|
106
105
|
// implementation "com.facebook.react:react-native"
|
|
107
|
-
api
|
|
106
|
+
api "vn.vihat.omicall:omi-sdk:2.2.41"
|
|
108
107
|
|
|
109
108
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
110
109
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
@@ -115,7 +114,7 @@ dependencies {
|
|
|
115
114
|
implementation "androidx.appcompat:appcompat:1.6.1"
|
|
116
115
|
implementation "androidx.lifecycle:lifecycle-process:2.6.1"
|
|
117
116
|
implementation "com.google.android.material:material:1.9.0"
|
|
118
|
-
implementation
|
|
117
|
+
implementation "com.google.firebase:firebase-messaging-ktx:23.1.2"
|
|
119
118
|
implementation("com.squareup.retrofit2:retrofit:2.9.0") {
|
|
120
119
|
exclude module: 'okhttp'
|
|
121
120
|
}
|
|
@@ -129,10 +128,8 @@ dependencies {
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
|
|
132
|
-
implementation "com.github.bumptech.glide:glide:4.15.1"
|
|
133
|
-
annotationProcessor "com.github.bumptech.glide:compiler:4.15.1"
|
|
134
131
|
implementation("androidx.work:work-runtime:2.8.1")
|
|
135
|
-
implementation
|
|
132
|
+
implementation "com.squareup.picasso:picasso:2.8"
|
|
136
133
|
|
|
137
134
|
def coroutines_version = '1.7.2'
|
|
138
135
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
207
207
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
208
208
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
209
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
209
|
+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
|
210
210
|
MTL_ENABLE_DEBUG_INFO = YES;
|
|
211
211
|
ONLY_ACTIVE_ARCH = YES;
|
|
212
212
|
SDKROOT = iphoneos;
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
251
251
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
252
252
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
253
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
253
|
+
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
|
254
254
|
MTL_ENABLE_DEBUG_INFO = NO;
|
|
255
255
|
SDKROOT = iphoneos;
|
|
256
256
|
VALIDATE_PRODUCT = YES;
|
|
Binary file
|