<?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 Sattar Hummatli on Medium]]></title>
        <description><![CDATA[Stories by Sattar Hummatli on Medium]]></description>
        <link>https://medium.com/@hummatli?source=rss-c74a1a3ed235------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*V-ZCGRfJJsZhNVNkHNbPGg.png</url>
            <title>Stories by Sattar Hummatli on Medium</title>
            <link>https://medium.com/@hummatli?source=rss-c74a1a3ed235------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:25:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hummatli/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[Testing Push Notifications on iOS Simulators: A Practical Guide]]></title>
            <link>https://medium.com/@hummatli/testing-push-notifications-on-ios-simulators-a-practical-guide-ac576f08a440?source=rss-c74a1a3ed235------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac576f08a440</guid>
            <category><![CDATA[firebasepushnotification]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-simulator]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Sattar Hummatli]]></dc:creator>
            <pubDate>Wed, 31 May 2023 07:17:30 GMT</pubDate>
            <atom:updated>2023-05-31T07:30:39.051Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re an iOS developer and don’t have a real iPhone, you’ve likely faced the challenge of testing push notifications on iOS Simulators. The reason for this is that iOS Simulators do not support all features of real Apple devices, particularly push notifications, including those from Firebase Cloud Messaging (FCM) and other remote notifications. This has always made it challenging to conduct comprehensive testing for apps utilizing these features. <a href="https://stackoverflow.com/questions/63942759/test-fcm-notification-on-ios-simulator">The problem.</a></p><blockquote>However, with the release of Xcode 11.4, Apple has introduced a new tool that allows developers to simulate push notifications on iOS Simulators. This feature is a game-changer for developers and testers, and this article will guide you on how to use it effectively.</blockquote><h4>The Solution from Apple</h4><p>Starting from Xcode 11.4, it’s now possible to simulate push notifications on iOS Simulators. Apple’s inclusion of this feature provides developers and testers an environment that closely mimics the behavior of real devices. <a href="https://chat.openai.com/c/ae84396c-72bf-4132-87ef-a8835c462c65#">Official resource</a></p><h4>Implementing the Solution in Your Project</h4><p>To test this feature, you can create an FCM message template and use send it to simulator. Here’s a sample push template you can utilize:</p><pre>{<br>  &quot;aps&quot; : {<br>    &quot;alert&quot; : {<br>      &quot;title&quot; : &quot;Your push title&quot;,<br>      &quot;subtitle&quot; : &quot;Your push subtitle&quot;,<br>      &quot;body&quot; : &quot;Your push body&quot;<br>    }<br>  },<br>  &quot;gcm.message_id&quot;:&quot;&lt;any_number&gt;&quot;, //Example 1234<br>  &quot;sample_key&quot;: &quot;sample payload data&quot;<br>}</pre><h4><strong>Understanding the Template</strong></h4><ul><li>alert: This field contains all the information about the notification UI, such as the title, subtitle, and body of the push notification.</li><li>gcm.message_id: This is specific to FCM messages. The value is arbitrary, and Firebase uses it to track and differentiate messages. In some instances, you might not receive a message while the app is in terminated mode. Changing this value often solves this issue.</li><li>sample_key: This is a custom key-value pair from your data payload for FCM. You can add any kind of pair if you wish.</li></ul><h4>Sending the Push Notification</h4><p>To send the template, use the following command in the terminal (replace booted with the name of any booted iOS Simulator):</p><pre>xcrun simctl push booted &lt;your.bundle.identifier&gt; path/to/your/template.json</pre><h3>Conclusion</h3><p><em>Simulating push notifications on iOS Simulators has become significantly easier with Xcode 11.4. While it doesn’t replace testing on real devices, it gives developers and testers an additional tool to ensure the robustness of their applications. Keep coding, and happy testing!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac576f08a440" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>