I got the solution for getting shared link of file. Write following lines of code where you want to get shared link.
BoxFileBlock successfulShare = ^(BoxFile *file)
{
dispatch_sync(dispatch_get_main_queue(), ^{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"File Share Successful" message:[NSString stringWithFormat:@"Shared link: %@", [file.sharedLink objectForKey:@"url"]] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
});
};
BoxAPIJSONFailureBlock failedShare = ^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSDictionary *JSONDictionary)
{
BOXLog(@"status code: %i", response.statusCode);
BOXLog(@"share response JSON: %@", JSONDictionary);
};
BoxFilesRequestBuilder *builder = [[BoxFilesRequestBuilder alloc] init];
BoxSharedObjectBuilder *sharedBuilder = [[BoxSharedObjectBuilder alloc] init];
sharedBuilder.access = BoxAPISharedObjectAccessOpen;
builder.sharedLink = sharedBuilder;
[[BoxSDK sharedSDK].filesManager editFileWithID:YOUR_FILE.modelID requestBuilder:builder success:successfulShare failure:failedShare];