azure-activedirectory-library-for-objc: ADAL is not working for iOS 11.3

Hello,

I am using ADAL 2.6.2 installed via cocoapods. It works fine for my app until the last release of iOS 11.3. Now the SDK returns the following error: “The network connection was lost.”

You can find in the following the logs from ADAL for iOS:

`018-04-10 19:07:20.815375+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADAuthenticationContext authenticationContextWithAuthority:error:], file line #176 2018-04-10 19:07:20.816330+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADAuthenticationContext authenticationContextWithAuthority:validateAuthority:error:], file line #186 2018-04-10 19:07:20.821468+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20] VERBOSE: ADAL API call [Version - 2.6.2] - In function: -[ADAuthenticationContext(Internal) initWithAuthority:validateAuthority:tokenCache:error:], file line #42 2018-04-10 19:07:20.822310+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20] VERBOSE: ADAL API call [Version - 2.6.2] - In function: -[ADAuthenticationContext acquireTokenWithResource:clientId:redirectUri:userId:extraQueryParameters:completionBlock:], file line #318 2018-04-10 19:07:20.823442+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: ##### BEGIN acquireToken idtype = RequiredDisplayableId authority host: login.microsoftonline.com ##### 2018-04-10 19:07:20.827349+0200 NICE[37405:1100603] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] WARNING: No cached preferred_network for authority 2018-04-10 19:07:20.828999+0200 NICE[37405:1100603] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Waiting on Authority Validation Queue 2018-04-10 19:07:20.988439+0200 NICE[37405:1100618] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Caching AAD Environements 2018-04-10 19:07:20.990487+0200 NICE[37405:1100603] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Returned from Authority Validation Queue 2018-04-10 19:07:20.992510+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:20.999591+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:20 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.000088+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.000817+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.004980+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.005645+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.006439+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.008945+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.009835+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.010310+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.013542+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.014083+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.015327+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.018696+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.019217+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.021371+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.024864+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.025949+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.026528+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.029730+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.030452+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.031040+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.034705+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.036502+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.038037+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.046217+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.048290+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.055095+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.058401+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.059006+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.059720+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.063757+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.065363+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.068281+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.075692+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.076938+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.078490+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21] VERBOSE: ADAL API call [Version - 2.6.2] - In function: +[ADTokenCacheKey keyWithAuthority:resource:clientId:error:], file line #66 2018-04-10 19:07:21.083631+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:21.084747+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: No items were found for query 2018-04-10 19:07:21.089221+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:21 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: Requesting authorization code 2018-04-10 19:07:22.003260+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthShouldStartLoadRequest host: login.microsoftonline.com 2018-04-10 19:07:22.004238+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: login.microsoftonline.com 2018-04-10 19:07:22.005035+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: login.microsoftonline.com 2018-04-10 19:07:22.035732+0200 NICE[37405:1100618] ERROR: createEncodedCachedResponseAndRequestForXPCTransmission - Invalid protocol-property list - CFURLRequestRef. protoProps={ context = “<ADWebAuthRequest: 0x7b240001ea80>”; } 2018-04-10 19:07:22.036512+0200 NICE[37405:1100618] ADD: failed to create cache dictionary at path=/Users/med/Library/Developer/CoreSimulator/Devices/C409D0AA-756D-4850-A455-3D116D7A4C51/data/Containers/Data/Application/EB40C4CA-BAB1-4EBF-A757-487CDBFF6624/Library/Caches/com.hiboo.nice. key=0x7b34000105a0 2018-04-10 19:07:22.072586+0200 NICE[37405:1100618] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: login.microsoftonline.com 2018-04-10 19:07:22.073069+0200 NICE[37405:1100618] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: login.microsoftonline.com 2018-04-10 19:07:22.077773+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -[ADURLProtocol startLoading] - host: login.microsoftonline.com 2018-04-10 19:07:22.145396+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: session:task:didReceiveChallenge:completionHandler - nsurlauthenticationmethodservertrust. Previous challenge failure count: 0 2018-04-10 19:07:22.340347+0200 NICE[37405:1100582] Task <BA32BFC5-6320-4BA8-BDF8-90D7E6D07638>.<1> finished with error - code: -999 2018-04-10 19:07:22.341954+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthShouldStartLoadRequest host: unknown host 2018-04-10 19:07:22.342620+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.343328+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.344487+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -[ADURLProtocol stopLoading] - host: login.microsoftonline.com 2018-04-10 19:07:22.345045+0200 NICE[37405:1100630] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.345725+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:22.399065+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: session:task:didReceiveChallenge:completionHandler - nsurlauthenticationmethodservertrust. Previous challenge failure count: 0 2018-04-10 19:07:22.444674+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:22.777144+0200 NICE[37405:1100680] WF: === Starting WebFilter logging for process NICE 2018-04-10 19:07:22.778279+0200 NICE[37405:1100680] WF: _userSettingsForUser : (null) 2018-04-10 19:07:22.779233+0200 NICE[37405:1100680] WF: _WebFilterIsActive returning: NO 2018-04-10 19:07:22.861906+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthDidFinishLoad host: unknown host 2018-04-10 19:07:22.874427+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthShouldStartLoadRequest host: unknown host 2018-04-10 19:07:22.875525+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.876400+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.879478+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:22.879877+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: unknown host 2018-04-10 19:07:22.881442+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:22] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:23.019866+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:23.021219+0200 NICE[37405:1100680] WF: _userSettingsForUser : (null) 2018-04-10 19:07:23.021824+0200 NICE[37405:1100680] WF: _WebFilterIsActive returning: NO 2018-04-10 19:07:23.029547+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:23.030043+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: unknown host 2018-04-10 19:07:23.032867+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:23.033506+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: unknown host 2018-04-10 19:07:23.034722+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:23.051837+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:23.087656+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:23.088402+0200 NICE[37405:1100680] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: unknown host 2018-04-10 19:07:23.089837+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:23.218788+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:23.223722+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:23 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthDidFinishLoad host: unknown host 2018-04-10 19:07:24.920321+0200 NICE[37405:1100457] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don’t want. Try this: (1) look at each constraint and try to figure out which you don’t expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( “<NSAutoresizingMaskLayoutConstraint:0x7b14000c3c80 _UIToolbarContentView:0x7b54000d9a80.width == UIToolbar:0x7b54000dea80.width>”, “<NSLayoutConstraint:0x7b14000a82a0 _UIButtonBarStackView:0x7b54000f2a80.leading == _UIToolbarContentView:0x7b54000d9a80.leading + 8>”, “<NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>”, “<NSLayoutConstraint:0x7b14000c12a0 _UIModernBarButton:0x7b5c0000f880.leading == _UIButtonBarButton:0x7b540010dd80.leading + 8>”, “<NSLayoutConstraint:0x7b14000c12f0 _UIButtonBarButton:0x7b540010dd80.trailing >= _UIModernBarButton:0x7b5c0000f880.trailing + 8>”, “<NSLayoutConstraint:0x7b14000c1ac0 _UIModernBarButton:0x7b5c0000fc00.leading >= _UIButtonBarButton:0x7b540010ea00.leading + 5>”, “<NSLayoutConstraint:0x7b14000c1b10 _UIButtonBarButton:0x7b540010ea00.trailing >= _UIModernBarButton:0x7b5c0000fc00.trailing + 5>”, “<NSLayoutConstraint:0x7b14000c2740 _UIModernBarButton:0x7b5c000bfd80.leading == _UIButtonBarButton:0x7b540010ec80.leading + 8>”, “<NSLayoutConstraint:0x7b14000c2790 _UIButtonBarButton:0x7b540010ec80.trailing == _UIModernBarButton:0x7b5c000bfd80.trailing + 8>”, “<NSLayoutConstraint:0x7b14000c3050 UILayoutGuide:0x7b38000c73a0.leading == _UIButtonBarButton:0x7b540010dd80.leading>”, “<NSLayoutConstraint:0x7b14000c30a0 UILayoutGuide:0x7b38000c73a0.trailing == _UIButtonBarButton:0x7b540010ec80.trailing>”, “<NSLayoutConstraint:0x7b14000c30f0 UIView:0x7b5000121a00.leading == _UIButtonBarButton:0x7b540010dd80.trailing>”, “<NSLayoutConstraint:0x7b14000c3140 _UIButtonBarButton:0x7b540010ea00.leading == UIView:0x7b5000121a00.trailing>”, “<NSLayoutConstraint:0x7b14000c3190 UIView:0x7b5000121c00.leading == _UIButtonBarButton:0x7b540010ea00.trailing>”, “<NSLayoutConstraint:0x7b14000c31e0 _UIButtonBarButton:0x7b540010ec80.leading == UIView:0x7b5000121c00.trailing>”, “<NSLayoutConstraint:0x7b14000c3d70 UIToolbar:0x7b54000dea80.width == 0>”, “<NSLayoutConstraint:0x7b14000a8020 UILayoutGuide:0x7b38000c73a0.left == _UIButtonBarStackView:0x7b54000f2a80.left>”, “<NSLayoutConstraint:0x7b14000a8110 _UIButtonBarStackView:0x7b54000f2a80.right == UILayoutGuide:0x7b38000c73a0.right>” )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7b14000c12f0 _UIButtonBarButton:0x7b540010dd80.trailing >= _UIModernBarButton:0x7b5c0000f880.trailing + 8>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2018-04-10 19:07:24.923578+0200 NICE[37405:1100457] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don’t want. Try this: (1) look at each constraint and try to figure out which you don’t expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( “<NSAutoresizingMaskLayoutConstraint:0x7b14000c3c80 _UIToolbarContentView:0x7b54000d9a80.width == UIToolbar:0x7b54000dea80.width>”, “<NSLayoutConstraint:0x7b14000a82a0 _UIButtonBarStackView:0x7b54000f2a80.leading == _UIToolbarContentView:0x7b54000d9a80.leading + 8>”, “<NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>”, “<NSLayoutConstraint:0x7b14000c1ac0 _UIModernBarButton:0x7b5c0000fc00.leading >= _UIButtonBarButton:0x7b540010ea00.leading + 5>”, “<NSLayoutConstraint:0x7b14000c1b10 _UIButtonBarButton:0x7b540010ea00.trailing >= _UIModernBarButton:0x7b5c0000fc00.trailing + 5>”, “<NSLayoutConstraint:0x7b14000c2740 _UIModernBarButton:0x7b5c000bfd80.leading == _UIButtonBarButton:0x7b540010ec80.leading + 8>”, “<NSLayoutConstraint:0x7b14000c2790 _UIButtonBarButton:0x7b540010ec80.trailing == _UIModernBarButton:0x7b5c000bfd80.trailing + 8>”, “<NSLayoutConstraint:0x7b14000c3050 UILayoutGuide:0x7b38000c73a0.leading == _UIButtonBarButton:0x7b540010dd80.leading>”, “<NSLayoutConstraint:0x7b14000c30a0 UILayoutGuide:0x7b38000c73a0.trailing == _UIButtonBarButton:0x7b540010ec80.trailing>”, “<NSLayoutConstraint:0x7b14000c30f0 UIView:0x7b5000121a00.leading == _UIButtonBarButton:0x7b540010dd80.trailing>”, “<NSLayoutConstraint:0x7b14000c3140 _UIButtonBarButton:0x7b540010ea00.leading == UIView:0x7b5000121a00.trailing>”, “<NSLayoutConstraint:0x7b14000c3190 UIView:0x7b5000121c00.leading == _UIButtonBarButton:0x7b540010ea00.trailing>”, “<NSLayoutConstraint:0x7b14000c31e0 _UIButtonBarButton:0x7b540010ec80.leading == UIView:0x7b5000121c00.trailing>”, “<NSLayoutConstraint:0x7b14000c3d70 UIToolbar:0x7b54000dea80.width == 0>”, “<NSLayoutConstraint:0x7b14000a8020 UILayoutGuide:0x7b38000c73a0.left == _UIButtonBarStackView:0x7b54000f2a80.left>”, “<NSLayoutConstraint:0x7b14000a8110 _UIButtonBarStackView:0x7b54000f2a80.right == UILayoutGuide:0x7b38000c73a0.right>” )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7b14000c1b10 _UIButtonBarButton:0x7b540010ea00.trailing >= _UIModernBarButton:0x7b5c0000fc00.trailing + 5>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2018-04-10 19:07:24.925972+0200 NICE[37405:1100457] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don’t want. Try this: (1) look at each constraint and try to figure out which you don’t expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( “<NSAutoresizingMaskLayoutConstraint:0x7b14000c3c80 _UIToolbarContentView:0x7b54000d9a80.width == UIToolbar:0x7b54000dea80.width>”, “<NSLayoutConstraint:0x7b14000a82a0 _UIButtonBarStackView:0x7b54000f2a80.leading == _UIToolbarContentView:0x7b54000d9a80.leading + 8>”, “<NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>”, “<NSLayoutConstraint:0x7b14000c2740 _UIModernBarButton:0x7b5c000bfd80.leading == _UIButtonBarButton:0x7b540010ec80.leading + 8>”, “<NSLayoutConstraint:0x7b14000c2790 _UIButtonBarButton:0x7b540010ec80.trailing == _UIModernBarButton:0x7b5c000bfd80.trailing + 8>”, “<NSLayoutConstraint:0x7b14000c3050 UILayoutGuide:0x7b38000c73a0.leading == _UIButtonBarButton:0x7b540010dd80.leading>”, “<NSLayoutConstraint:0x7b14000c30a0 UILayoutGuide:0x7b38000c73a0.trailing == _UIButtonBarButton:0x7b540010ec80.trailing>”, “<NSLayoutConstraint:0x7b14000c30f0 UIView:0x7b5000121a00.leading == _UIButtonBarButton:0x7b540010dd80.trailing>”, “<NSLayoutConstraint:0x7b14000c3140 _UIButtonBarButton:0x7b540010ea00.leading == UIView:0x7b5000121a00.trailing>”, “<NSLayoutConstraint:0x7b14000c3190 UIView:0x7b5000121c00.leading == _UIButtonBarButton:0x7b540010ea00.trailing>”, “<NSLayoutConstraint:0x7b14000c31e0 _UIButtonBarButton:0x7b540010ec80.leading == UIView:0x7b5000121c00.trailing>”, “<NSLayoutConstraint:0x7b14000c3d70 UIToolbar:0x7b54000dea80.width == 0>”, “<NSLayoutConstraint:0x7b14000a8020 UILayoutGuide:0x7b38000c73a0.left == _UIButtonBarStackView:0x7b54000f2a80.left>”, “<NSLayoutConstraint:0x7b14000a8110 _UIButtonBarStackView:0x7b54000f2a80.right == UILayoutGuide:0x7b38000c73a0.right>” )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7b14000c2790 _UIButtonBarButton:0x7b540010ec80.trailing == _UIModernBarButton:0x7b5c000bfd80.trailing + 8>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2018-04-10 19:07:24.928236+0200 NICE[37405:1100457] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don’t want. Try this: (1) look at each constraint and try to figure out which you don’t expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( “<NSAutoresizingMaskLayoutConstraint:0x7b14000c3c80 _UIToolbarContentView:0x7b54000d9a80.width == UIToolbar:0x7b54000dea80.width>”, “<NSLayoutConstraint:0x7b14000a82a0 _UIButtonBarStackView:0x7b54000f2a80.leading == _UIToolbarContentView:0x7b54000d9a80.leading + 8>”, “<NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>”, “<NSLayoutConstraint:0x7b14000c3050 UILayoutGuide:0x7b38000c73a0.leading == _UIButtonBarButton:0x7b540010dd80.leading>”, “<NSLayoutConstraint:0x7b14000c30a0 UILayoutGuide:0x7b38000c73a0.trailing == _UIButtonBarButton:0x7b540010ec80.trailing>”, “<NSLayoutConstraint:0x7b14000c30f0 UIView:0x7b5000121a00.leading == _UIButtonBarButton:0x7b540010dd80.trailing>”, “<NSLayoutConstraint:0x7b14000c3140 _UIButtonBarButton:0x7b540010ea00.leading == UIView:0x7b5000121a00.trailing>”, “<NSLayoutConstraint:0x7b14000c3190 UIView:0x7b5000121c00.leading == _UIButtonBarButton:0x7b540010ea00.trailing>”, “<NSLayoutConstraint:0x7b14000c31e0 _UIButtonBarButton:0x7b540010ec80.leading == UIView:0x7b5000121c00.trailing>”, “<NSLayoutConstraint:0x7b14000c3d70 UIToolbar:0x7b54000dea80.width == 0>”, “<NSLayoutConstraint:0x7b14000a8020 UILayoutGuide:0x7b38000c73a0.left == _UIButtonBarStackView:0x7b54000f2a80.left>”, “<NSLayoutConstraint:0x7b14000a8110 _UIButtonBarStackView:0x7b54000f2a80.right == UILayoutGuide:0x7b38000c73a0.right>” )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7b14000c31e0 _UIButtonBarButton:0x7b540010ec80.leading == UIView:0x7b5000121c00.trailing>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2018-04-10 19:07:24.929930+0200 NICE[37405:1100457] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don’t want. Try this: (1) look at each constraint and try to figure out which you don’t expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you’re seeing NSAutoresizingMaskLayoutConstraints that you don’t understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( “<NSAutoresizingMaskLayoutConstraint:0x7b14000c3c80 _UIToolbarContentView:0x7b54000d9a80.width == UIToolbar:0x7b54000dea80.width>”, “<NSLayoutConstraint:0x7b14000a82a0 _UIButtonBarStackView:0x7b54000f2a80.leading == _UIToolbarContentView:0x7b54000d9a80.leading + 8>”, “<NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>”, “<NSLayoutConstraint:0x7b14000c3d70 UIToolbar:0x7b54000dea80.width == 0>” )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x7b14000a82f0 _UIButtonBarStackView:0x7b54000f2a80.trailing == _UIToolbarContentView:0x7b54000d9a80.trailing>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2018-04-10 19:07:24.984926+0200 NICE[37405:1100457] [Snapshotting] Snapshotting a view (0x7b5000078c00, UIInputSetHostView) that has not been rendered at least once requires afterScreenUpdates:YES. 2018-04-10 19:07:32.140729+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthShouldStartLoadRequest host: unknown host 2018-04-10 19:07:32.147095+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.148132+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.170958+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.171367+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canonicalRequestForRequest:] - host: unknown host 2018-04-10 19:07:32.172327+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:32.282985+0200 NICE[37405:1100603] Task <69459BE9-52A9-4883-986A-22C0EEA32A70>.<6> finished with error - code: -999 2018-04-10 19:07:32.284828+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] VERBOSE: -webAuthShouldStartLoadRequest host: unknown host 2018-04-10 19:07:32.286150+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.286658+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.287734+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:32.289246+0200 NICE[37405:1100613] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: +[ADURLProtocol canInitWithRequest:] handling host - host: unknown host 2018-04-10 19:07:32.290172+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:32] VERBOSE: -[ADURLProtocol startLoading] - host: unknown host 2018-04-10 19:07:32.314930+0200 NICE[37405:1100613] TIC Read Status [9:0x7b30000a0b00]: 1:54 2018-04-10 19:07:32.444425+0200 NICE[37405:1100613] TIC Read Status [10:0x7b300019d580]: 1:54 2018-04-10 19:07:32.519821+0200 NICE[37405:1100885] TIC Read Status [11:0x7b30001b0b40]: 1:54 2018-04-10 19:07:33.117761+0200 NICE[37405:1100613] TIC Read Status [12:0x7b30001afac0]: 1:54 2018-04-10 19:07:33.120521+0200 NICE[37405:1100613] Task <A8565F46-508F-4A96-9C85-9776C335CCA6>.<7> HTTP load failed (error code: -1005 [4:-4]) 2018-04-10 19:07:33.121252+0200 NICE[37405:1100603] Task <A8565F46-508F-4A96-9C85-9776C335CCA6>.<7> finished with error - code: -1005 2018-04-10 19:07:33.122030+0200 NICE[37405:1100591] NSURLConnection finished with error - code -1005 2018-04-10 19:07:33.123830+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] ERROR: -webAuthDidFailWithError error code -1005 2018-04-10 19:07:33.124978+0200 NICE[37405:1100687] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33] VERBOSE: -[ADURLProtocol stopLoading] - host: unknown host 2018-04-10 19:07:33.125535+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] ERROR: Error raised: (Domain: “NSURLErrorDomain” Code: -1005 ProtocolCode: “(null)” 2018-04-10 19:07:33.661391+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33 - 4FFCF554-B7CD-49C1-A523-796AC79583DB] INFO: ##### END failed { domain: NSURLErrorDomain code: -1005 protocolCode: (null) idtype = RequiredDisplayableId authority host: login.microsoftonline.com ##### 2018-04-10 19:07:33.666603+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33] WARNING: Removing all items for client 2018-04-10 19:07:33.668648+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33] INFO: Failed to get a wipe data or it does not exist 2018-04-10 19:07:33.669012+0200 NICE[37405:1100457] ADAL 2.6.2 iOS Sim 11.3 [2018-04-10 17:07:33] INFO: No items were found for query `

Please let me know when this bug will be fixed.

Best regards

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 34 (12 by maintainers)

Most upvoted comments

@terabytes The issue described here is -1005 - network connection lost. The issue on your screenshot is -1003 and it says that “a server with the specified hostname could not be found”. It’s a different issue, if you’re confident it’s an ADAL issue, please open a separate ticket. Looks like a server or DNS issue to me.

@supervixen I don’t think so. I think you’re not seeing SSO working.

Are you using brokered authentication (ADCredentialsType == AD_CREDENTIALS_AUTO)? Are you trying to get SSO working between different apps?

Also, SSO support between different apps through Authenticator app is quite limited for non device joined scenarios. Please refer to documentation here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-sso-ios#sso-concepts-in-the-microsoft-identity-platform

@supervixen The issue you’re seeing is a known issue and we’ve previously seen it on macOS: https://github.com/AzureAD/azure-activedirectory-library-for-objc/issues/1026

We’re addressing it during our larger code refactoring, but there shouldn’t be any implications to the authentication succeeding due to this particular warning you’re seeing. If it’s not true and you’re seeing authentication failing because of that, please let me know.

ADAL 2.6.3 should solve the issue until Apple releases the fix (https://github.com/AzureAD/azure-activedirectory-library-for-objc/releases/tag/2.6.3)

@pvroosendaal Following the docs (https://docs.microsoft.com/en-gb/xamarin/ios/app-fundamentals/backgrounding/ios-backgrounding-techniques/ios-backgrounding-with-tasks#performing-tasks-during-didenterbackground), I got it to work like so in AppDelegate.cs:

public override void DidEnterBackground(UIApplication application)
{
    base.DidEnterBackground(application);

    nint taskID = UIApplication.SharedApplication.BeginBackgroundTask(() => { });
    new Task(() =>
    {
            Thread.Sleep(20000);
        UIApplication.SharedApplication.EndBackgroundTask(taskID);
    }).Start();
}