I just found a strange problem with aifc sounds on iPhone 6+.
On iPhone 6+ they are not playing for me.
I started to look at Sparrow code and found that fullPath for that sound is always nil.
Check out the code of SPAVSound:
- (instancetype)initWithContentsOfFile:(NSString *)path duration:(double)duration
if ((self = [super init]))
NSString *fullPath = [SPUtils absolutePathToFile:path];
NSLog(@"\n\npath = %@ \nfullPath = %@ \n\n", path, fullPath); // Added NSlog to watch path and fullPath values
_soundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath];
_duration = duration;
Here is the output for any device (except iPhone 6+):
2014-11-25 11:56:46.316 TestApp[54254:3191906]
path = /Users/a.dudanovskis/Library/Developer/CoreSimulator/Devices/5DD291B9-967B-407D-9C00-6CD47F058650/data/Containers/Bundle/Application/9DD541BC-E28C-4B0B-8669-AC89E2B58781/TestApp.app/gameMusic.aifc
fullPath = /Users/a.dudanovskis/Library/Developer/CoreSimulator/Devices/5DD291B9-967B-407D-9C00-6CD47F058650/data/Containers/Bundle/Application/9DD541BC-E28C-4B0B-8669-AC89E2B58781/TestApp.app/gameMusic.aifc
And here is the output for iPhone 6+:
2014-11-25 12:09:34.398 TestApp[54416:3198211]
path = /Users/a.dudanovskis/Library/Developer/CoreSimulator/Devices/C86EA297-EDC3-4237-91F1-0F6E2A79BAC5/data/Containers/Bundle/Application/BEFA639E-A655-4858-A80E-D70FE8EE7763/TestApp.app/gameMusic.aifc
fullPath = (null)
I couldn't understand why it happening only for iPhone 6+ (on simulator and on real device), but on any other devices with any iOS versions it is working fine.
Obviously the problem is in the [SPUtils absolutePathToFile:path] method, but I couldn't understand where exactly.
I added one line of code after the full path creation and this fixed my problem.
Here is that line:
fullPath = (fullPath) ? fullPath : path;
So have any of you faced the same problem or only me?
Maybe you have any thoughts about this?