This repo can help you backup your Apple Music library, and transfer them from one Apple ID to another.
You need to have Apple Music subscription to do following operations.
- Sign in you Apple ID, click Get Songs to fetch the list of your Apple Music library songs.
- While in app, click Save to File to save a
.txtfile of a list of song ids somewhere (like iCloud Drive). - Sign in another Apple ID, click Import from File and select the file from last step to import these songs into your current library.
- Follow steps here to generate a
MusicKit identifierand a private.p8key file. - Install
pipif you haven't. - Install these two packages.
sudo pip install pyjwt
sudo pip install cryptography- Copy your
Developer Team ID,MusicKit IDand private key in the.p8file intomusictoken.py. - Run
python(3) musictoken.py - Copy the generated token to
AppleMusicBackup/DeveloperToken.swift. - Remember to generate a new token after 24 hour expiration time.
- Install
CocoaPodsif you haven't. - Run
pod install. - Open
AppleMusicBackup.xcworkspace, import your.mobileprovisionfile and run.