ios 음악1 ios 로컬 음악파일 간단하게 재생하기 .h 파일 #import //사운드를 재생할 오디오 플레이어객체 , @property (nonatomic,strong)AVAudioPlayer *player; .m 파일 /* 로컬에 sound 파일 재생하기 위한 경로를 가져온다. 경로를 url 타입으로 변환 - > avaudioplayer로 재생. */ NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"sos" ofType:@"wav"]; NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath]; NSLog(@"soundFileURL : %@" , soundFileURL); NSError *error; self.player = [[AV.. 2019. 10. 18. 이전 1 다음