How do come to know when does application gets killed?

I am making music application for iOS using ionic and i just requires to know when does app gets killed … so, i can stop/pause music

i know there are events already there in cordova “pause” and “resume” when it resumes

is there any help or other plugin required for iOS ?

Any help will helpful