Thanks for reading. I solved the problem. The reason was the following:
In the info.plist file I altered the row "Localization native development region" to "Germany". After that the app no longer ran on the iphone but in the simulator. After resetting it to "en" it worked again on the iphone device.
Does anybody have an idea why it does not run on the iphone for this particular case?
I have a really really strange problem. I can run my iPhone app in the simulator but not on my iphone device. If I run it on my device it cashes on the following line
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); <-- crashes here
}
}
In my AppDelegate.m file I put a NSLog in each method:
#import "AppDelegate.h"
#import <CoreLocation/CoreLocation.h>
@implementation AppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"didFinishLaunchingWithOptions");
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
NSLog(@"applicationWillResignActive");
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
NSLog(@"applicationDidEnterBackground");
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"applicationWillEnterForeground");
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"applicationDidBecomeActive");
if( ![[Logic si] network_is_available] ) {
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AlertView_error_title", @"") message:NSLocalizedString(@"No_Internet_connection_available",@"") delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil] show];
}
if( ![CLLocationManager locationServicesEnabled] ) {
NSLog(@"not locationServicesEnabled");
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AlertView_error_title", @"") message:NSLocalizedString(@"No_location_management_available",@"") delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil] show];
} else {
NSLog(@"locationServicesEnabled");
}
}
- (void)applicationWillTerminate:(UIApplication *)application
{
NSLog(@"applicationWillTerminate");
}
@end
Nothing is printed to the console if I run the app it immediatly crashes. Other apps I programmed work fine when started from within xcode on the iphone.
I know this could be everything, but do you have any ideas what might cause this problem?