Group Group Group Group Group Group Group Group Group

Conclusion | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/18176818-your-first-ios-and-swiftui-app-polishing-the-app/lessons/42

This course was great! I had done the original Bull’s Eye but then stepped away from SwiftUI for a while and used your course to get restarted. You have added several new insights that helped me and I am comfortable in SwiftUI again. Make’s me glad I just re-upped my membership!

One thing I did for fun is create BullseyeMac to build and run on my iMac. I created a new macOS App project in Xcode and directly copied all my iOS Bullseye sources, targeted my Mac instead of an iPhone and had to make the following changes:

  1. Redid the appIcon Assets – simply copying the proper sized .png files to the various devices.
  2. Eliminated the verticalSizeClass and horizontalSizeClass environment work in LeaderBoardViews.swift as they aren’t available in macOS. (People don’t rotate their fixed screens very often!)
  3. Had to do a lot of work with buttons as they are quite different between iOS and macOS. I found a fix that in 30 lines of code makes a niceButton() method as a View extension changing the ButtonStyle. Otherwise, the Buttons were not placed nicely in the various stack containers and were not usable.
  4. In ContentView I added a .frame to BackgroundView with minWidth: 300.0, minHeight: 200.0 or the app launched very tiny.

Now Bull’s Eye works beautifully on my Built-in Retina Display up to 4096 x 2304 pixels.

That’s awesome that you ported it to the Mac! Congrats and thanks for sharing what you learned with everyone else. I’m glad you enjoyed the course! :]