main.m 1.24 KB
Newer Older
DanmeiChen's avatar
DanmeiChen committed
1 2
/*
 * Copyright (c) 2010-2019 Belledonne Communications SARL.
jehan's avatar
jehan committed
3
 *
DanmeiChen's avatar
DanmeiChen committed
4
 * This file is part of linphone-iphone
jehan's avatar
jehan committed
5
 *
DanmeiChen's avatar
DanmeiChen committed
6 7 8 9
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
10
 *
DanmeiChen's avatar
DanmeiChen committed
11 12 13 14
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
15
 *
DanmeiChen's avatar
DanmeiChen committed
16 17
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
 */
jehan's avatar
jehan committed
19 20

#import <UIKit/UIKit.h>
21
#import "LinphoneAppDelegate.h"
jehan's avatar
jehan committed
22

23 24 25 26
#ifdef DEBUG

// Dump exception
void uncaughtExceptionHandler(NSException *exception) {
27 28
	NSLog(@"Crash: %@", exception);
	NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
Gautier Pelloux-Prayer's avatar
Gautier Pelloux-Prayer committed
29
	// Internal error reporting
Gautier Pelloux-Prayer's avatar
Gautier Pelloux-Prayer committed
30
};
31 32 33

#endif

jehan's avatar
jehan committed
34
int main(int argc, char *argv[]) {
35
#ifdef DEBUG
36
	NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
37
#endif
38
	@autoreleasepool {
39 40
		return UIApplicationMain(argc, argv, nil, NSStringFromClass([LinphoneAppDelegate class]));
	}
jehan's avatar
jehan committed
41
}