Share Files Between my iPad App and PC using objective-C

Discussion in 'iOS Programming' started by neil1234567, Feb 22, 2013.

  1. neil1234567 macrumors newbie

    Joined:
    Feb 22, 2013
    #1
    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.

    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");
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    smb URL with username and password is described here (first Google result for "smb url username password").
     

Share This Page