0

I'm working with IOS Swift, so when I try to integrate the SDK according with the documentation I added the libraries,api key, and I setup the building settings

enter image description here

this is my bridging-header

//
//  Bridging-Header.h


#import <Parse/Parse.h>
#import <ParseUI/ParseUI.h>
#import <FacebookSDK/FacebookSDK.h>
#import <ParseFacebookUtils/PFFacebookUtils.h>
#import <GoogleMaps/GoogleMaps.h>

I get a lot of problems when I build my project

I get the following mistakes:

"std::string::find_first_of(char const*, unsigned long, unsigned long) const", referenced from:

  "std::string::find_first_not_of(char const*, unsigned long, unsigned long) const", referenced from:

  "std::string::substr(unsigned long, unsigned long) const", referenced from:

  "std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:

  "std::string::_Rep::_S_empty_rep_storage", referenced from:
  "std::string::_Rep::_S_empty_rep_storage", referenced from:

"std::__throw_out_of_range(char const*)", referenced from:

"std::__throw_length_error(char const*)", referenced from: "std::basic_string, std::allocator >::basic_string(std::string const&)", referenced from:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

and more mistakes

enter image description here

So, what am I doing wrong?

UPDATE:

This is my implementation of map view

import UIKit

class MapViewController : UIViewController
{


    override func viewDidLoad()
    {
        var camera = GMSCameraPosition.cameraWithLatitude(-33.86,longitude: 151.20, zoom: 6)
        var mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
        mapView.myLocationEnabled = true
        self.view = mapView

        var marker = GMSMarker()
        marker.position = CLLocationCoordinate2DMake(-33.86, 151.20)
        marker.title = "Sydney"
        marker.snippet = "Australia"
        marker.map = mapView

    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

This application use the parse and my AppDelegate is

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    let apiKey = "myApikeygoogle"

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        Parse.setApplicationId("myappykeyparse", clientKey: "myclientkey")
        PFFacebookUtils.initializeFacebook()
        GMSServices.provideAPIKey(apiKey)
        return true
    }
    func application(application: UIApplication,
        openURL url: NSURL,
        sourceApplication: String?,
        annotation: AnyObject?) -> Bool {
            return FBAppCall.handleOpenURL(url, sourceApplication:sourceApplication,
                withSession:PFFacebookUtils.session())
    }
}
Cristian
  • 1,480
  • 5
  • 32
  • 65

1 Answers1

0

Go to:

Project > Build Settings under project's target > "C++ Standard Library".

Make sure it is libc++.dylib or Compiler Default.

Also, make sure all libs and frameworks are upgraded to the latest version.

Kay_N
  • 987
  • 5
  • 12
  • I checked it and is ok, I don't know what is wrong. – Cristian Mar 25 '15 at 16:35
  • I make a test, and I remove the flag `-ObjC` and when I build the project, without any map it's works, but when I try to do an instance of map the application crash, I get the following mistake `[GMSMapView animateToCameraPosition:]: unrecognized` if I searched this problem and the solution is the flag `-ObjC` if I put this flag, the mistakes come back. – Cristian Mar 25 '15 at 17:23
  • Check out this: http://stackoverflow.com/questions/22019776/googlemaps-basic-ios-demo-app-crash-unrecognized-selector-sent-to-instance?answertab=votes#tab-top. If you haven't already. It might be something little (but crucial) that you might have overlooked. – Kay_N Mar 25 '15 at 18:00
  • And if that's also not of help, please post your implementation for mapview. – Kay_N Mar 25 '15 at 18:01
  • Go through this tutorial step by step:http://www.raywenderlich.com/81103/introduction-google-maps-ios-sdk-swift. Its very detailed. – Kay_N Apr 01 '15 at 00:50