AirFloat icon indicating copy to clipboard operation
AirFloat copied to clipboard

Custom Name Does Not Persist

Open keithws opened this issue 9 years ago • 2 comments

I just downloaded, built, and installed AirFloat on an old iPhone 4 running iOS 7. It works! However, when I give it a custom name in the Settings panel, that name does not persist. Any one else having this issue?

keithws avatar Nov 02 '15 17:11 keithws

Yep, exactly the same issue

Starbix avatar Nov 03 '15 20:11 Starbix

The following code may do the job (at least for me, iPad1/iOS 5.1.1).

"AirFloat/AirFloatAppDelegate.m"

//#if TARGET_IPHONE_SIMULATOR // NSString* path = [[NSString stringWithFormat:@"/Users/%@/Library/Preferences/", NSUserName()] stringByAppendingPathComponent:filename]; //#else // NSString* path = [@"/var/mobile/Library/Preferences/" stringByAppendingPathComponent:filename]; //#endif

NSArray *mypaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [mypaths objectAtIndex:0];
NSString *newpath = [documentsDirectory stringByAppendingPathComponent:filename];

return newpath;

yfliao avatar Dec 04 '15 17:12 yfliao