我已将Apple的崩溃报告标记出来,我可以看到我的Google Map SDK导致我的应用崩溃...
这是我的代码
Contact.h:
@interface Contact : UIViewController <MFMailComposeViewControllerDelegate>
- (IBAction)openMail:(id)sender;
@property (weak, nonatomic) IBOutlet GMSMapView *mapView;
@property (weak, nonatomic) IBOutlet UILabel *contactLabel;
@end
Contact.m:
- (void)viewDidLoad {
[super viewDidLoad];
#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;
}
这一行崩溃:[self.mapView animateToCameraPosition:camera];
我不知道为什么...... 谢谢你的帮助,干杯!
以下是完整的崩溃报告:
Incident Identifier: 53F96E73-C7EC-4B25-9EA2-B7EE6BBA0989
CrashReporter Key: 45e776ed0586d581aba248bf3f23eaf42a231f2c
Hardware Model: xxx
Process: BundoranSurfCo [15440]
Path: /private/var/mobile/Containers/Bundle/Application/4E406D15-DDA0-40B8-9534-E5BCEF566CCC/BundoranSurfCo.app/BundoranSurfCo
Identifier: JardelCompany.BundoranSurfCo
Version: 1.4.1 (1.4)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-05-08 07:15:26.309 -0700
Launch Time: 2015-05-08 07:15:17.772 -0700
OS Version: iOS 8.3 (12F69)
Report Version: 105
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 0x10003d260 -[Contact viewDidLoad] (Contact.m:24)
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 0x100043574 main (main.m:14)
27 libdyld.dylib 0x19411aa08 0x194118000 + 10760
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000194233270 0x194218000 + 111216
1 libsystem_pthread.dylib 0x00000001942d116c 0x1942cc000 + 20844
2 libsystem_c.dylib 0x00000001941aab14 0x194148000 + 404244
3 libc++abi.dylib 0x0000000193269414 0x193268000 + 5140
4 libc++abi.dylib 0x0000000193288b88 0x193268000 + 134024
5 libobjc.A.dylib 0x0000000193a9c3bc 0x193a94000 + 33724
6 libc++abi.dylib 0x0000000193285bb0 0x193268000 + 121776
7 libc++abi.dylib 0x0000000193285738 0x193268000 + 120632
8 libobjc.A.dylib 0x0000000193a9c290 0x193a94000 + 33424
9 CoreFoundation 0x000000018225d380 0x182254000 + 37760
10 GraphicsServices 0x000000018b94b6f8 0x18b940000 + 46840
11 UIKit 0x0000000186e22fa8 0x186dac000 + 487336
12 BundoranSurfCo 0x0000000100043570 main (main.m:14)
13 libdyld.dylib 0x000000019411aa04 0x194118000 + 10756
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x0000000194218c24 0x194218000 + 3108
1 libdispatch.dylib 0x00000001940fde6c 0x1940ec000 + 73324
2 libdispatch.dylib 0x00000001940ef998 0x1940ec000 + 14744
Thread 2:
0 libsystem_kernel.dylib 0x0000000194233c78 0x194218000 + 113784
1 libsystem_pthread.dylib 0x00000001942cd2d8 0x1942cc000 + 4824
2 libsystem_pthread.dylib 0x00000001942cceec 0x1942cc000 + 3820
Thread 3:
0 libsystem_kernel.dylib 0x0000000194233c78 0x194218000 + 113784
1 libsystem_pthread.dylib 0x00000001942cd2d8 0x1942cc000 + 4824
2 libsystem_pthread.dylib 0x00000001942cceec 0x1942cc000 + 3820
Thread 4:
0 libsystem_kernel.dylib 0x0000000194233c78 0x194218000 + 113784
1 libsystem_pthread.dylib 0x00000001942cd2d8 0x1942cc000 + 4824
2 libsystem_pthread.dylib 0x00000001942cceec 0x1942cc000 + 3820
Thread 5:
0 libsystem_kernel.dylib 0x0000000194233c78 0x194218000 + 113784
1 libsystem_pthread.dylib 0x00000001942cd2d8 0x1942cc000 + 4824
2 libsystem_pthread.dylib 0x00000001942cceec 0x1942cc000 + 3820
Thread 6:
0 libsystem_kernel.dylib 0x0000000194218e0c 0x194218000 + 3596
1 libsystem_kernel.dylib 0x0000000194218c84 0x194218000 + 3204
2 CoreFoundation 0x0000000182333720 0x182254000 + 915232
3 CoreFoundation 0x0000000182331674 0x182254000 + 906868
4 CoreFoundation 0x000000018225d2d0 0x182254000 + 37584
5 CoreFoundation 0x00000001822af358 0x182254000 + 373592
6 CoreMotion 0x0000000182c68364 0x182c20000 + 295780
7 libsystem_pthread.dylib 0x00000001942cfdc4 0x1942cc000 + 15812
8 libsystem_pthread.dylib 0x00000001942cfd20 0x1942cc000 + 15648
9 libsystem_pthread.dylib 0x00000001942ccef4 0x1942cc000 + 3828
Thread 7 name: com.apple.NSURLConnectionLoader
Thread 7:
0 libsystem_kernel.dylib 0x0000000194218e0c 0x194218000 + 3596
1 libsystem_kernel.dylib 0x0000000194218c84 0x194218000 + 3204
2 CoreFoundation 0x0000000182333720 0x182254000 + 915232
3 CoreFoundation 0x0000000182331674 0x182254000 + 906868
4 CoreFoundation 0x000000018225d2d0 0x182254000 + 37584
5 CFNetwork 0x0000000181d3e890 0x181ca0000 + 649360
6 Foundation 0x000000018327ddb4 0x183188000 + 1007028
7 libsystem_pthread.dylib 0x00000001942cfdc4 0x1942cc000 + 15812
8 libsystem_pthread.dylib 0x00000001942cfd20 0x1942cc000 + 15648
9 libsystem_pthread.dylib 0x00000001942ccef4 0x1942cc000 + 3828
Thread 8:
0 libsystem_kernel.dylib 0x0000000194233c78 0x194218000 + 113784
1 libsystem_pthread.dylib 0x00000001942cd2d8 0x1942cc000 + 4824
2 libsystem_pthread.dylib 0x00000001942cceec 0x1942cc000 + 3820
Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x0000000194233498 0x194218000 + 111768
1 CoreFoundation 0x0000000182339124 0x182254000 + 938276
2 libsystem_pthread.dylib 0x00000001942cfdc4 0x1942cc000 + 15812
3 libsystem_pthread.dylib 0x00000001942cfd20 0x1942cc000 + 15648
4 libsystem_pthread.dylib 0x00000001942ccef4 0x1942cc000 + 3828
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000001740fea37
x4: 0x0000000193289dfd x5: 0x000000016fdd33f0 x6: 0x000000000000006e x7: 0x0000000000000fa0
x8: 0x0000000008000000 x9: 0x0000000004000000 x10: 0x0000000000000200 x11: 0x0000000000000000
x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000002 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 .........
答案 0 :(得分:0)
我想我应该关注此网址:GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance
但是我已经为这个项目做了这个&amp;目标设定,你认为它会没事: