AirTime is an app that brings the playPORTAL SDK and the Apple Watch together. It uses the on-board Apple Watch accelerometer to complete simple gesture recognition to count pogo stick jumps and airtime. Go outside, get your pogo stick and start jumping. Feel free to modify this code, and create your own playPORTAL Apple Watch app.
Read the full blog about this demo app posted here.
-
- Navigate to playPORTAL Studio
- Click on Sign Up For FREE Account
- After creating your account, email us at [email protected] to introduce yourself and your project and we will consider you for early access.
-
- After confirmation, log in to the playPORTAL Studio
- In the left navigation bar click on the Apps tab.
- In the Apps panel, click on the "+ Add App" button.
- Add an icon (example image here).
- Enter a unique app name (you cannot use the name AirTime because it is already in use).
- Enter a description for your app.
- For "Environment" leave "Sandbox" selected.
- Click "Add App"
-
- Add permission scopes for each of the SDK features used in the app. Reference the image below.
-
- Tap "Client IDs & Secrets"
- Tap "Generate Client ID"
- The values generated will be used later.
- CAUTION: Keep your Client ID & Secret private! Do not commit your credentials!
-
- Open teminal and clone repository to Desktop
cd Desktop git clone https://github.com/playportal-studio/AirTime.git
-
Step 6: Install Cocopods
- To install
sudo gem install cocoapods -v 1.6.0.beta.1
- After cocoapods is installed, follow these steps
cd AirTime pod install
-
- Open up the AirTime.xcworkspace file
- Select a simulator or device that runs an iPhone and Apple Watch together
- Press the play button to run AirTime
-
- The Client ID, & Secrets tied to your application NEED to be hidden
- Create a .gitignore file (if there isn't an existing one):
cd AirTime touch .gitignore
- Create a Keys.swift file inside your project directory
- Copy your Client ID and your Client Secret from playPORTAL Studio
- Define your keys inside the Keys.swift using the format below
let cid = "CLIENT ID GOES HERE" let cse = "CLIENT SECRET GOES HERE" let redirectURI = "REDIRECT URL GOES HERE" let env = "SANDBOX"
-
- Open XCode
- Navigate to your app level settings and click on the info tab.
- Add a new URL under the URL types section.
- Input your app name from Step 2 into the Identifier and URL Schemes.
-
- Go back to playPORTAL Studio
- Click on Sandbox
- Generate a few users Tip: You can create kids by creating a Parent and adding a Kid
-
- If you made it this far, great you are ready!!!
- Within XCode, build the App
- Use username and PW from playPORTAL Studio Step 8.4 to login
- Good luck and have fun developing