Home

Awesome

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

IntroPositioningDistancesAnglesCompleted 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

<kbd><img src="GitHub/RequiredCapabilities.png" height="150" alt="RequiredCapabilities (Array) at Root Key including Item 0 (String) set to `arkit`"></kbd>

Storyboards

@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:

<kbd><img src="GitHub/CustomClass.png" width="200" alt="Custom Class set to BookCore_SceneViewWrapper, with Module None and Inherit Module From Target unchecked"></kbd>

Debugging

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.