Skip to content

Commit

Permalink
v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslawzygmunt committed Nov 30, 2017
1 parent d2cbc7e commit 0cdc22a
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 74 deletions.
29 changes: 10 additions & 19 deletions DOMOPHONE4iOS/ACAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
Expand Down
20 changes: 18 additions & 2 deletions DOMOPHONE4iOS/ACViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ @interface ACViewController () {
NSTimer *_sipTimeoutTimer1;
NSDate *_lastAudioVideoTouch;
NSDate *_lastSysState;
NSTimer *_enableButtonsTimer1;

AVAudioPlayer* audioPlayer;
}
Expand Down Expand Up @@ -1087,6 +1088,8 @@ -(void)startAudioVideoConnection:(NSTimer*)timer {

}



-(void)setMicrophoneGain {

NSNumber *n = [[NSUserDefaults standardUserDefaults] valueForKey:@"pref_mic_gain"];
Expand All @@ -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;

Expand All @@ -1111,7 +1127,7 @@ - (IBAction)audioVideoTouch:(id)sender {
&& Linphone.AudioEnabled == NO )) {

if ( _Connection ) {

// NSLog(@"audioVideoTouch:_Connection");
BOOL ActiveCall = Linphone && [Linphone ActiveCall];

[self setConnectedStatusWithActInd:!ActiveCall];
Expand Down Expand Up @@ -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];
}

Expand Down
15 changes: 7 additions & 8 deletions DOMOPHONE4iOS/DOMOPHONE4iOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,19 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<string>1.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>21</string>
<string>24</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) camera use.</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
</array>
<string>Make video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>Make audio calls</string>
<key>NSVoIPUsageDescription</key>
<string>Make audio/video calls</string>
<key>UILaunchStoryboardName</key>
<string>Launch Screen</string>
<key>UIPrerenderedIcon</key>
Expand Down
10 changes: 5 additions & 5 deletions DOMOPHONE4iOS/Launch Screen.storyboard
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
Expand All @@ -18,23 +18,23 @@
<viewControllerLayoutGuide type="bottom" id="EG9-Ht-vZx"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg1.png" translatesAutoresizingMaskIntoConstraints="NO" id="vQa-EJ-kdJ">
<rect key="frame" x="0.0" y="0.0" width="375" height="287"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="287"/>
<constraints>
<constraint firstAttribute="height" constant="287" id="Dha-46-W9R"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg2.png" translatesAutoresizingMaskIntoConstraints="NO" id="mA1-7H-aDf">
<rect key="frame" x="0.0" y="430" width="375" height="237"/>
<rect key="frame" x="0.0" y="331" width="320" height="237"/>
<constraints>
<constraint firstAttribute="height" constant="237" id="EBM-wc-Wgq"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo@x2.png" translatesAutoresizingMaskIntoConstraints="NO" id="FZv-m0-EtG">
<rect key="frame" x="37.5" y="116" width="300" height="335"/>
<rect key="frame" x="10" y="66.5" width="300" height="335"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="vVk-rc-aQp"/>
</constraints>
Expand Down
48 changes: 17 additions & 31 deletions DOMOPHONE4iOS/Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
<key>DefaultValue</key>
<string></string>
</dict>


<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
Expand All @@ -64,8 +62,6 @@
<key>DefaultValue</key>
<string>AUTO</string>
</dict>


<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
Expand Down Expand Up @@ -123,35 +119,25 @@
<key>Values</key>
<array>
<integer>1</integer>
<integer>2</integer>
<integer>3</integer>
<integer>4</integer>
<integer>5</integer>
<integer>6</integer>
<integer>7</integer>
<integer>8</integer>
<integer>9</integer>
<integer>10</integer>
<integer>11</integer>
<integer>12</integer>
<integer>13</integer>
<integer>14</integer>
<integer>15</integer>
<integer>16</integer>
<integer>17</integer>
<integer>18</integer>
<integer>2</integer>
<integer>3</integer>
<integer>4</integer>
<integer>5</integer>
<integer>6</integer>
<integer>7</integer>
<integer>8</integer>
<integer>9</integer>
<integer>10</integer>
<integer>11</integer>
<integer>12</integer>
<integer>13</integer>
<integer>14</integer>
<integer>15</integer>
<integer>16</integer>
<integer>17</integer>
<integer>18</integer>
</array>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Background mode</string>
<key>Key</key>
<string>pref_bg</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
Expand Down
18 changes: 9 additions & 9 deletions DOMOPHONE4iOS/en.lproj/ACViewController.xib
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
<device id="retina5_5" orientation="portrait">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
Expand Down Expand Up @@ -32,19 +32,19 @@
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="6">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="top" image="bg1.png" id="41">
<rect key="frame" x="0.0" y="0.0" width="320" height="240"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="bg2.png" id="42">
<rect key="frame" x="0.0" y="504" width="320" height="232"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<rect key="frame" x="0.0" y="336" width="320" height="232"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
</imageView>
<view opaque="NO" contentMode="scaleToFill" misplaced="YES" id="45">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view hidden="YES" opaque="NO" contentMode="scaleToFill" misplaced="YES" id="101" userLabel="infoView">
Expand Down Expand Up @@ -90,7 +90,7 @@
</subviews>
</view>
<view opaque="NO" contentMode="scaleToFill" id="16" userLabel="statusView">
<rect key="frame" x="47" y="685" width="320" height="51"/>
<rect key="frame" x="0.0" y="517" width="320" height="51"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<progressView hidden="YES" opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" id="jWM-Xz-FAs">
Expand Down Expand Up @@ -140,7 +140,7 @@
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="logo@x2.png" id="73">
<rect key="frame" x="47" y="222" width="320" height="52"/>
<rect key="frame" x="0.0" y="222" width="320" height="52"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="80">
Expand Down Expand Up @@ -222,7 +222,7 @@
</connections>
</button>
<textView hidden="YES" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.69999998807907104" contentMode="scaleToFill" editable="NO" id="92" userLabel="logTextView">
<rect key="frame" x="7" y="592" width="240" height="85"/>
<rect key="frame" x="7" y="424" width="240" height="85"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
Expand Down

0 comments on commit 0cdc22a

Please sign in to comment.