Home > Software engineering >  macOS, iOS & tvOS documentation missing imports?
macOS, iOS & tvOS documentation missing imports?

Time:06-25

I'm looking into iOS/tvOS docs for GCKeyboard & GCMouse types.

However Apple docs seem to be missing basic info such as what I import to use a type. For example C# docs always show what libraries are needed on MS websites for types. So do Googles Android docs. I'm not seeing this on Apples docs here: enter image description here

Specifically for GameController framework you’d use the following import

import GameController

A nice anecdote:

In older class and objects it is also customary to add the initials of the framework/library as a prefix for the name. In this case GC(i.e game contoller)Keyboard. Or UI(UIKit)ViewController. With newer libraries like SwiftUI and Combine they have stopped using the prefix. The prefix was used due to legacy Objetive-C limitation for namespace.

  • Related