chrisdhaan / CDYelpFusionKit

An extensive Swift wrapper for the Yelp Fusion API.
MIT License
54 stars 18 forks source link

imageUrl and url returning as nil (+ solution) #22

Closed boyuanx closed 3 years ago

boyuanx commented 3 years ago

What did you do?

Send a normal query to Yelp

What did you expect to happen?

imageUrl and url are available

What happened instead?

They are nil.

CDYelpFusionKit Environment

CDYelpFusionKit version: 2.1.0 Xcode version: 12.1 Swift version: 5.1 Platform(s) running CDYelpFusionKit: iOS macOS version running Xcode: 11.0.1

Solution

This issue can be fixed by changing the type of those variables in CDYelpBusiness from URL? to String? and modify the mapping function accordingly. I tested this solution and imageUrl and url are no longer nil.

chrisdhaan commented 3 years ago

Thanks for this @boyuanx . I'll get to it soon

chrisdhaan commented 3 years ago

@boyuanx fixed with version 2.1.1. Closing.