From 0cdc22ab337ce527b3b70a2a012c2b33b17824a5 Mon Sep 17 00:00:00 2001
From: Przemyslaw Zygmunt
Date: Thu, 30 Nov 2017 09:58:23 +0100
Subject: [PATCH] v1.4.2
---
DOMOPHONE4iOS/ACAppDelegate.m | 29 +++++--------
DOMOPHONE4iOS/ACViewController.m | 20 ++++++++-
DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist | 15 +++----
DOMOPHONE4iOS/Launch Screen.storyboard | 10 ++---
DOMOPHONE4iOS/Settings.bundle/Root.plist | 48 ++++++++-------------
DOMOPHONE4iOS/en.lproj/ACViewController.xib | 18 ++++----
6 files changed, 66 insertions(+), 74 deletions(-)
diff --git a/DOMOPHONE4iOS/ACAppDelegate.m b/DOMOPHONE4iOS/ACAppDelegate.m
index 554a659..b945760 100644
--- a/DOMOPHONE4iOS/ACAppDelegate.m
+++ b/DOMOPHONE4iOS/ACAppDelegate.m
@@ -37,7 +37,16 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
#if !TARGET_IPHONE_SIMULATOR
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
+ if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
+ {
+ [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil]];
+ [[UIApplication sharedApplication] registerForRemoteNotifications];
+ }
+ else
+ {
+ [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
+ }
+
#endif
return YES;
}
@@ -63,24 +72,6 @@ - (void)applicationDidEnterBackground:(UIApplication *)application
[MainVC sipDisconnect];
- NSNumber *bg = [[NSUserDefaults standardUserDefaults] valueForKey:@"pref_bg"];
-
- if ( bg == NULL || [bg boolValue] == YES ) {
-
- BgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler: ^{
- NSLog(@"bgTimeOut");
- }];
-
- [[UIApplication sharedApplication] setKeepAliveTimeout:600
- handler:^{
-
- [self connectionCheck];
-
- }];
- }
-
-
-
}
- (void)applicationWillEnterForeground:(UIApplication *)application
diff --git a/DOMOPHONE4iOS/ACViewController.m b/DOMOPHONE4iOS/ACViewController.m
index 3478527..0b7d5df 100644
--- a/DOMOPHONE4iOS/ACViewController.m
+++ b/DOMOPHONE4iOS/ACViewController.m
@@ -73,6 +73,7 @@ @interface ACViewController () {
NSTimer *_sipTimeoutTimer1;
NSDate *_lastAudioVideoTouch;
NSDate *_lastSysState;
+ NSTimer *_enableButtonsTimer1;
AVAudioPlayer* audioPlayer;
}
@@ -1087,6 +1088,8 @@ -(void)startAudioVideoConnection:(NSTimer*)timer {
}
+
+
-(void)setMicrophoneGain {
NSNumber *n = [[NSUserDefaults standardUserDefaults] valueForKey:@"pref_mic_gain"];
@@ -1095,8 +1098,21 @@ -(void)setMicrophoneGain {
}
+-(void)enabledButtons:(NSTimer*)timer {
+ self.btnVideo.enabled = YES;
+ self.btnAudio.enabled = YES;
+}
+
- (IBAction)audioVideoTouch:(id)sender {
+ self.btnVideo.enabled = NO;
+ self.btnAudio.enabled = NO;
+
+ if ( _enableButtonsTimer1 ) {
+ [_enableButtonsTimer1 invalidate];
+ }
+
+ _enableButtonsTimer1 = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(enabledButtons:) userInfo:sender repeats:NO];
float Diff = 4;
@@ -1111,7 +1127,7 @@ - (IBAction)audioVideoTouch:(id)sender {
&& Linphone.AudioEnabled == NO )) {
if ( _Connection ) {
-
+ // NSLog(@"audioVideoTouch:_Connection");
BOOL ActiveCall = Linphone && [Linphone ActiveCall];
[self setConnectedStatusWithActInd:!ActiveCall];
@@ -1141,7 +1157,7 @@ - (IBAction)audioVideoTouch:(id)sender {
_startVideoTimer1 = [NSTimer scheduledTimerWithTimeInterval:Diff target:self selector:@selector(startAudioVideoConnection:) userInfo:sender repeats:NO];
}
} else {
- NSLog(@"audioVideoTouch:sipDisconnect");
+ //NSLog(@"audioVideoTouch:sipDisconnect");
[self sipDisconnect];
}
diff --git a/DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist b/DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist
index 38d5327..592d4cb 100644
--- a/DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist
+++ b/DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist
@@ -33,20 +33,19 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.4
+ 1.4.2
CFBundleSignature
????
CFBundleVersion
- 21
+ 24
LSRequiresIPhoneOS
NSCameraUsageDescription
- $(PRODUCT_NAME) camera use.
- UIBackgroundModes
-
- audio
- voip
-
+ Make video calls
+ NSMicrophoneUsageDescription
+ Make audio calls
+ NSVoIPUsageDescription
+ Make audio/video calls
UILaunchStoryboardName
Launch Screen
UIPrerenderedIcon
diff --git a/DOMOPHONE4iOS/Launch Screen.storyboard b/DOMOPHONE4iOS/Launch Screen.storyboard
index 2178ec0..eed26b1 100644
--- a/DOMOPHONE4iOS/Launch Screen.storyboard
+++ b/DOMOPHONE4iOS/Launch Screen.storyboard
@@ -1,6 +1,6 @@
-
+
@@ -18,23 +18,23 @@
-
+
-
+
-
+
-
+
diff --git a/DOMOPHONE4iOS/Settings.bundle/Root.plist b/DOMOPHONE4iOS/Settings.bundle/Root.plist
index 64b2eb7..1f5beaf 100644
--- a/DOMOPHONE4iOS/Settings.bundle/Root.plist
+++ b/DOMOPHONE4iOS/Settings.bundle/Root.plist
@@ -42,8 +42,6 @@
DefaultValue
-
-
Type
PSGroupSpecifier
@@ -64,8 +62,6 @@
DefaultValue
AUTO
-
-
Type
PSGroupSpecifier
@@ -123,35 +119,25 @@
Values
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
-
- DefaultValue
-
- Type
- PSToggleSwitchSpecifier
- Title
- Background mode
- Key
- pref_bg
-
StringsTable
Root
diff --git a/DOMOPHONE4iOS/en.lproj/ACViewController.xib b/DOMOPHONE4iOS/en.lproj/ACViewController.xib
index 1138a95..abba4e8 100644
--- a/DOMOPHONE4iOS/en.lproj/ACViewController.xib
+++ b/DOMOPHONE4iOS/en.lproj/ACViewController.xib
@@ -1,6 +1,6 @@
-
+
@@ -32,19 +32,19 @@
-
+
-
+
-
-
+
+
-
+
@@ -90,7 +90,7 @@
-
+
@@ -140,7 +140,7 @@
-
+
-
+