diff --git a/Classes/KIF b/Classes/KIF index 976aafa2e..1fe66431b 160000 --- a/Classes/KIF +++ b/Classes/KIF @@ -1 +1 @@ -Subproject commit 976aafa2e211dd095411bfef09da6c0919d70476 +Subproject commit 1fe66431b824990a58f1ae063bf0e2151079e90e diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 8422b6a5b..347cd5fac 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -174,30 +174,33 @@ BOOL background_mode = [instance lpConfigBoolForKey:@"backgroundmode_preference"]; BOOL start_at_boot = [instance lpConfigBoolForKey:@"start_at_boot_preference"]; + if ([app respondsToSelector:@selector(registerUserNotificationSettings:)]) { + /* iOS8 notifications can be actioned! Awesome: */ + UIUserNotificationType notifTypes = + UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert; - if( !instance.isTesting ){ - if( [app respondsToSelector:@selector(registerUserNotificationSettings:)] ){ - /* iOS8 notifications can be actioned! Awesome: */ - UIUserNotificationType notifTypes = UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert; + NSSet *categories = + [NSSet setWithObjects:[self getCallNotificationCategory], [self getMessageNotificationCategory], nil]; + UIUserNotificationSettings *userSettings = + [UIUserNotificationSettings settingsForTypes:notifTypes categories:categories]; + [app registerUserNotificationSettings:userSettings]; - NSSet* categories = [NSSet setWithObjects:[self getCallNotificationCategory], [self getMessageNotificationCategory], nil]; - UIUserNotificationSettings* userSettings = [UIUserNotificationSettings settingsForTypes:notifTypes categories:categories]; - [app registerUserNotificationSettings:userSettings]; - [app registerForRemoteNotifications]; - } else { - NSUInteger notifTypes = UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeNewsstandContentAvailability; - [app registerForRemoteNotificationTypes:notifTypes]; - } - } else { - NSLog(@"No remote push for testing"); - } + if (!instance.isTesting) { + [app registerForRemoteNotifications]; + } + } else { + if (!instance.isTesting) { + NSUInteger notifTypes = UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | + UIRemoteNotificationTypeBadge | + UIRemoteNotificationTypeNewsstandContentAvailability; + [app registerForRemoteNotificationTypes:notifTypes]; + } + } - - if (state == UIApplicationStateBackground) - { - // we've been woken up directly to background; - if( !start_at_boot || !background_mode ) { - // autoboot disabled or no background, and no push: do nothing and wait for a real launch + if (state == UIApplicationStateBackground) { + // we've been woken up directly to background; + if (!start_at_boot || !background_mode) { + // autoboot disabled or no background, and no push: do nothing and wait for a real launch /*output a log with NSLog, because the ortp logging system isn't activated yet at this time*/ NSLog(@"Linphone launch doing nothing because start_at_boot or background_mode are not activated.", NULL); return YES; diff --git a/KifTests/ChatTester.m b/KifTests/ChatTester.m index 6f15ab140..88ca8e496 100644 --- a/KifTests/ChatTester.m +++ b/KifTests/ChatTester.m @@ -28,6 +28,7 @@ } - (void)afterAll { + [super afterAll]; // at the end of tests, go back to chat rooms to display main bar if ([tester tryFindingTappableViewWithAccessibilityLabel:@"Back" error:nil]) { [self goBackFromChat]; diff --git a/KifTests/ContactsTester.m b/KifTests/ContactsTester.m index 763e194c5..4a8db1672 100644 --- a/KifTests/ContactsTester.m +++ b/KifTests/ContactsTester.m @@ -15,7 +15,8 @@ #pragma mark - Setup - (void)beforeAll { - [tester tapViewWithAccessibilityLabel:@"Contacts"]; + [super beforeAll]; + [tester tapViewWithAccessibilityLabel:@"Contacts"]; } #pragma mark - Utils diff --git a/KifTests/LinphoneTestCase.m b/KifTests/LinphoneTestCase.m index 154a07e56..5262de02b 100644 --- a/KifTests/LinphoneTestCase.m +++ b/KifTests/LinphoneTestCase.m @@ -48,7 +48,8 @@ - (void)beforeAll{ #if TARGET_IPHONE_SIMULATOR - [tester acknowledgeSystemAlert]; + [tester acknowledgeSystemAlert]; // Contact access alert + [tester acknowledgeSystemAlert]; // Local notification / badge alert #endif [super beforeAll]; } diff --git a/KifTests/WizardTester.m b/KifTests/WizardTester.m index bd0f11947..0fdbb7f40 100644 --- a/KifTests/WizardTester.m +++ b/KifTests/WizardTester.m @@ -13,19 +13,21 @@ @implementation WizardTester - (void)beforeEach { - [UIView setAnimationsEnabled:false]; - - [tester tapViewWithAccessibilityLabel:@"Settings"]; - [tester tapViewWithAccessibilityLabel:@"Run assistant"]; - [tester waitForTimeInterval:0.5]; - if( [tester tryFindingViewWithAccessibilityLabel:@"Launch Wizard" error:nil]){ - [tester tapViewWithAccessibilityLabel:@"Launch Wizard"]; - [tester waitForTimeInterval:0.5]; - } + [super beforeEach]; + [UIView setAnimationsEnabled:false]; + + [tester tapViewWithAccessibilityLabel:@"Settings"]; + [tester tapViewWithAccessibilityLabel:@"Run assistant"]; + [tester waitForTimeInterval:0.5]; + if ([tester tryFindingViewWithAccessibilityLabel:@"Launch Wizard" error:nil]) { + [tester tapViewWithAccessibilityLabel:@"Launch Wizard"]; + [tester waitForTimeInterval:0.5]; + } } - (void)afterEach{ - [tester tapViewWithAccessibilityLabel:@"Dialer"]; + [super afterEach]; + [tester tapViewWithAccessibilityLabel:@"Dialer"]; } #pragma mark - State @@ -68,10 +70,6 @@ #pragma mark - Tests -- (void)testExternalLoginWithUDP { - [self _externalLoginWithProtocol:@"UDP"]; -} - - (void)testExternalLoginWithTCP { [self _externalLoginWithProtocol:@"TCP"]; } @@ -80,6 +78,10 @@ [self _externalLoginWithProtocol:@"TLS"]; } +- (void)testExternalLoginWithUDP { + [self _externalLoginWithProtocol:@"UDP"]; +} + - (void)testLinphoneLogin { [self _linphoneLogin:[self me] withPW:@"testtest"]; diff --git a/Resources/linphonerc b/Resources/linphonerc index b773a7c27..f48bdc634 100644 --- a/Resources/linphonerc +++ b/Resources/linphonerc @@ -7,7 +7,6 @@ edge_bw=10 [sip] contact="Linphone iPhone" keepalive_period=30000 -default_proxy=0 sip_port=-1 sip_tcp_port=-1 use_ipv6=0 diff --git a/Resources/linphonerc~ipad b/Resources/linphonerc~ipad index d2e96d5c1..db3e3c011 100644 --- a/Resources/linphonerc~ipad +++ b/Resources/linphonerc~ipad @@ -7,7 +7,6 @@ edge_bw=10 [sip] contact="Linphone iPhone" keepalive_period=30000 -default_proxy=0 sip_port=-1 sip_tcp_port=-1 use_ipv6=0