【问题标题】:Google Maps SDK crash on ItunesConnect test not Xcode谷歌地图 SDK 在 ItunesConnect 测试而不是 Xcode 上崩溃
【发布时间】:2015-05-29 07:38:24
【问题描述】:

Google Maps SDK 使我的应用程序崩溃,我不知道我做错了什么... 我将我的 GMSMapView 放在界面构建器中的 UIView 中。

这是我的代码: 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;
}

我象征着 Apple 的应用程序崩溃,当视图出现时,该行就崩溃了:

[self.mapView animateToCameraPosition:camera];

这是我的配置

【问题讨论】:

    标签: ios objective-c google-maps uiview gmsmapview


    【解决方案1】:

    您的 Release 构建链接器标志中缺少“-ObjC”标志,因此提交到 App Store 的内容并不能完全反映您正在调试的内容。

    如果您编辑运行方案,您应该能够选择Release Build Configuration 并重现此

    从这里:GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-01
    • 1970-01-01
    • 2017-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多