Meet Up #1


  1. Introductions and backgrounds
    1. Why Swift? – We all agreed that its the future
    2. Goals for learning Swift? – We want to make cool apps!
    3. How can Learn Swift LA help? – Meet like-minded people to learn and troubleshoot together, stay motivated, get help on how to start
  2. “JustPlay” practice app – iPhone app, with a “PLAY” button that when tapped automatically plays the first song in the iPhone’s music library
    1. Used iOS Developer Library
    2. Created new Xcode Project
    3. Used the Media Player Framework
    4. Ran the app in the simulator and on an iPhone 6
    5. It worked!


  1. iOS Developer Library
    1. iPod Library Access Programming Guide (Web) (PDF)
    2. MPMusicPlayerController Class Reference
  3. –¬†Foundations of Programming: Fundamentals Course
  4. Design+Code

Practice App Materials

For our practice app, we created an iPhone app that, upon opening, presents a button in the center of the screen that says “PLAY”, and that when pressed, automatically plays the first song in the iPhone’s music library. That’s it. And it was fun!

Just a play button :)

Here is the code to make this work:

import UIKit
import MediaPlayer

class ViewController: UIViewController {

let myMusicPlayer = MPMusicPlayerController()
let myMediaQuery = MPMediaQuery.songsQuery()

@IBAction func playButton(sender: AnyObject) {

override func viewDidLoad() {

override func didReceiveMemoryWarning() {

Watch a screencast that re-creates what we learned with our JustPlay 1.0 app during our first Meet Up: