Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    Ultrashort orbital diffusion length | Nature Nanotechnology

    March 15, 2026

    swift – Replacing a SFSafariViewController in UITests for an iOS app

    March 15, 2026

    A preview of Nvidia’s 2026 GTC, which kicks off on March 16, where the company is expected to unveil new agentic-optimized CPUs, a CPU-only rack, and more (Katie Tarasov/CNBC)

    March 15, 2026
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»swift – Replacing a SFSafariViewController in UITests for an iOS app
    iOS Development

    swift – Replacing a SFSafariViewController in UITests for an iOS app

    big tee tech hubBy big tee tech hubMarch 15, 2026002 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    swift – Replacing a SFSafariViewController in UITests for an iOS app
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    I have some flows in my iOS app which require us to open an SFSafariViewController. One such example is a login flow which opens the SFSafariViewController for SSO purposes.

    We have a UITest which goes through this flow, opens the SFSafariViewController, we look for the close button and then subsequently tap it to dismiss the SFSafariViewController. This test passes locally but has been extremely flaky on CI especially since we opted to use iOS 26 devices.

    When I look at the videos in the XCTestResult, one thing I notice is that it takes extremely long for the SFSafariViewController to render and load.

    I was wondering if there was any way to replace or mock this with a custom view ?

    Two ideas that come to mind:

    1. Swizzle a custom view to replace what loads as the view in the SFSafariViewController – I have no idea how to do this but just reading up, was wondering if this is even a realistic solution and is it robust going forward on CI ?

    2. The other thing that comes to mind is creating some sort of a protocol, e.g WebViewProvider for example and the prod app implements it making use of an SFSafariViewController but the UITest uses a mock which is a normal view controller which can load faster. My only concern with this is that with SSO and similar things, how do we ensure call backs from this mock view which are provided by SFSafariViewController

    I hope to not bias you with the ideas mentioned, I just wanted to show that I’ve done some thinking before posting. My bigger question is more around if anyone faced similar problems and found a reliable replacement to using SFSafariViewController in your UITests that were reliable on CI as well?



    Source link

    app iOS replacing SFSafariViewController Swift UITests
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    android – Using a custom WebView instead of the main Capacitor WebView while still accessing all Capacitor plugins

    March 14, 2026

    ios – SwiftUI toolbar symbol change without popping

    March 13, 2026

    ios – SwiftUI iOS26+ Transition or Animation after TextField value entered

    March 12, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Ultrashort orbital diffusion length | Nature Nanotechnology

    March 15, 2026

    swift – Replacing a SFSafariViewController in UITests for an iOS app

    March 15, 2026

    A preview of Nvidia’s 2026 GTC, which kicks off on March 16, where the company is expected to unveil new agentic-optimized CPUs, a CPU-only rack, and more (Katie Tarasov/CNBC)

    March 15, 2026

    What it takes to fool facial recognition

    March 14, 2026
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    Ultrashort orbital diffusion length | Nature Nanotechnology

    March 15, 2026

    swift – Replacing a SFSafariViewController in UITests for an iOS app

    March 15, 2026

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2026 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.