0

[EDIT] Possible fix: my ipa was unsigned, I bought a Developer's account and will test tomorrow with a signed .ipa. [/EDIT] This is my second app. It's very simple, all it does is send a post request to my server, and display a response. It works perfectly on the iOS simulator on Xcode, but when I push the ipa to my phone, it just crashes. A friend of mine also tested it, and the same happened. Can you please take a look at the code? It's not that long: https://drive.google.com/file/d/0ByoF_XNJWlVyeHJHdHp3LVdTS3c/view?usp=sharing Here's the ipa: https://drive.google.com/file/d/0ByoF_XNJWlVyeGJrNldMb1BPMVE/view

I also can't/don't know how to get a crash report for the app on my phone, so if you need that I'd need help on how to get it too.

Thanks in advance!

4 Answers4

1

enter image description hereIt would be helpful if you could paste the crash report, you can connect your device and debug it for the same.

Possibility is : You might have built your app using iOS SDK 8.0 or above and trying to run it on a lower version. Also, to make it compatible with your device you need to avoid using methods that are introduced in iOS8.

KP_G
  • 460
  • 4
  • 15
  • Thanks for the suggestion. I wrote the app using XCode 5.1, the deployment target is 7.1, and the base SDK is also 7.1. I'm testing it on iPhone 6+ 8.1.1. On my phone, under Settings - Privacy - Diagnostics & Usage - Data - I can't find a crash report for the RealCode app... – Francisco Javier Herrera Apr 09 '15 at 05:08
  • I just downloaded your app and installed it on my device. You need to change the Code Signing from Developer to Distribution. Just check it for your Target in Build Settings --> Code Signing. Check the screenshot in the updated answer – KP_G Apr 09 '15 at 05:23
  • I'm afraid I still don't have a Developer account, therefore I can't sign the app :/ But I guess that's the problem, then. Is it too much to ask if you could upload the signed .ipa for me to test? – Francisco Javier Herrera Apr 09 '15 at 06:24
  • I would have done that if I had my own account :). But Since I am using my organization's Dev Account, I am not authorized to do so. At least you know the solution now :) – KP_G Apr 09 '15 at 06:38
  • Follow These steps to create an ipa. (http://stackoverflow.com/questions/26928721/how-to-create-ipa-in-xcode-6-without-apple-developer-account) and den upload it to (http://www.diawi.com/#), you will get a link. open that link in ur device's browser. – KP_G Apr 09 '15 at 06:51
  • Yes, I've just bought my account, it should be live tomorrow. I'll check if everything works once it's signed, and update this post with an answer. Thanks once again! – Francisco Javier Herrera Apr 09 '15 at 06:52
  • Yes, I thought I've added the solution... My bad. Buying the account fixed it. Thanks! – Francisco Javier Herrera Apr 16 '15 at 06:22
0

Add this before you make post request to check if the internet is connected or not ..

NSURL *scriptUrl = [NSURL URLWithString:@"http://www.google.com"];
NSData *data = [NSData dataWithContentsOfURL:scriptUrl];
if (data){
    [self yourPostMethod];
}

else{
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Network not Reachable" message:@"Please check your internet connection!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];

        [alert show];
}
Devang Goswami
  • 284
  • 3
  • 23
0

As you have mentioned you have developed app using Xcode 5.1 and deployment target to 7.1 .
If you want to make sure it should work onlatest versions, you need to update your xcode and set base sdk to latest and deployment target you can set 7.0

sambhav
  • 39
  • 4
0

Buying a Developer Account fixed my problem.