<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dogancan Mavideniz on Medium]]></title>
        <description><![CDATA[Stories by Dogancan Mavideniz on Medium]]></description>
        <link>https://medium.com/@mavideniz?source=rss-2e5b6f07fc9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*z0z3acXLblRcu1cUy2Hphg.png</url>
            <title>Stories by Dogancan Mavideniz on Medium</title>
            <link>https://medium.com/@mavideniz?source=rss-2e5b6f07fc9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 21:10:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mavideniz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Scroll Problem in iOS UI Tests and How XCScrollHelper Solves It]]></title>
            <link>https://medium.com/trendyol-tech/the-scroll-problem-in-ios-ui-tests-and-how-xcscrollhelper-solves-it-3bfe5d6f072c?source=rss-2e5b6f07fc9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bfe5d6f072c</guid>
            <category><![CDATA[xctest]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ui-testing]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Dogancan Mavideniz]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 08:42:06 GMT</pubDate>
            <atom:updated>2026-07-30T08:42:06.209Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FdOEiI91nE_k6MOSWj1mQw.png" /></figure><p>If you asked most iOS developers what wastes the most time when writing UI tests, many would give the same answer: scrolling. Reaching an off-screen element, tapping it, verifying it’s in the right position… It sounds simple, but in practice it’s a real engineering problem.</p><p>In this post, we’ll walk through how we hit this problem on the Trendyol iOS team, why existing solutions fell short, and how we solved it with XCScrollHelper. The library was built by <a href="https://github.com/mineOz">Mine Oz</a> at Trendyol, and we worked together to open-source it for the community.</p><h3>The Problem</h3><p>In an e-commerce app, screens are typically made up of long, scrollable lists. Campaign banners, product carousels, category grids, recommendation sections, all stacked inside a single UICollectionView or UIScrollView, often well below the visible area.</p><p>For snapshot tests, we need to verify these screens in different states. That means scrolling to the relevant component and capturing the screen at that point. With the standard XCTest approach, this is what it looks like:</p><pre>let maxSwipes = 30<br>var swipeCount = 0<br>while !targetCell.exists &amp;&amp; swipeCount &lt; maxSwipes {<br>    collectionView.swipeUp(velocity: .fast)<br>    swipeCount += 1<br>}</pre><p>Does this work? Yes, most of the time. But it has a few critical issues:</p><p>1. It’s slow. Each swipeUp() call requires XCTest to simulate an animation, wait for the UI to settle, and re-scan the accessibility tree. A single swipe takes roughly 0.5 to 1 second. If your target is 20 swipes away, the scroll alone takes 10 to 20 seconds.</p><p>2. It’s unreliable. Swipe distance varies depending on device size, dynamic type settings, and cell height. An element that takes 15 swipes to find today might need 20 after a layout change. You have to set maxSwipes high enough to cover the worst case, which makes the test even slower.</p><p>3. There’s no precise positioning. Even after finding the element, you can’t control exactly where it sits on screen. For snapshot tests, this matters: whether a component appears at the top, center, or bottom of the viewport determines whether the test passes or fails.</p><h3>What Does XCScrollHelper Do?</h3><p>XCScrollHelper completely bypasses XCTest’s swipe-loop mechanics. Instead, it establishes file-based communication between the app process and the test process, and performs the scroll programmatically.</p><p>Here’s how it works:</p><ol><li>The UI test creates a JSON file inside the simulator’s shared resources directory and writes the target element’s accessibility identifier and desired scroll position into it.</li><li>A FileMonitor on the app side detects the file change.</li><li>ComponentScrollHelper uses the UICollectionView&#39;s layout attributes to calculate the exact coordinates of the target element.</li><li>It calls setContentOffset to scroll directly to that point: no swipe animation, no waiting.</li><li>The app writes the result (success/failure) back to the same file.</li><li>The test side polls the file, reads the result, and continues.</li></ol><p>The key insight: we never touch XCTest’s scroll mechanism. The app calls setContentOffset internally, which completes in milliseconds.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCh2iJ_8gi1Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCh2iJ_8gi1Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCh2iJ_8gi1Y%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d76ac5c42f665a3a5d63d57cec4ad76/href">https://medium.com/media/3d76ac5c42f665a3a5d63d57cec4ad76/href</a></iframe><h3>The Numbers</h3><p>The Trendyol iOS project currently has 2,889 snapshot test methods across 528 test files. Every single one of them opens a page via deeplink, scrolls to a specific component, and captures the screen.</p><p>With the classic swipe-loop approach, a single scroll operation takes an average of 25 seconds. With XCScrollHelper, the same operation takes 5 seconds. That’s a 5x improvement.</p><p>Scale that across the entire test suite and the savings add up fast. In CI pipelines that run dozens of times a day, this translates directly into faster feedback for developers on their pull requests.</p><h3>Usage</h3><h4>App Side</h4><p>Start the observer in your AppDelegate:</p><pre>import XCScrollHelper<br><br>func application(_ application: UIApplication,<br>                 didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {<br>    UITestAutomationObserver.shared.start()              // CollectionView support<br>    UITestAutomationObserver.shared.startForScrollView()  // ScrollView support<br>    return true<br>}</pre><h4>Test Side</h4><p>One line instead of a swipe loop:</p><pre>import XCScrollHelper<br><br>// Classic approach: fragile and slow<br>let maxSwipes = 30<br>var swipeCount = 0<br>while !targetCell.exists &amp;&amp; swipeCount &lt; maxSwipes {<br>    collectionView.swipeUp(velocity: .fast)<br>    swipeCount += 1<br>}<br><br>// XCScrollHelper: fast and reliable<br>let result = XCScrollTestHelper.shared.scrollToCell(<br>    elementIdentifier: &quot;campaign_banner&quot;,<br>    in: &quot;homeCollectionView&quot;,<br>    position: .top<br>)<br>XCTAssertTrue(result.isSuccess)</pre><p>It handles section headers, footers, and horizontal collection views just as easily:</p><pre>// Scroll to a section header<br>XCScrollTestHelper.shared.scrollToCell(<br>    elementIdentifier: &quot;header_recommendations&quot;,<br>    in: &quot;homeCollectionView&quot;,<br>    position: .top,<br>    type: .elementKindSectionHeader<br>)<br>// Scroll to a cell in a horizontal collection view<br>XCScrollTestHelper.shared.scrollToCell(<br>    elementIdentifier: &quot;product_card_42&quot;,<br>    in: &quot;horizontalCarousel&quot;,<br>    position: .leading<br>)<br>// Scroll to a subview inside a plain UIScrollView<br>XCScrollTestHelper.shared.scrollToView(<br>    targetIdentifier: &quot;address_form&quot;,<br>    in: &quot;checkoutScrollView&quot;<br>)</pre><h3>Why Programmatic Scroll Instead of Swipes?</h3><p>This distinction is worth expanding on, because “why not just use XCTest’s built-in scrolling?” is a natural question.</p><p>In XCTest, scrolling goes through the UI layer. The framework simulates a real user interaction: finger down, drag, finger up. At each step, the accessibility tree updates, animations complete, and layout passes run. This is the right approach for functional tests, because you’re testing what the user actually experiences.</p><p>But snapshot tests have a different goal. We’re not testing the scroll experience. We’re verifying how a specific component looks in a specific data state. Scrolling is a means to an end, not the test itself. Spending 25 seconds simulating a realistic scroll adds no value here.</p><p>XCScrollHelper uses UICollectionViewLayout&#39;s layoutAttributesForItem(at:) to get the target cell&#39;s frame directly from the layout engine. Then it moves the collection view to those coordinates with setContentOffset. No animation, no swipe simulation. That&#39;s why it&#39;s fast.</p><h3>Built-in Retry Logic</h3><p>In the real world, things don’t always work on the first try. Cells might not be loaded yet, the data source might not have updated, the layout might not have been calculated. XCScrollHelper accounts for this with a built-in retry mechanism.</p><p>When ComponentScrollHelper can&#39;t find the target element, it scrolls forward through the visible cells and keeps looking. It retries up to 9 times before giving up. This makes it reliable even with collection views that load data lazily.</p><h3>What It Changed for Us</h3><p>After integrating XCScrollHelper into the Trendyol iOS project, here’s what we observed:</p><ul><li>Test durations dropped. An average 5x speedup on tests that involve scrolling. Saving 20 seconds per test adds up across the suite.</li><li>Flaky test rate decreased. Tests that depended on swipe counts were affected by device and layout changes. Programmatic scrolling eliminated that variable.</li><li>Writing tests became easier. Developers no longer need boilerplate scroll code. A single method call gets them to the component they need.</li><li>CI feedback got faster. Faster tests mean a shorter PR review cycle.</li></ul><h3>Conclusion</h3><p>Scrolling in UI tests is more expensive than it looks. Especially in scenarios like snapshot testing, where the scroll itself doesn’t matter and only the result does, the classic swipe-loop approach introduces unnecessary slowness and fragility.</p><p>XCScrollHelper solves this at the root by establishing file-based communication between the app and test processes. We actively use it at Trendyol across all 2,889 snapshot tests, and it has become a critical part of our test infrastructure.</p><p>The project is open source under the MIT license: <a href="http://github.com/Trendyol/XCScrollHelper">github.com/Trendyol/XCScrollHelper</a></p><h3>About Us</h3><p>We’re building a team of the brightest minds in our industry. Interested in joining us? Visit the pages below to learn more about our open positions.</p><p><a href="https://careers.trendyol.com/tr"><strong>Trendyol Careers</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bfe5d6f072c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/the-scroll-problem-in-ios-ui-tests-and-how-xcscrollhelper-solves-it-3bfe5d6f072c">The Scroll Problem in iOS UI Tests and How XCScrollHelper Solves It</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[App Review Request in iOS]]></title>
            <link>https://medium.com/appcent/app-review-request-in-ios-c8c4df464257?source=rss-2e5b6f07fc9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8c4df464257</guid>
            <category><![CDATA[storekit]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[request]]></category>
            <category><![CDATA[review]]></category>
            <dc:creator><![CDATA[Dogancan Mavideniz]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 08:36:31 GMT</pubDate>
            <atom:updated>2024-04-19T13:01:02.548Z</atom:updated>
            <content:encoded><![CDATA[<p>You can access the entire blog for <a href="https://www.dogancan.dev/articles/app-review-request-in-ios/">free on my personal blog.</a></p><p>An important task that mobile app developers often face is encouraging users to rate and write reviews of their apps on the App Store or Google Play Store. In addition to increasing the popularity of the app, this can help you improve your app by getting users feedback. In this article, we will learn the best methods to request user ratings and reviews on the iOS platform. We will also look at how you can implement this process in both development frameworks with UIKit and SwiftUI. However, we will also offer important tips on when and where you should ask for user ratings and reviews. Here’s an introduction to the basics of requesting app ratings and reviews. Now, let’s get to work!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*P_feK7I_-5cwDsTwJErPCQ.png" /></figure><p>There are a few different ways you can request user ratings and reviews in SwiftUI and UIKit. In this article, we will use the “<strong>StoreKit</strong>” library, which is available for both frameworks. This framework allows you to direct the user to the App Store and ask them to leave a review. Let’s take a look at how you can do this with SwiftUI.</p><pre>import StoreKit<br>import SwiftUI<br><br>struct ContentView: View {<br>    @Environment(\.requestReview) var requestReview<br><br>    var body: some View {<br>        Button(&quot;Rate us&quot;) {<br>            requestReview()<br>        }<br>    }<br>}</pre><p>As you can see, with the StoreKit library, it is possible to do this with just a few lines. When using this method in your application, do not forget to import the StoreKit library on the relevant class/struct.</p><p>Let’s take a look at how it is done in UIKit.</p><pre>@objc func requestReview() {<br>        SKStoreReviewController.requestReview()<br>    }</pre><p>As you can see in the example above, it is possible to create the function with only a single line.</p><h3>When should we use it?</h3><p>The best time to get feedback from users is usually after they complete an action within the app or after a period of usage. For example, asking for a review or rating after the user has used your app a few times and spent a few days with it can help the user better evaluate your app and have a more positive experience. Users tend to leave positive reviews after having a good experience. However, asking for a review after a paywall in front of the user will probably result in disappointment.</p><h3>What are the benefits?</h3><p>Asking users for reviews has several important benefits. First, user ratings and reviews can increase your app’s visibility. More positive reviews increase the chances of attracting potential new users and ranking your app higher in the App Store. Reviews also show the reliability and quality of your app, which helps users have more trust in your app. Additionally, user feedback helps you identify your app’s bugs and shortcomings and continually improve your app by fixing these issues. It also helps you create a loyal user base by increasing user satisfaction. Ultimately, asking for user ratings and reviews helps you improve your app, attract more users, and represents an important step towards developing a successful app.</p><h3>Conclusion</h3><p>In this blog post, we learned about the importance of asking for user ratings and reviews and how it is a useful strategy for app developers. We looked at how we could achieve this with both UIKit and SwiftUI and realized how critical it is to choose the right time and consider the user experience. Using this strategy, you can deliver your application to more users, improve it using feedback, and increase success. By following this guide, you can take steps to make your iOS application better.</p><p>For more similar articles, you can visit <a href="https://www.dogancan.dev/">dogancan.dev</a> and send your feedback or suggestions to <a href="/service/mailto:hi@dogancan.dev">hi@dogancan.dev.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8c4df464257" width="1" height="1" alt=""><hr><p><a href="https://medium.com/appcent/app-review-request-in-ios-c8c4df464257">App Review Request in iOS</a> was originally published in <a href="https://medium.com/appcent">Appcent</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>