Commit e91af289 authored by jehan's avatar jehan

put some nice error messages

parent 30280055
......@@ -324,18 +324,29 @@
}
case GSTATE_CALL_ERROR: {
/*
NSString* lTitle= state->message!=nil?[NSString stringWithCString:state->message length:strlen(state->message)]: @"Error";
NSString* lMessage=lTitle;
*/
NSString* lMessage;
NSString* lTitle;
const char *errormsg=state->message;
lMessage=@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.";
if (errormsg!=nil){
lMessage=[NSString stringWithFormat : @"%@\nReason was: %s",lMessage, errormsg];
}
lTitle=@"Call failed";
UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle
message:lMessage
delegate:nil
cancelButtonTitle:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[error show];
[self performSelector:@selector(dismissAlertDialog:) withObject:error afterDelay:1];
[self performSelector:@selector(dismissIncallView) withObject:nil afterDelay:1];
//[self performSelector:@selector(dismissAlertDialog:) withObject:error afterDelay:2];
//[self performSelector:@selector(dismissIncallView) withObject:nil afterDelay:2];
}
break;
......
......@@ -36,7 +36,7 @@
@class PhoneViewController;
@class CallHistoryTableViewController;
@interface linphoneAppDelegate : NSObject <UIApplicationDelegate,LinphoneTabManagerDelegate,UIActionSheetDelegate> {
@interface linphoneAppDelegate : NSObject <UIApplicationDelegate,LinphoneTabManagerDelegate,UIActionSheetDelegate,UIAlertViewDelegate> {
UIWindow *window;
IBOutlet UITabBarController* myTabBarController;
IBOutlet ABPeoplePickerNavigationController* myPeoplePickerController;
......
......@@ -238,8 +238,9 @@ LinphoneCoreVTable linphonec_vtable = {
NSString* username = [[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"];
NSString* domain = [[NSUserDefaults standardUserDefaults] stringForKey:@"domain_preference"];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
//clear auth info list
bool configCheckDisable = [[NSUserDefaults standardUserDefaults] boolForKey:@"check_config_disable_preference"];
//clear auth info list
linphone_core_clear_all_auth_info(myLinphoneCore);
//clear existing proxy config
linphone_core_clear_proxy_config(myLinphoneCore);
......@@ -293,7 +294,14 @@ LinphoneCoreVTable linphonec_vtable = {
bool result=SCNetworkReachabilitySetCallback(proxyReachability, (SCNetworkReachabilityCallBack)networkReachabilityCallBack,&proxyReachabilityContext);
SCNetworkReachabilityScheduleWithRunLoop(proxyReachability, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
[self doRegister];
}
} else if (configCheckDisable == false) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Warning"
message:@"It seems you have not configured any proxy server from settings"
delegate:self
cancelButtonTitle:@"Continue"
otherButtonTitles:@"Never remind",nil];
[error show];
}
//Configure Codecs
PayloadType *pt;
......@@ -352,6 +360,13 @@ LinphoneCoreVTable linphonec_vtable = {
repeats:YES];
}
// no proxy configured alert
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"check_config_disable_preference"];
}
}
-(void) newIncomingCall:(NSString*) from {
//redirect audio to speaker
......
......@@ -51,8 +51,8 @@
<object class="IBUIViewController" key="IBUISelectedViewController" id="156830991">
<string key="IBUITitle">History</string>
<object class="IBUITabBarItem" key="IBUITabBarItem" id="1041279701">
<string key="IBUITitle">History</string>
<reference key="IBUITabBar"/>
<int key="IBUISystemItemIdentifier">6</int>
</object>
<reference key="IBUIParentViewController" ref="952473143"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
......
......@@ -7,11 +7,11 @@
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<string>Linphone</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>linphone2-57x57.png</string>
<string>icone-linphone-57.png</string>
<key>CFBundleIdentifier</key>
<string>org.linphone.phone</string>
<key>CFBundleInfoDictionaryVersion</key>
......
......@@ -11,6 +11,7 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
22058C71116E305000B08DDD /* icone-linphone-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 22058C70116E305000B08DDD /* icone-linphone-57.png */; };
220FAD3110765B400068D98F /* libeXosip2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2810765B400068D98F /* libeXosip2.a */; };
220FAD3210765B400068D98F /* libgsm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2910765B400068D98F /* libgsm.a */; };
220FAD3310765B400068D98F /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2A10765B400068D98F /* liblinphone.a */; };
......@@ -30,7 +31,6 @@
2245671D107699F700F10948 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2245671C107699F700F10948 /* Settings.bundle */; };
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; };
225862E21140F5D700C5A737 /* linphone-3-250x130.png in Resources */ = {isa = PBXBuildFile; fileRef = 225862E11140F5D700C5A737 /* linphone-3-250x130.png */; };
225862F21140FC4F00C5A737 /* linphone2-57x57.png in Resources */ = {isa = PBXBuildFile; fileRef = 225862F11140FC4F00C5A737 /* linphone2-57x57.png */; };
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; };
2273785E10A3703300526073 /* libmsiounit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2273785D10A3703300526073 /* libmsiounit.a */; };
2274401A106F31BD006EC466 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22744019106F31BD006EC466 /* CoreAudio.framework */; };
......@@ -62,6 +62,7 @@
1D3623250D0F684500981E51 /* linphoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = linphoneAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* linphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = linphone.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
22058C70116E305000B08DDD /* icone-linphone-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icone-linphone-57.png"; path = "Resources/icone-linphone-57.png"; sourceTree = "<group>"; };
220FAC79107654FC0068D98F /* eX_call.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_call.h; sourceTree = "<group>"; };
220FAC7A107654FC0068D98F /* eX_message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_message.h; sourceTree = "<group>"; };
220FAC7B107654FC0068D98F /* eX_options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eX_options.h; sourceTree = "<group>"; };
......@@ -189,7 +190,6 @@
2245671C107699F700F10948 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
225862E11140F5D700C5A737 /* linphone-3-250x130.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "linphone-3-250x130.png"; path = "../liblinphone-sdk/apple-darwin/share/pixmaps/linphone/linphone-3-250x130.png"; sourceTree = SOURCE_ROOT; };
225862F11140FC4F00C5A737 /* linphone2-57x57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "linphone2-57x57.png"; path = "../liblinphone-sdk/apple-darwin/share/pixmaps/linphone/linphone2-57x57.png"; sourceTree = SOURCE_ROOT; };
2258633C11410BAC00C5A737 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
2273785D10A3703300526073 /* libmsiounit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsiounit.a; path = "../liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsiounit.a"; sourceTree = SOURCE_ROOT; };
......@@ -522,8 +522,8 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
22058C70116E305000B08DDD /* icone-linphone-57.png */,
2237D4081084D7A9001383EE /* oldphone-mono.wav */,
225862F11140FC4F00C5A737 /* linphone2-57x57.png */,
225862E11140F5D700C5A737 /* linphone-3-250x130.png */,
22E0A783111C1BA800B04932 /* Speaker-32-on.png */,
22E0A784111C1BA800B04932 /* Speaker-32-off.png */,
......@@ -612,7 +612,7 @@
22E0A821111C44E100B04932 /* MoreViewController.xib in Resources */,
22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */,
225862E21140F5D700C5A737 /* linphone-3-250x130.png in Resources */,
225862F21140FC4F00C5A737 /* linphone2-57x57.png in Resources */,
22058C71116E305000B08DDD /* icone-linphone-57.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -641,6 +641,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
......@@ -650,6 +651,7 @@
INFOPLIST_FILE = "linphone-Info.plist";
LIBRARY_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/lib/**";
PRODUCT_NAME = linphone;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos3.0;
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment