CoffeeGuide icon indicating copy to clipboard operation
CoffeeGuide copied to clipboard

Please update for us

Open yakupad opened this issue 7 years ago • 7 comments

Please update for us

yakupad avatar Mar 13 '17 08:03 yakupad

Understood! Give me a few days and I'll update this for iOS 10 / Swift 3.

reinder42 avatar Mar 13 '17 08:03 reinder42

Hi Reinder,

Has Coffee Shop been updated for iOS 10 / Swift 3? If yes, then could you pls share the link.

Thanks

Sachin-Raut avatar Jun 02 '17 04:06 Sachin-Raut

I've got no plans so far to update for Swift 3 – iOS 11/Swift 4 is coming in a few months. Feel free to PR, or ask me a question when you're updating for Swift 3 yourself. Please note that this repo is for a free tutorial from 2015. If you're looking for up to date guides, check https://learnappmaking.com/add1 and https://learnappmaking.com/z2as

reinder42 avatar Jun 06 '17 12:06 reinder42

Hello,

I have updated the code to Swift 3.0 using Xcode 832. I have the ability to load the application and view the map, table, and user's location. However, there are no coffee shops loaded in the annotation or tableview, and the map does not zoom automatically.

Do you have any suggestions on what to try next? My thinking is there is some failure at the Foursquare API or the REALM SDK.

Thank you for your amazing website as well, learnappmaking. Bless you!

Cheers,

Bryan

bryangolk avatar Jul 04 '17 20:07 bryangolk

Thanks Bryan! Glad you like it.

Here's what I'd do:

  • Is the app compiling? If not, start there. What's the compiler error, if any?
  • Check out the getCoffeeShopsWithLocation(location:) function in CoffeeAPI, especially the closure for the search() function.
  • Is there any data coming in? If so, does the data continue all the way to the table & map views? If not, where does it stop?
  • If there's no data coming in, check the Foursquare parameters, and whether the request starts in the first place. If it doesn't start, figure out why it doesn't. Is there location data coming in? The request is triggered when GPS coords come in.
  • Don't assume the error is inside Realm or Foursquare, assume it's in your own code. If you upgraded the Foursquare / Realm pods, you might want to check if you need to change your code to support the new pod versions.

Here's a good article about debugging: https://learnappmaking.com/debugging-fix-bugs-xcode-debugger-breakpoints/

Good luck!

reinder42 avatar Jul 05 '17 08:07 reinder42

Hi Reinder!

I will check the bullet points you've so nicely laid out.

Quickly, the app is compiling and building successfully on all devices, even my own iphone 7. Location is updating (blue dot follows me when I move around the city). Map is not zooming to location and populating coffee shops (could be a tell).

I did upgrade the foursquare and realm pods so I will check the code to make sure it is playing friendly with the new SDKs. I will also spend some time this week using the debug steps in your article to see where I have possible issues of maybe data not coming in through API.

I appreciate the guidance here. If I get it working I will definitely let you know! And I'll find a way to get a nice cold beer in your hands as a "thank you"!

Cheers,

Bryan

bryangolk avatar Jul 05 '17 21:07 bryangolk

Awesome! Sounds like there's in fact something wrong with the data coming in, or the requests not triggering. If you start out in that function I mentioned, and track the flow up and down, I'm sure you'll find it.

Just so you know, you can send fake GPS data to your app, from both the Simulator and Xcode, when the app runs. There's even a "Bicycle Ride", so you can check moving GPS.

If you're serious about learning iOS development, make sure to check out my course :-) There's also a free mini course on building a chat app with Firebase, so if you like building app projects, do signup for that!

reinder42 avatar Jul 06 '17 08:07 reinder42