Error use unresolved identifier GMSPlacePickerConf

2019-05-07 16:02发布

问题:

Error use unresolved identifier GMSPlacePickerConfig & GooglePlacePicker? (Google Places 2.0)

import GoogleMaps
import GooglePlaces

are already declared on top.

Here

回答1:

Now, google has broken it into multiple frameworks. You need to add a new pod 'GooglePlacePicker'.



回答2:

I don't see any error on your code based on this sample code. If you are using cocoapod, you need to add pod 'GooglePlaces'. Error Use of unresolved identifier usually occurs when your new class has a different Target(s) from the other one. You can check it in this SO question. It might have a testing target and the other doesn't. You have to include all of your classes in the testing target or none of them. Also, here is a related answer in SO question which might help.