file - Different behaviour of [NSMutableString writeToFile] in iOS7 and iOS8 -


here have demo code saving nsmutablestring in file (filename.dat)

nserror* error = nil; nsmutablestring* dat = [[nsmutablestring alloc] initwithcapacity:1]; bool result = [dat writetofile:@"filename.dat" atomically:yes encoding:nsutf8stringencoding error:&error]; 

but have 2 different output while rung in ios7 , ios8beta5

output xcode5+ios7 enter image description here

output xcode5+ios8 enter image description here


while running in ios7 shows there in error in parsing file path, in ios8beta5 it crash saying [nsfilemanager filesystemrepresentationwithpath:] have nil or empty path.
question :
in both sdk ios8 , ios7 take nserror argument return error, believe should return error instead of crashing application
apple mansion changes regarding it, if yes please give me reference link same.

the path pass [nsdata writetofile:atomically:] not complete , should full path.

that done getting path documents folder , appending filename.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -