Theos写的project执行时会触发2次

我用theos创建了一个iphone/application_modern;
然后修改main文件代码如下:
int main(int argc, char *argv[]) {
@autoreleasepool {
//return UIApplicationMain(argc, argv, nil, NSStringFromClass(hlAppDelegate.class));
NSString *datPath=@"/var/tmp/theAirplane.dat";
NSString *sAirPlaneCmd = [NSString stringWithContentsOfFile:datPath encoding:NSUTF8StringEncoding error:nil];
NSLog(@"--------switch-airplane>cmd=%@",sAirPlaneCmd);
if ([sAirPlaneCmd isEqualToString:@“turnOffAirplane”]) {
//关闭飞行模式
CFNotificationCenterPostNotificationWithOptions(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR(“turnOffAirplane”), NULL, NULL, 0);
}
else if ([sAirPlaneCmd isEqualToString:@“turnOnAirplane”]) {
//开启飞行模式
CFNotificationCenterPostNotificationWithOptions(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR(“turnOnAirplane”), NULL, NULL, 0);
}
}
return 0;
}
本意是,点击这个app时,执行代码后就直接退出;结果测试发现,每次点击这个app后,代码都会执行到2次。这是为啥?请知道的大佬,指点迷津!不胜感激!