My ipad app creates a CSV file that I want to copy into a windows pc at smb://windowssever/d$/myfolder.
My Windows PC needs an authetication that is it needs a username and password to connect.
I am using the following code to copy but not sure where should I give the username and password of PC in the following code.
My Windows PC needs an authetication that is it needs a username and password to connect.
I am using the following code to copy but not sure where should I give the username and password of PC in the following code.
Code:
NSFileManager *filemgr;
filemgr = [NSFileManager defaultManager];
if ([filemgr copyItemAtPath: @"/tmp/myfile.csv" toPath: @"smb://windowssever/d$/myfolder/myfile.csv" error: NULL] == YES)
NSLog (@"Copy successful");
else
NSLog (@"Copy failed");