NowSDK framework - iOS
concept australia Updated Sep 10, 2026 2 min read NowSDKAPIiOS.md
The NowSDK framework contains methods that enable the instantiation of various feature services.
Parent Topic:Mobile SDK - iOS
NowSDK - configure(with configuration: NowSDKConfiguration) throws
Configures NowSDK for use. You must call this function before calling any of the feature services within the Mobile SDK.
Note: If the configuration that you pass is invalid, a NowSDKError is thrown.
| Name | Type | Description |
|---|---|---|
| with configuration | NowSDKConfiguration | NowSDKConfiguration that contains the information necessary to initialize the service. |
| Type | Description |
|---|---|
| None, NowSDKError | NowSDKError is thrown if the configuration that you pass is invalid. |
The following code example shows how to call this function.
JavaScript
guard let jwtUrl = URL(string: "http://13.57.38.237:8080"), let instanceUrl = URL(string: "https://mobilecoresdk.service-now.com") else { return }
// AuthorizationProvider – struct conforming to NowSDKAuthorizationProviding protocollet authorizationProvider = AuthorizationProvider(userEmail: "sdk@servicenow.com", jwtProviderUrl: jwtUrl, clientId: "deb8756b452d201039231ca568f26511") // PermissionProvider – class conforming to DevicePermissionDelegate protocollet permissionProvider = PermissionProvider()let config = NowSDKConfiguration(authorizationProvider: authorizationProvider, permissionDelegate: permissionProvider, logLevel: .debug)
do { try NowSDK.configure(with: config) …} catch { print(“error is \(error.localizedDescription)”)}NowSDK - core()
Returns a reference to the SDK core service.
Note: Host applications don't need to call this function.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| Object | Object conforming to the NowCoreServiceProviding protocol is returned if the SDK has been initialized by calling the NowSDK - configure(with configuration: NowSDKConfiguration) throws method; otherwise nil. |
The following code example shows how to call this function.
JavaScript
guard let coreService = NowSDK.core() else { // Error with NowServiceError.sdkNotConfigured return}NowSDK - makeServiceConfiguration(for instanceUrl: URL)
Convenience function that feature services can use to construct n NowServiceConfiguration object.
| Name | Type | Description |
|---|---|---|
| instanceUrl | URL | URL of the ServiceNow instance that the service will access. |
| Type | Description |
|---|---|
| NowServiceConfiguration | If the specified URL passes basic validity checks, and the service configuration can be properly constructed, returns the NowServiceConfiguration object; otherwise nil. |
The following code example shows how to call this function.
JavaScript
guard let instanceUrl = URL(string: "https://mobilecoresdk.service-now.com"), let serviceConfig = NowSDK.makeServiceConfiguration(for: instanceUrl) else { logger.error(message: "Could not create service - service configuration invalid") return }105 lines · 4.4 KB
---
title: NowSDK framework - iOS
description: The NowSDK framework contains methods that enable the instantiation of various feature services.Configures NowSDK for use. You must call this function before calling any of the feature services within the Mobile SDK.Returns a reference to the SDK core service.Convenience function that feature services can use to construct n NowServiceConfiguration object.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/cllent-mobile-api-reference/NowSDKAPIiOS.html
release: australia
product: Cllent Mobile API Reference
classification: cllent-mobile-api-reference
topic_type: concept
last_updated: "2026-09-10"
reading_time_minutes: 2
breadcrumb: [Mobile SDK - iOS, Mobile SDK API reference, API reference, API implementation and reference]
---
# NowSDK framework- iOS
The NowSDK framework contains methods that enable the instantiation of various feature services.
**Parent Topic:**[Mobile SDK - iOS](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/MobileSDKiOSAPI.md)
## NowSDK - configure\(with configuration: NowSDKConfiguration\) throws
Configures NowSDK for use. You must call this function before calling any of the feature services within the Mobile SDK.
**Note:** If the configuration that you pass is invalid, a `NowSDKError` is thrown.
|Name|Type|Description|
|----|----|-----------|
|with configuration|[NowSDKConfiguration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/NowSDKConfigurationiOSAPI.md)|NowSDKConfiguration that contains the information necessary to initialize the service.|
|Type|Description|
|----|-----------|
|None, NowSDKError|NowSDKError is thrown if the configuration that you pass is invalid.|
The following code example shows how to call this function.
```
guard
let jwtUrl = URL(string: "http://13.57.38.237:8080"),
let instanceUrl = URL(string: "https://mobilecoresdk.service-now.com") else {
return
}
// AuthorizationProvider – struct conforming to NowSDKAuthorizationProviding protocol
let authorizationProvider = AuthorizationProvider(userEmail: "sdk@servicenow.com", jwtProviderUrl: jwtUrl, clientId: "deb8756b452d201039231ca568f26511")
// PermissionProvider – class conforming to DevicePermissionDelegate protocol
let permissionProvider = PermissionProvider()
let config = NowSDKConfiguration(authorizationProvider: authorizationProvider, permissionDelegate: permissionProvider, logLevel: .debug)
do {
try NowSDK.configure(with: config)
…
} catch {
print(“error is \(error.localizedDescription)”)
}
```
## NowSDK - core\(\)
Returns a reference to the SDK core service.
**Note:** Host applications don't need to call this function.
|Name|Type|Description|
|----|----|-----------|
|None| | |
|Type|Description|
|----|-----------|
|Object|Object conforming to the NowCoreServiceProviding protocol is returned if the SDK has been initialized by calling the [NowSDK - configure\(with configuration: NowSDKConfiguration\) throws](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/NowSDKAPIiOS.md) method; otherwise `nil`.|
The following code example shows how to call this function.
```
guard let coreService = NowSDK.core() else {
// Error with NowServiceError.sdkNotConfigured
return
}
```
## NowSDK - makeServiceConfiguration\(for instanceUrl: URL\)
Convenience function that feature services can use to construct n NowServiceConfiguration object.
|Name|Type|Description|
|----|----|-----------|
|instanceUrl|URL|URL of the ServiceNow instance that the service will access.|
|Type|Description|
|----|-----------|
|[NowServiceConfiguration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/NowServiceConfigurationiOSStruct.md)|If the specified URL passes basic validity checks, and the service configuration can be properly constructed, returns the NowServiceConfiguration object; otherwise `nil`.|
The following code example shows how to call this function.
```
guard
let instanceUrl = URL(string: "https://mobilecoresdk.service-now.com"),
let serviceConfig = NowSDK.makeServiceConfiguration(for: instanceUrl) else {
logger.error(message: "Could not create service - service configuration invalid")
return
}
```
| title | NowSDK framework - iOS |
| description | The NowSDK framework contains methods that enable the instantiation of various feature services.Configures NowSDK for use. You must call this function before calling any of the feature services within the Mobile SDK.Returns a reference to the SDK core service.Convenience function that feature services can use to construct n NowServiceConfiguration object. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/api-reference/cllent-mobile-api-reference/NowSDKAPIiOS.html |
| release | australia |
| product | Cllent Mobile API Reference |
| classification | cllent-mobile-api-reference |
| topic_type | concept |
| last_updated | 2026-09-10 |
| reading_time_minutes | 2 |
| breadcrumb | Mobile SDK - iOSMobile SDK API referenceAPI referenceAPI implementation and reference |