Google Maps SDK crash on ItunesConnect test not Xcode

旧巷老猫 提交于 2019-12-12 01:16:51

问题


Google Maps SDK makes my app crash, I don't know what I'm doing wrong... I put my GMSMapView in a UIView in interface builder.

Here is my code : Contact.h :

#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import <ParseFacebookUtils/PFFacebookUtils.h>
#import <GoogleMaps/GoogleMaps.h>

@interface Contact : UIViewController <MFMailComposeViewControllerDelegate>

- (IBAction)openMail:(id)sender;
@property (weak, nonatomic) IBOutlet GMSMapView *mapView;
@property (weak, nonatomic) IBOutlet UILabel *contactLabel;


@end

Contact.m :

#import "Contact.h"


@interface Contact ()

@end

@implementation Contact

- (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;
}

I symbolicated the app crash from Apple, and that crash on this line when the view appears :

[self.mapView animateToCameraPosition:camera];

Here is my config


回答1:


You are missing the "-ObjC" flag from your Release build linker flags so what gets submitted to the App Store does not quite reflect what you're debugging.

If you edit the Run scheme, you should be able to select Release Build Configuration and reproduce this

From here: GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance



来源:https://stackoverflow.com/questions/30523844/google-maps-sdk-crash-on-itunesconnect-test-not-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!