OrigamiEngine icon indicating copy to clipboard operation
OrigamiEngine copied to clipboard

Doesn't work with files from bundle

Open gerchicov-bp opened this issue 10 years ago • 2 comments

I added a file "flac" to the xcode project. I can play this file when It is stored anywhere else (for example in documents folder) but not from the app bundle

gerchicov-bp avatar Sep 02 '15 10:09 gerchicov-bp

Technically playing from the app bundle shouldn't be much different from any other path. I would suggest checking url format.

ap4y avatar Sep 02 '15 21:09 ap4y

Finally found the solution:

NSString *temp = [[NSBundle mainBundle] pathForResource:@"Fergalicious" ofType:@"flac"]; temp = [@"file://localhost" stringByAppendingString:temp]; temp = [temp stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

gerchicov-bp avatar Sep 07 '15 15:09 gerchicov-bp