ArcGISKit Documentation

Function generate​URL(client​ID:​base​URL:​site:​redirect​URI:​)

public static func generateURL(
		clientID: String,
		baseURL: URL = URL(string: "https://arcgis.com")!,
		site: String = "sharing",
		redirectURI: String = "urn:ietf:wg:oauth:2.0:oob"
	) -> URL  

Generates a URL that users of your app should go to to authenticate. Once they authenticate, they should copy and paste the authentication code back into your app; that code can then be passed to GIS.init.

Parameters

client​ID String
base​URL URL

Your ArcGIS Server hostname.

site String

Your ArcGIS Server site name. The default is "sharing".

redirect​URI String

The URL that will receive a code once the user has logged in. Use the default ("urn:ietf:wg:oauth:2.0:oob") to have ArcGIS Online present the code to the user instead of redirecting to a different URL.

Returns

The generated URL.