How can I concatenate an NSString URL? For instance:
NSString
http://isomewebsite.com/username=[someuservariable]&password=[somevariable]
Try using the code below.
NSString* myURLString = [NSString stringWithFormat:@"somewebsite.com/username=%@&password=%@", myUserName,myPassword]; NSURL *url = [NSURL URLWithString:myURLString];
Here's a blog tutorial to help you learn more about Handling URL Authentication Requests When Accessing Password-Protected Servers
You can use the stringWithFormat method for NSString:
NSString *url = [NSString stringWithFormat:@"somewebsite.com/username=%@&password=%@", someuservariable, some variable];
Try this great post - URL encoding NSString on iOS
Source: https://habr.com/ru/post/886365/More articles:including files in php - includeEmergency dumps do not appear - azureIs OAuth on a mobile phone using a proxy too much trouble? - androidClearCase: working with offline file captures and then checking / merging - clearcaseHow to forcibly end cmd windows tab to add trailing slash to directory names - windowsStarting a Pig request over data stored in Hive - hadoopwinforms listview - make the first column always visible? - c #Smooth scaling with graphics.DrawImage - c #Unable to build piggybank -> / home / build / ivy / lib does not exist - javaAutofac skip option for nested types - c #All Articles