How to add video to iphone simulator

前端 未结 8 1474
情书的邮戳
情书的邮戳 2020-12-28 15:43

Can anyone tell me how to add video the iPhone simulator so that I can test some apps I am working on? Thanks in advance!

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 15:56

    You can add Your file by adding these 2 lines of code in appdelegate.m

    NSString *path = [[NSBundle mainBundle] pathForResource:@"sample_iTunes" ofType:@"mov"];
    UISaveVideoAtPathToSavedPhotosAlbum(path, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);`
    

提交回复
热议问题