It looks like you're new here. If you want to get involved, click one of these buttons!
AVMutableComposition* composition = [AVMutableComposition composition];
AVURLAsset* audioAsset1 = [[AVURLAsset alloc]initWithURL:[NSURL fileURLWithPath:audioFile1Path] options:nil];
AVURLAsset* audioAsset2 = [[AVURLAsset alloc]initWithURL:[NSURL fileURLWithPath:audioFile2Path] options:nil];
AVMutableCompositionTrack *audioTrack1 = [composition addMutableTrackWithMediaType:AVMediaTypeAudio
preferredTrackID:kCMPersistentTrackID_Invalid];
[audioTrack1 insertTimeRange:CMTimeRangeMake(kCMTimeZero, audioAsset1.duration)
ofTrack:[[audioAsset1 tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]
atTime:kCMTimeZero
error:nil];
[audioTrack1 insertTimeRange:CMTimeRangeMake(kCMTimeZero, audioAsset2.duration)
ofTrack:[[audioAsset2 tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]
atTime:audioAsset1.duration
error:nil];
AVAssetExportSession * ex = [[AVAssetExportSession alloc] initWithAsset:[audioTrack1 asset] presetName:AVAssetExportPresetAppleM4A];