omikit-plugin 3.2.27 → 3.2.29

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
- #import <omicall_flutter_plugin/omicall_flutter_plugin-Swift.h>
266
-
267
- [OmiClient setEnviroment:KEY_OMI_APP_ENVIROMENT_SANDBOX userNameKey:@"full_name" maxCall:2 callKitImage:@"call_image"];
268
- provider = [[CallKitProviderDelegate alloc] initWithCallManager: [OMISIPLib sharedInstance].callManager];
269
- voipRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
270
- pushkitManager = [[PushKitManager alloc] initWithVoipRegistry:voipRegistry];
271
- if (@available(iOS 10.0, *)) {
272
- [UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self;
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
- [OmikitNotification didRecieve:userInfo];
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
@@ -104,7 +104,7 @@ dependencies {
104
104
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
105
105
  // noinspection GradleDynamicVersion
106
106
  // implementation "com.facebook.react:react-native"
107
- api 'vn.vihat.omicall:omi-sdk:2.2.40'
107
+ api 'vn.vihat.omicall:omi-sdk:2.2.41'
108
108
 
109
109
  implementation "com.facebook.react:react-native:+" // From node_modules
110
110
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_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 = 8.0;
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 = 8.0;
253
+ IPHONEOS_DEPLOYMENT_TARGET = 12.4;
254
254
  MTL_ENABLE_DEBUG_INFO = NO;
255
255
  SDKROOT = iphoneos;
256
256
  VALIDATE_PRODUCT = YES;
@@ -18,9 +18,9 @@ Pod::Spec.new do |s|
18
18
 
19
19
  s.dependency "React-Core"
20
20
 
21
- # Don't install the dependencies when we run `pod install` in the old architecture.
21
+ # Don't install the dependencies when we run `pod install` in the old architecture.
22
22
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
23
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" + " -fno-modules"
23
+ s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
24
24
  s.pod_target_xcconfig = {
25
25
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
26
26
  "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
@@ -32,5 +32,5 @@ Pod::Spec.new do |s|
32
32
  s.dependency "RCTTypeSafety"
33
33
  s.dependency "ReactCommon/turbomodule/core"
34
34
  end
35
- s.dependency "OmiKit", '1.7.15'
35
+ s.dependency "OmiKit", '1.7.16'
36
36
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omikit-plugin",
3
- "version": "3.2.27",
3
+ "version": "3.2.29",
4
4
  "description": "Omikit Plugin by ViHAT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",