Top Banner
DIVE INTO APPLE MUSIC APP
19

Dive into apple music app

Feb 19, 2017

Download

Engineering

Takuro Hanawa
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dive into apple music app

DIVE INTO APPLE MUSIC APP

Page 2: Dive into apple music app

DIVE INTO APPLE MUSIC APP

Hanawa TakuroNEXT Co.,Ltd.iOS Engineer

facebook.com/takuro.hanawa

Page 3: Dive into apple music app

Agenda1. iPod Library 2. iTunes Search API 3. Apple Music API

Page 4: Dive into apple music app

iPod Library

Page 5: Dive into apple music app

DIVE INTO APPLE MUSIC APP

iPod Library

▸ Music Player : MPMediaPlayer, AVPlayer(MPMediaItem)

▸ Media Picker : MPMediaPickerController

▸ Media Query : MPMediaQuery

APP

MediaQuery

MediaPicker

MusicPlayer

iPodLibrary

iPod Library Access Programming Guide https://developer.apple.com/library/ios/documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html

Page 6: Dive into apple music app

DIVE INTO APPLE MUSIC APP

MPMediaPickerViewController

Page 7: Dive into apple music app

DIVE INTO APPLE MUSIC APP

MPMediaQuery, MPMusicPlayerController

Page 8: Dive into apple music app

iTunes Search API

Page 9: Dive into apple music app

DIVE INTO APPLE MUSIC APP

iTunes Search API

iTunes Affiliate Resources - iTunes Search APIhttps://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/

Parameter Description Required Valuesterm ⭕ ex.) The Beatles

country ⭕ ex.) jp (ISO Code)

media ✖ ex.) music

entity media ✖ ex.) album

attribute term ✖ ex.) artistTerm

callback JS ✖

limit ✖ ex.) 50 (1-50)

lang ✖ ex.) ja_jp

version API ✖ ex.) 2 (1, 2)

explicit ✖ ex.) Yes

Page 10: Dive into apple music app

itunes.apple.com/search?term=beatles&media=music&entity=song&country=jp&lang=ja_jp&limit=1

NULL?

Page 11: Dive into apple music app

Apple Music API

Page 12: Dive into apple music app
Page 13: Dive into apple music app

DIVE INTO APPLE MUSIC APP

StoreKit : SKCloudServiceController

▸ + authorizationStatusApple Music

▸ + requestAuthorization: Apple Music

▸ - requestCapabilities: completionHandler:Apple Music

▸ - requestStorefrontIdentifier: completionHandler:iTunes Store (StoreID)

Page 14: Dive into apple music app

DIVE INTO APPLE MUSIC APP

MediaPlayer : MPMusicPlayer

▸ - setQueueWithStoreIDs:Apple Music ID

▸ - addItem: withProductID: completionHandler:Apple Music ID

MediaPlayer : MPMediaPlaylist

▸ - getPlaylistWithUUID: creationMetadata: completionHandler:Apple Music

MediaPlayer : MPMediaLibrary

Page 15: Dive into apple music app

itunes.apple.com/search?term=beatles&media=music&entity=song&country=jp&lang=ja_jp&limit=1

Page 16: Dive into apple music app

???

Page 17: Dive into apple music app
Page 18: Dive into apple music app

. . . .

Page 19: Dive into apple music app