[Accepted] My WWDC21 Swift Student Challenge submission

Overview

Accessible Reality

YouTube Link

My WWDC21 Swift Student Challenge submission

I made a playground book that teaches you the basics of ARKit through interactive lessons. It covers positioning, hit-testing, and how to calculate relationships between objects. In the end, it combines all these concepts into an app: A navigation aid for those who are visually impaired.

Status: Accepted LETS GOOOOOOOOOOOOO!!!!

Try it out: Download link

See other 2021 submissions! wwdc/2021 congrats everyone!

Screenshots

Intro Positioning Distances Angles Completed App

Tips and Tricks

Want to make your own playground book? Here's some tips and tricks that I picked up while making mine.

Development

  • Instead of dragging files into the project, create them locally (Command + N), then copy over the contents. Whenever I dragged in a file, I got a "There was a problem running this page" error.
  • Use ARKit instead of RealityKit. The camera preview works, but I was never able to see my objects in the scene.
  • Pre-compile ML models if possible. See this article for details.
  • To change the name of the playground, edit the BuildSettings.xcconfig file
  • You might need to add required capabilities in the Manifest.plist file, for example arkit. See here for the possible values.

RequiredCapabilities (Array) at Root Key including Item 0 (String) set to `arkit`

Storyboards

  • Every time you make changes in the storyboard, clean the project (Shift + Command + K), otherwise your changes won't show
  • The Assistant editor doesn't work, so you need to manually add a new editor using the button
  • For any views or view controllers that you put in the storyboard, make sure that the class has the @objc(BookCore_YOURCLASSNAME) tag. For example:
@objc(BookCore_SceneViewWrapper)
class SceneViewWrapper: UIView { }

Then, in the storyboard, for the Class put BookCore_YOURCLASSNAME. Make sure Module is set to None and Inherit Module From Target is unchecked. Your custom class should look like this:

Custom Class set to BookCore_SceneViewWrapper, with Module None and Inherit Module From Target unchecked

Debugging

  • To avoid the "There was a problem running this page" error, turn on Authoring Debug Mode in the Settings app. This gives you the full stack trace! If only I knew this earlier... I was commenting out lines of code until the error went away, AirDropping to my iPad every time. Go upvote their answer on Stack Overflow now.
  • You can get the playground page's current text, including the user-modified code, with PlaygroundPage.current.text. Put the below code in viewDidLoad to see what it is (for testing purposes).
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
    let text = PlaygroundPage.current.text
    let label = UILabel()
    self.view.addSubview(label)
    label.translatesAutoresizingMaskIntoConstraints = false
    NSLayoutConstraint.activate([
        label.topAnchor.constraint(equalTo: self.view.topAnchor),
        label.rightAnchor.constraint(equalTo: self.view.rightAnchor),
        label.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
        label.leftAnchor.constraint(equalTo: self.view.leftAnchor)
    ])
    label.numberOfLines = 0
    label.text = text /// show the text
}

Get Help

I probably wouldn't have finished if not for these resources.

License

MIT License

Copyright (c) 2021 A. Zheng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
TakeHomeChallenge - iOS Tech Challenge - Take Home Challenge
TakeHomeChallenge - iOS Tech Challenge - Take Home Challenge

iOS Tech Challenge - Take Home Challenge Thank you for your interest in taking t

The Feed API challenge with swift
The Feed API challenge with swift

The Feed API challenge - iOSLeadEssentials.com It's time to put your skills to the test! You are called to implement the RemoteFeedLoader to load a co

Code Challenge - Using Alamofire is a Swift-based, HTTP networking library, also Codable for Data Model and Combine Framework .

Code Challenge ##Using Alamofire is a Swift-based, HTTP networking library, also Codable for Data Model and Combine Framework . Alamofire is one of th

Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass
Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass

VIP (Clean Swift) - Delivery App 🍕 Neste desafio, aplicaremos conceitos da arquitetura VIP para finalizar a implementação de um aplicativo. Desenvolv

Rick and Morty Challenge With Swift

Rick-and-Morty-Challenge A Branch mais atualizada é a main. Tecnologias Modo cla

Swift client for Software-Challenge Germany 2022/2023

Swift client for Software-Challenge Germany 2022/2023 This package contains a simple client written in Swift for Software-Challenge Germany 2022/2023.

US bank coding exercise challenge

USBankcodingexercise US bank coding exercise challenge This repo has two projects Project to demo MVVM design pattern problem statement - read data fr

Flipgrid Challenge
Flipgrid Challenge

FlipgridChallenge Overview The project follows MVVM-FlowViewController architecture that scales nicely as more screens/flows are added. I have added c

Birthdays App Challenge set by Chalkboard

Chalkboard Birthdays App Challange This is an app that utilises a web api to provide the user an ordered list of birthdays youngest to oldest How to i

Releases(v1.0)
Owner
Zheng
I like reading manga and coding with Swift. WWDC21 Scholar.
Zheng
My Winning Submission for Apple's WWDC 2021 Swift Student Challenge

Symmetries This playground book gives a quick insight into the symmetry groups of 3-dimensional objects like the platonic solids. The user can play ar

David 4 Apr 23, 2022
'The Particle Binder' - Winning WWDC22 Swift Student Challenge submission!

The Particle Binder 'The Particle Binder' - Winning WWDC22 Swift Student Challenge submission! Welcome to The Particle Binder, the particle accelerato

David 8 Sep 26, 2022
My submission for the SwiftUISeries' Workarounds & Hacks challenge

SwiftUISeries Workarounds & Hacks My submission for the SwiftUISeries' Workarounds & Hacks challenge Problem Description For a list in an app I'm work

Jérôme Alves 4 May 28, 2022
My submission for the SwiftUISeries' speed run challenge

SwiftUICameraAppSpeedrunChallenge My submission for the SwiftUISeries' speed run challenge Speedrun video: https://www.youtube.com/watch?v=N9L8XfZaIv8

Jérôme Alves 4 Jul 24, 2022
WWDC2020 Swift Student Challenge - TheHackOfRayTracing playground book

wwdc2021 My wwdc2021 submission The HackOf RayTracing How to run Install swift playground from App Store on your Mac or iPad Double clik TheHackOfRayT

haoboxuxu 20 May 20, 2022
🎉 WWDC 2021 Swift Student Challenge Winner 🎉 Dance Party allows users to record choreography and play against other users to try and match the key poses!

?? Dance Party ?? ?? WWDC 2021 Swift Student Challenge Winner ?? Installation Steps (Works on iPad Only) Clone or Download Unzip the .playgroundbook.z

Alan Yan 7 Oct 17, 2022
My winning contribution to Apple's Swift Student Challenge 2021

SynthApp My winning contribution to Apple's Swift Student Challenge 2021 This repository contains an Xcode project and the final Swift Playgrounds fil

Sl4sh! 1 Dec 4, 2021
Sample Code for WWDC21

WWDC21 Sample Code Accessibility Create Accessible Experiences for watchOS Creating Accessible Views WWDC21 Challenge: Large Text Challenge WWDC21 Cha

Artem Novichkov 84 Dec 27, 2022
iOS Tech Challenge - Take Home Challenge

iOS Tech Challenge - Take Home Challenge Thank you for your interest in taking the iOS Tech Challenge. Preparation Please, compile the project in Xcod

null 0 Oct 18, 2021
Challenge-M2Y-TM4 - A challenge provided by Mobile2You, with the purpose of analyzing knowledge about UI, API consumption

Challenge-M2Y-TM4 Um desafio proporcionado pela Mobile2You, com proposito de ana

Felipe Brigagão de Almeida 0 Jan 31, 2022