Episode 6: I Hate This Game
Welcome to Code Completion, Episode 6! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code on this brand new show! This time, we are joined by special guests, Josh Holtz and Tyler Hillsman! Be sure to follow them on Twitter at @joshdholtz and @thillsman.
Follow us @CodeCompletion on Twitter to hear about our upcoming livestreams, videos, and other content.
Be sure to also sign up to our monthly newsletter, where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes.
You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process.
⭐️ This Week's Topics
- Different App Store Pricing models.
- The benefits of paid up front with the ever-elusive charts.
- Subscription vs In App Purchase for unlocking functionality in an app.
🚧 #CompleteTheCode
This week's #CompleteTheCode:
Review the following code — what might the developer have overlooked?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class View { private(set) var parent: View? private(set) var children: [View] = [] func removeFromParentView() { guard let parent = parent else { return } parent.children.removeAll { $0 === self } } func add(_ child: View) { guard child != self else { preconditionFailure() } child.removeFromParentView() children.append(child) child.parent = self } }
Be sure to tweet us with hashtag #CompleteTheCode if you know the answer!
⚠️ Compiler Error
- Streaming game services may offer a catalog app on the App Store to help users sign up for the service and find the games on the App Store, provided that the app adheres to all guidelines, including offering users the option to pay for a subscription with in-app purchase and use Sign in with Apple.
- Apps in the Kids category must not include links out of the app, purchasing opportunities, or other distractions to kids unless guarded behind a parental gate.
- Screenshots should not include text and image overlays other than to illustrate the app in use, and they must not use any Apple devices or products for marketing purposes.
- If your app displays Activity rings, they should not visualize Move, Exercise, or Stand data in a way that resembles the Activity control.
Compilation Results
This time, Josh and Tyler went first, followed by Fernando and Ben. Let's see how they did!
3. Screenshots should not include text and image overlays other than to illustrate the app in use, and they must not use any Apple devices or products for marketing purposes.
Everyone thought this was true, and it really should be true! Unfortunately for them though, this one was the compiler error! The actual text reads:
2.3.3 Screenshots should show the app in use, and not merely the title art, log-in page, or splash screen. They may also include text and image overlays (e.g. to demonstrate input mechanisms, such as an animated touch point or Apple Pencil) and show extended functionality on device, such as Touch Bar. Learn More →
4. If your app displays Activity rings, they should not visualize Move, Exercise, or Stand data in a way that resembles the Activity control.
Tyler and Ben had sincere doubts about this one and thought it was the compiler error, but it was a code completion after all! Learn More →
2. Apps in the Kids category must not include links out of the app, purchasing opportunities, or other distractions to kids unless guarded behind a parental gate.
Although Josh was leaning on number 3 originally, this one was chosen instead, but it was also a code completion! Learn More → More →
Which leaves…
1. Streaming game services may offer a catalog app on the App Store to help users sign up for the service and find the games on the App Store, provided that the app adheres to all guidelines, including offering users the option to pay for a subscription with in-app purchase and use Sign in with Apple.
…which Fernando highly doubted, but it was also a code completion, and one introduced the morning of the day we all recorded on! Learn More → More →
🎁 Sponsor
This week's episode of Code Completion is brought to you by Fernando and his new book: From Junior to Senior: Practical iOS Style Guide. Go to https://twitter.com/fromjrtosr today to learn more!