GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance
I think you may have forgotten to make the class a GMSMapView delegate. The GMSMapViewDelegate bit after the () needs to be between <>
I don't assign that delegate as well as Googles Base Code does not assign it.
I have fortunetly managed to get it working. The google documentation on Google Maps states what follows:
Choose your project, rather than a specific target, and open the Build Settings tab.
In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.
But their example project, after my examination, has the flag set on target. Setting it on the build target within my project in my case helped and my posted code works fine.
Error after submitting app to store -[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance
With the Google maps SDK, 'unrecognized selector' often occurs if you haven't included the -ObjC
linker flag.
Could it be that you've included -ObjC
in the debug build settings (which you might be using when running it from XCode), but it's missing in the release build settings (which it would use when you build to submit to the App Store)?
-[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance
Please mention which version of iOS you are using and did you setted delegate method for MAPview.
Please check the below link, may be helps you, all the best
GoogleMaps basic iOS demo app crash - unrecognized selector sent to instance
iOS GoogleMaps SDK error: [__NSCFDictionary objectForKeyedSubscript:]: Unrecognized selector sent
You may want to look into this question: objectForKeyedSubscript: crash on iOS 5.1
By the way, what's the version of Xcode you are using? What's the iOS SDK version you are using?
Developing an application with the Google Maps SDK for iOS requires the following:
- Xcode 4.5 or later.
- iOS SDK 6.0 or later.
Applications that use the Google Maps SDK for iOS will work on iOS 5.1 and above.
https://developers.google.com/maps/documentation/ios/intro
Unrecognized selector sent to instance inside UITableView
if you using like didSelectUserLabel
let userLabelRecognizer = UITapGestureRecognizer(target: self, action: "didSelectUserLabel")
you need to implement like
func didSelectUserLabel()
{
}
if you using like didSelectUserLabel:
let userLabelRecognizer = UITapGestureRecognizer(target: self, action: "didSelectUserLabel:")
you need to implement like
func didSelectUserLabel(recognizer: UITapGestureRecognizer) {
if recognizer.state == UIGestureRecognizerState.Ended {
let swipeLocation = recognizer.locationInView(self.tableView)
if let swipedIndexPath = tableView.indexPathForRowAtPoint(swipeLocation) {
if let swipedCell = self.tableView.cellForRowAtIndexPath(swipedIndexPath) {
// Swipe happened. Do stuff!
}
}
}
}
}
Related Topics
Writing an iOS 8 Share Extension Without a Storyboard
Catch an Exception for Invalid User Input in Swift
Using Core Data, Icloud and Cloudkit for Syncing and Backup and How It Works Together
Open Link to Facebook Page from iOS App
Coredata Get Distinct Values of Attribute
Swift: How to Refresh Uicollectionview Layout After Rotation of the Device
Attempting to Load the View of a View Controller While It Is Deallocating... Uisearchcontroller
Rotate a Uiview Around Its Center But Several Times
Html5 Video Autoplay on Iphone
Dial Ussd Code from iPhone Programmatically
Uiview Vertical Flip Animation
When Do I Need to Call Setneedsdisplay in iOS
iOS 6 - Viewdidunload Migrate to Didreceivememorywarning
Add Left/Right Horizontal Padding to Uilabel
How to Set Uitableviewcellstylesubtitle and Dequeuereusablecell in Swift
Uibutton in Cell in Collection View Not Receiving Touch Up Inside Event