mapbox / search-ios-examples

Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

After install pods the MapBoxSearch code not build successfully #7

Open ghost opened 2 years ago

ghost commented 2 years ago

Hello Team, I'm trying to integrated the MapboxSearch CocoaPods in my Existing Project. But I'm stuck in last points. I facing Below error after install the CocoaPods.

Xcode Version:- 13.1 (13A1030d) MacOS Version:- Big Sur Version (11.6)

Below CocoaPods to Install

pod 'Mapbox-iOS-SDK' pod 'MapboxSearch', ">= 1.0.0-beta.1", "< 2.0" pod 'MapboxSearchUI', ">= 1.0.0-beta.1", "< 2.0"

Error:-

Failed to build module 'MapboxSearch'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)', while this compiler is 'Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)'). Please select a toolchain which matches the SDK.

ScreenShot:- Screenshot 2022-01-06 at 7 29 14 PM

Screenshot 2022-01-06 at 7 29 27 PM

Question: How to Solve above error. Can you please help me

Any help would be greatly appreciated.

Thanks in advance.

don1ck commented 2 years ago

Hello @dhimansham, can you please share your Podfile.lock ? I don't have such issue with xcode 13.1 (13A1030d), Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)

ghost commented 2 years ago

@don1ck Sure, give me sometime I will share with you. @don1ck do you have SwiftUI latest MapBox tutorial. Because I'm doing lot of search but i'cant find any tutorial based on MapBox 10.2 version. If you have can you please me share with me.

don1ck commented 2 years ago

There is pretty simple way to integrate UIKit views into SwiftUI. You can find SearchSDK UI example here.