SFSafariViewController not loading web pages on Xcode 16 Simulator with iOS 18

After updating Xcode to the latest version we observed that SFSafariViewController is not loading web pages on Xcode 16 Simulator with iOS 18, whenever it is presented the View Controller is empty (does not load any content) and the app freezes, but other screens that use WKWebView are working normally.

Also, during tests on physical devices with iOS 18 it seems to work just fine, so it might be just a IDE version problem.

Is anyone experiencing the same issue? If so, did anyone find a solution for it?

Answered by ruisebas in 806060022

I've seen this happening in iOS 18 simulators when you add arm64 to Excluded Architectures, or when you build using Rosetta. But it works fine on actual devices.

Is perhaps excluding the arm64 architecture no longer supported in iOS 18 simulators?

Hello @vhideo, I just tested this using Xcode 16.1 beta 2 and was not able to reproduce the issue you are describing. Are you able to demonstrate the issue in a test project created from one of Xcode's templates, and using only Apple APIs?

You can find tips on creating and sharing a test project in Creating a Test Project.

I have the same problem. I was using SFAuthenticationSession and updated to ASWebAuthenticationSession, but still the same issue. What I've found:

M1 Max + M1 Pro Mac + Xcode 16 + iOS 18 Simulator: App freezes M1 Max + M1 Pro Mac + Xcode 16 + iOS 17 Simulator: no issue Intel Mac + Xcode 16 + iOS 18 Simulator: no issue

I will start testing it with the Xcode 16.1 beta

You can select a different Simulator Version and run your app on that.

I too am struggling with this issue.

  • Xcode 16.0 + iOS 17.0 Simulator => No issue
  • Xcode 16.0 + iOS 18.0 Simulator => SafariViewController freezes
  • Xcode 16.0 + iOS 18.0 Real device => No issue

As additional information, this did not occur when I created a minimally configured project with Xcode 16.0.

My development environment:

  • MacBook Pro 2023
  • Apple M2 Pro
  • Xcode 16.0
  • iOS 18.0 Simulator

We are also facing the same issue. The App freezes, and it seems like the navbar is stuck behind the status bar. Done button is not clickable. I attached some images so you can see the difference with iOS 17.5

Accepted Answer

I've seen this happening in iOS 18 simulators when you add arm64 to Excluded Architectures, or when you build using Rosetta. But it works fine on actual devices.

Is perhaps excluding the arm64 architecture no longer supported in iOS 18 simulators?

Also experiencing the same issue but I need to build using Rosetta. So I'm a bit stuck!

I've created a little sample project to demonstrate the issue: https://github.com/pkurzok/SFSafariViewController-Freezes

Empty project that presents a SFSafariViewController.

SFSafariViewController always freezes, when running in a Rosetta Simulator. Filed FB15500299.

The same problem continues to occur with Xcode 16.1 RC.

I've got the same issue ever since Xcode 16.0 Beta 3. Hoped it would be fixed on the offical launch, but no. We're unable to update our release machine to Xcode 16 because of this

Still waiting for a solution, patch, update, workaround!!!

This problem occurred almost 6 months ago since the release of iOS 18.0 I will have to install the old 17.5 simulator AGAIN as a way to continue developing without issues

SFSafariViewController not loading web pages on Xcode 16 Simulator with iOS 18
 
 
Q