gpt4 book ai didi

ios - 无法解决崩溃 EXC_CRASH (SIGABRT)

转载 作者:行者123 更新时间:2023-11-29 12:23:15 35 4
gpt4 key购买 nike

我两次为 iTunesConnect 发布我的应用程序,两次因为崩溃而被拒绝。

当用户点击 iPhone/iPad iOS 8.2 上的“联系人”选项卡时会发生这种情况,但我在模拟器或真实设备上对其进行了测试,但我不会出现此崩溃...

你能告诉我一些关于那个的事吗?

这是 崩溃日志 象征:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0

Last Exception Backtrace:
0 CoreFoundation 0x18237c2d8 0x182254000 + 1213144
1 libobjc.A.dylib 0x193a9c0e4 0x193a94000 + 32996
2 CoreFoundation 0x1823833a4 0x182254000 + 1242020
3 CoreFoundation 0x182380154 0x182254000 + 1229140
4 CoreFoundation 0x182282ccc 0x182254000 + 191692
5 BundoranSurfCo 0x1000190a4 -[Contact viewDidLoad] (Contact.m:20)
6 UIKit 0x186dbcc84 0x186dac000 + 68740
7 UIKit 0x186dbc994 0x186dac000 + 67988
8 UIKit 0x186ef2e68 0x186dac000 + 1338984
9 UIKit 0x186ef2b58 0x186dac000 + 1338200
10 UIKit 0x186fba378 0x186dac000 + 2155384
11 UIKit 0x186df1404 0x186dac000 + 283652
12 UIKit 0x186fba1cc 0x186dac000 + 2154956
13 UIKit 0x186df1404 0x186dac000 + 283652
14 UIKit 0x186dda4e0 0x186dac000 + 189664
15 UIKit 0x186fb9e04 0x186dac000 + 2153988
16 UIKit 0x186df1404 0x186dac000 + 283652
17 UIKit 0x186dda4e0 0x186dac000 + 189664
18 UIKit 0x186df0da0 0x186dac000 + 282016
19 UIKit 0x186daffc0 0x186dac000 + 16320
20 CoreFoundation 0x1823342a4 0x182254000 + 918180
21 CoreFoundation 0x182331230 0x182254000 + 905776
22 CoreFoundation 0x182331610 0x182254000 + 906768
23 CoreFoundation 0x18225d2d4 0x182254000 + 37588
24 GraphicsServices 0x18b94b6fc 0x18b940000 + 46844
25 UIKit 0x186e22fac 0x186dac000 + 487340
26 BundoranSurfCo 0x10001f4c4 main (main.m:14)
27 libdyld.dylib 0x19411aa08 0x194118000 + 10760

这里是我的 Contact.m 代码:

第 20 行是:self.fbLikeButton.likeControlStyle = FBLikeControlStyleBoxCount;

#import "Contact.h"


@interface Contact ()

@end

@implementation Contact

- (void)viewDidLoad {
[super viewDidLoad];
self.fbLikeButton.likeControlStyle = FBLikeControlStyleBoxCount;
self.fbLikeButton.objectID=@"https://www.facebook.com/BundoranSurfco/";

#pragma mark - Google Map API
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude: 54.481151
longitude: -8.272278 zoom: 15];
[self.mapView animateToCameraPosition:camera];
GMSMarker *marker = [ [GMSMarker alloc] init];
marker.position = camera.target;
marker.title = @"Bundoran Surf Co";
marker.snippet = @"Main Street";
marker.map = self.mapView;
}

- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated] ;
self.mapView = nil ;
}

- (IBAction)openMail:(id)sender
{
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"Contact by BundoranSurfCo App"];
NSArray *toRecipients = [NSArray arrayWithObjects:@"info@bundoransurfco.com", nil];
[mailer setToRecipients:toRecipients];
UIImage *myImage = [UIImage imageNamed:@"logo.png"];
NSData *imageData = UIImagePNGRepresentation(myImage);
[mailer addAttachmentData:imageData mimeType:@"image/png" fileName:@"logo"];
NSString *emailBody = @"";
[mailer setMessageBody:emailBody isHTML:NO];
[self presentViewController:mailer animated:YES completion:nil];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failure"
message:@"Your device doesn't support the composer sheet"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
}
}

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
switch (result)
{
case MFMailComposeResultCancelled:
break;
case MFMailComposeResultSaved:
break;
case MFMailComposeResultSent:
break;
case MFMailComposeResultFailed:
break;
default:
break;
}

// Remove the mail view
[self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)phoneButton:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:071-9841968"]];
}


- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}


@end

最佳答案

崩溃报告说问题出在第 20 行 (fbLikeButton),我现在知道原因了:

« FBLikeControl 是一个预览功能,可能不会部署到 App Store。只有您的 Facebook 应用程序的开发人员和测试人员才能使用“赞”按钮。 »

因此应用程序崩溃并被 Apple 拒绝。

关于ios - 无法解决崩溃 EXC_CRASH (SIGABRT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29971108/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com