<?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 Obioma Godswill Michael on Medium]]></title>
        <description><![CDATA[Stories by Obioma Godswill Michael on Medium]]></description>
        <link>https://medium.com/@mickymouze778?source=rss-1f1a7179e3e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5rKb5zhoyCs3Q0J2proB4g.jpeg</url>
            <title>Stories by Obioma Godswill Michael on Medium</title>
            <link>https://medium.com/@mickymouze778?source=rss-1f1a7179e3e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:30:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mickymouze778/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[APNs Token Registration Issues on iOS A Complete Debugging Journey]]></title>
            <link>https://medium.com/@mickymouze778/apns-token-registration-issues-on-ios-a-complete-debugging-journey-ca23c26b36fa?source=rss-1f1a7179e3e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca23c26b36fa</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Obioma Godswill Michael]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 16:55:38 GMT</pubDate>
            <atom:updated>2026-04-03T16:57:58.704Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>How a missing entitlement, a corrupted project file, and a few wrong paths cost hours of debugging and exactly how i fixed every single one.</blockquote><blockquote>The Problem</blockquote><p>You’ve set everything up. Firebase is configured. Your APNs key is uploaded. Push Notifications are enabled on the Apple Developer Portal. You run your Flutter app on a real device and immediately see this in your logs:</p><pre>❌ APNs REGISTRATION FAILED: no valid &quot;aps-environment&quot; entitlement string found for application<br>❌ Full error: Error Domain=NSCocoaErrorDomain Code=3000 &quot;no valid &quot;aps-environment&quot;<br>entitlement string found for application&quot;<br>UserInfo={NSLocalizedDescription=no valid &quot;aps-environment&quot; entitlement string found<br>for application}</pre><p>Frustrating. Everything looks right, yet nothing works. This article documents the exact journey of debugging this error from start to finish — every wrong turn, every fix, and every lesson learned.</p><h3>The App Setup</h3><ul><li><strong>Framework</strong>: Flutter</li><li><strong>Bundle ID</strong>: com.exmple.myapp.you</li><li><strong>Team</strong>: xxxxxxx</li><li><strong>Push service</strong>: Firebase Cloud Messaging (FCM)</li><li><strong>APNs key</strong>: Configured on both Apple Developer Portal and Firebase Console</li></ul><p>The AppDelegate.swift was already properly written to handle APNs registration and forward tokens to Firebase:</p><pre>override func application(<br>  _ application: UIApplication,<br>  didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?<br>) -&gt; Bool {<br>  FirebaseApp.configure()<br>  Messaging.messaging().delegate = self<br>  UNUserNotificationCenter.current().delegate = self<br>  application.registerForRemoteNotifications()<br>  GeneratedPluginRegistrant.register(with: self)<br>  return super.application(application, didFinishLaunchingWithOptions: launchOptions)<br>}</pre><pre>override func application(<br>  _ application: UIApplication,<br>  didFailToRegisterForRemoteNotificationsWithError error: Error<br>) {<br>  print(&quot;❌ APNs REGISTRATION FAILED: \(error.localizedDescription)&quot;)<br>  print(&quot;❌ Full error: \(error)&quot;)<br>}</pre><p>All of this was correct. So what was wrong?</p><h3>Root Cause #1: Push Notifications Capability Was Missing</h3><p>The first thing to check when you see this error is whether the <strong>Push Notifications capability</strong> is actually added to your Xcode target.</p><p>Opening <strong>Signing &amp; Capabilities</strong> revealed that only <strong>Background Modes → Remote notifications</strong> were checked, but the <strong>Push Notifications</strong> capability itself was never added. These are two completely different things:</p><ul><li><strong>Background Modes → Remote notifications</strong>: Allows the app to wake up in the background when a push arrives.</li><li><strong>Push Notifications capability</strong>: Grants the aps-environment entitlement that Apple requires before your app can even register with APNs.</li></ul><h3>Fix:</h3><ol><li>Go to <strong>Signing &amp; Capabilities</strong> in Xcode</li><li>Click <strong>+ Capability</strong></li><li>Search for and add <strong>Push Notifications</strong></li></ol><p>After adding it, Xcode showed <strong>Push Notifications (Profile)</strong> — note the <strong>(Profile)</strong> suffix. This means the capability was added in Xcode but the provisioning profile hadn’t been updated yet to include it.</p><h3>Root Cause #2: The Entitlements File Didn’t Exist on Disk</h3><p>Even after adding the capability, the error persisted. Xcode was referencing a file called RunnerProfile.entitlements in Build Settings, but the file had never actually been created on disk.</p><p>This is a surprisingly common Xcode quirk; it can add a reference to an entitlements file in the project without ever writing the actual file to the filesystem.</p><h3>Verification:</h3><pre>ls -la /Users/michael/StudioProjects/Billp-App/ios/Runner/RunnerProfile.entitlements<br># ls: No such file or directory</pre><p>Confirmed the file didn’t exist.</p><h3>Fix: Create the file manually:</h3><pre>cat &gt; /Users/michael/StudioProjects/Billp-App/ios/Runner/RunnerProfile.entitlements &lt;&lt; &#39;EOF&#39;<br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot;<br>  &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;<br>&lt;plist version=&quot;1.0&quot;&gt;<br>&lt;dict&gt;<br>    &lt;key&gt;aps-environment&lt;/key&gt;<br>    &lt;string&gt;development&lt;/string&gt;<br>&lt;/dict&gt;<br>&lt;/plist&gt;<br>EOF</pre><h3>Root Cause #3: Build Settings Only Pointed to Profile Scheme</h3><p>Even with the file created, there was another problem. In <strong>Build Settings → CODE_SIGN_ENTITLEMENTS</strong>, the entitlements file was only linked for the <strong>Profile</strong> scheme, not for <strong>Debug</strong> or <strong>Release</strong>.</p><p>This meant:</p><ul><li>Running on device (Debug) → No entitlements → APNs fails ❌</li><li>Archiving (Release) → No entitlements → Archive fails ❌</li></ul><h3>Fix:</h3><p>Go to <strong>Build Settings</strong> → search CODE_SIGN_ENTITLEMENTS → set all three rows to the same value:</p><p>Scheme Value Debug Runner/RunnerProfile.entitlements Profile Runner/RunnerProfile.entitlements Release Runner/RunnerProfile.entitlements</p><h3>Root Cause #4: Corrupted project.pbxproj (The Worst One)</h3><p>This is where things went sideways. In an attempt to clean up a trailing character issue in the entitlements path, a The sed command was run to strip trailing characters:</p><pre># This command was too aggressive<br>sed -i &#39;&#39; &#39;s|Runner/RunnerProfile.entitlements[^&quot;]*|Runner/RunnerProfile.entitlements|g&#39; \<br>  Runner.xcodeproj/project.pbxproj</pre><p>The [^&quot;]* pattern matched and removed the semicolons at the end of each CODE_SIGN_ENTITLEMENTS line, corrupting the project.pbxproj file. The result:</p><pre>xcodebuild: error: Unable to read project &#39;Runner.xcodeproj&#39;.<br>Reason: The project &#39;Runner&#39; is damaged and cannot be opened due to a parse error.<br>CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in<br>dictionary on line 505.</pre><p>Xcode couldn’t open the project at all.</p><h3>Fix: Restore the missing semicolons:</h3><pre>sed -i &#39;&#39; \<br>  &#39;s|CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements$|CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;|g&#39; \<br>  /Users/michael/StudioProjects/Billp-App/ios/Runner.xcodeproj/project.pbxproj</pre><p>Verify all three lines end with a semicolon:</p><pre>grep &quot;CODE_SIGN_ENTITLEMENTS&quot; Runner.xcodeproj/project.pbxproj<br># CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;<br># CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;<br># CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;</pre><h3>Root Cause #5: development vs production for Archive Builds</h3><p>After fixing the project file, the app ran successfully in debug mode — APNs TOKEN ARRIVED Finally appeared in the logs. But archiving for App Store submission still failed because the entitlements file had development instead of production.</p><p>Apple requires:</p><ul><li>development for debug/testing builds</li><li>production for App Store / TestFlight builds</li></ul><h3>Fix for archiving:</h3><pre>sed -i &#39;&#39; \<br>  &#39;s/&lt;string&gt;development&lt;\/string&gt;/&lt;string&gt;production&lt;\/string&gt;/&#39; \<br>  /Users/michael/StudioProjects/Billp-App/ios/Runner/RunnerProfile.entitlements</pre><p>After archiving, switch back to development:</p><pre>sed -i &#39;&#39; \<br>  &#39;s/&lt;string&gt;production&lt;\/string&gt;/&lt;string&gt;development&lt;\/string&gt;/&#39; \<br>  /Users/michael/StudioProjects/Billp-App/ios/Runner/RunnerProfile.entitlements</pre><h3>The Proper Long-Term Setup</h3><p>To avoid manually switching between development and production, the recommended approach is to have separate entitlements files per scheme:</p><p><strong>Runner.entitlements</strong> (for Debug):</p><pre>&lt;key&gt;aps-environment&lt;/key&gt;<br>&lt;string&gt;development&lt;/string&gt;</pre><p><strong>RunnerProfile.entitlements</strong> (for Release/Archive):</p><pre>&lt;key&gt;aps-environment&lt;/key&gt;<br>&lt;string&gt;production&lt;/string&gt;</pre><p>Then in <strong>Build Settings → CODE_SIGN_ENTITLEMENTS</strong>:</p><p>Scheme File Debug Runner/Runner.entitlements Profile Runner/RunnerProfile.entitlements Release Runner/RunnerProfile.entitlements</p><h3>Complete Checklist</h3><p>Use this checklist any time you hit APNs registration issues on iOS:</p><ul><li><strong>Apple Developer Portal</strong>: Push Notifications enabled for your App ID</li><li><strong>Xcode Signing &amp; Capabilities</strong>: Push Notifications capability added (not just Background Modes)</li><li><strong>Entitlements file exists on disk</strong>: Not just referenced in Xcode, but physically present</li><li><strong>Entitlements file content</strong>: Contains aps-environment key with correct value</li><li><strong>Build Settings</strong>: CODE_SIGN_ENTITLEMENTS set for Debug, Profile, AND Release</li><li><strong>Semicolons present</strong>: Every line in project.pbxproj ends with ;</li><li><strong>Firebase Console</strong>: APNs Auth Key uploaded with correct Key ID and Team ID</li><li><strong>Testing on real device</strong>: APNs does not work on Simulator</li><li><strong>Bundle ID matches</strong>: Xcode bundle ID matches Apple Developer Portal App ID exactly</li><li><strong>development vs production</strong>: Correct value for your build type</li></ul><h3>Key Takeaways</h3><p><strong>1. Background Modes ≠ Push Notifications capability.</strong> You need both. Remote notifications in Background Modes allow background wake-up. The Push Notifications capability grants the actual APNs entitlement.</p><p><strong>2. Xcode can reference files that don’t exist.</strong> Always verify the entitlements file physically exists on disk, not just in Xcode’s project navigator.</p><p><strong>3. Be careful with </strong><strong>sed on </strong><strong>project.pbxproj.</strong> The project file uses semicolons as delimiters. Any regex that strips trailing characters can accidentally remove them and corrupt the entire project.</p><p><strong>4. Always open Flutter iOS projects as </strong><strong>.xcworkspace, not </strong><strong>.xcodeproj.</strong> After pod install, The workspace file is the only correct entry point. Opening .xcodeproj directly will fail or behave unexpectedly.</p><p><strong>5. The The </strong><strong>(Profile) label in Signing &amp; Capabilities is a warning.</strong> If a capability shows (Profile) next to its name, it means Xcode added it but the provisioning profile hasn&#39;t synced yet. Force a refresh via Xcode → Settings → Accounts → Download Manual Profiles.</p><h3>Final Result</h3><p>After working through all five root causes, the app logs finally showed:</p><pre>🚀 AppDelegate: didFinishLaunching called<br>🔥 Firebase configured successfully<br>📨 Messaging delegate set<br>🔔 Notification center delegate set<br>📲 registerForRemoteNotifications called<br>✅ APNs TOKEN ARRIVED: a1b2c3d4e5f6...<br>✅ APNs token forwarded to Firebase Messaging<br>✅ FCM Token received in AppDelegate: fXyZ...</pre><p>Push notifications are working. Archive building. App Store submission ready.</p><p><em>If this article helped you, consider clapping and sharing it — APNs debugging is painful and more developers need a clear guide through it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca23c26b36fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Before Getting Started With Flutter]]></title>
            <link>https://medium.com/@mickymouze778/before-getting-started-with-flutter-6397edb95a90?source=rss-1f1a7179e3e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6397edb95a90</guid>
            <dc:creator><![CDATA[Obioma Godswill Michael]]></dc:creator>
            <pubDate>Sun, 10 Sep 2023 03:18:38 GMT</pubDate>
            <atom:updated>2023-09-10T03:18:38.457Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*lVBSqjmEIrrUTFkX8PS4Fg.png" /></figure><h4>Introduction</h4><p>Flutter has recently gained immense popularity as a versatile framework for building cross-platform mobile applications. Its rich set of widgets, fast development cycle, and strong community support make it an excellent choice for beginners and experienced developers. However, before diving into Flutter development, it is crucial to have a solid grasp of Dart, the programming language used to build Flutter apps.</p><p>Dart is the backbone of Flutter, providing the language features and libraries necessary to create robust mobile applications. In this article, we will explore the essential concepts in Dart that every beginner should understand before embarking on their Flutter journey. These concepts include:</p><p><strong>1. Variables and Data Types</strong></p><p>Variables are used to store data in a program. Dart has various data types like int, double, String, bool, and more. Understanding how to declare variables and their data types is fundamental in Dart.</p><p><strong>2. Functions and Control Flow</strong></p><p>Functions are reusable blocks of code that perform specific tasks. Dart supports conditional statements like if-else and loops like for and while which are essential for controlling program flow.</p><p><strong>3. Lists and Maps</strong></p><p>Lists and maps are collections used to store multiple values. Understanding how to work with lists and maps is crucial for managing data in your Flutter app.</p><p><strong>4. Classes and Objects</strong></p><p>Classes are blueprints for creating objects, which encapsulate data and behavior. Classes are a fundamental concept in object-oriented programming (OOP).</p><p><strong>5. Constructors</strong></p><p>Constructors are special methods used to create objects from classes. Understanding how to define and use constructors is essential for building custom objects in Dart.</p><p><strong>6. Inheritance</strong></p><p>Inheritance allows you to create new classes based on existing ones, inheriting their properties and behaviors. This promotes code reuse and organization.</p><p><strong>7. Polymorphism</strong></p><p>Polymorphism enables objects of different classes to be treated as objects of a common superclass. It promotes flexibility in your code.</p><p><strong>8. Encapsulation</strong></p><p>Encapsulation is the practice of hiding the internal details of an object and providing controlled access to its properties and methods.</p><p><strong>9. Getters and Setters</strong></p><p>Getters and setters allow you to control access to an object’s properties. They are essential for maintaining data integrity.</p><p><strong>10. Async and Await</strong></p><p>Dart provides asynchronous programming capabilities using the `async` and `await` keywords. This is vital for handling tasks like network requests without blocking the application’s main thread.</p><p><strong>11. Exception Handling</strong></p><p>Exception handling enables you to gracefully handle errors and unexpected situations in your code using try-catch blocks.</p><p><strong>12. Enums</strong></p><p>Enums define a set of constant values. They are useful for representing a fixed set of related values.</p><p><strong>Conclusion</strong></p><p><em>Before you start building Flutter applications, it’s crucial to have a strong foundation in Dart. The concepts mentioned above are the building blocks of Dart programming and will greatly enhance your ability to create robust, efficient, and maintainable Flutter apps. Take the time to study and practice these concepts, as they are essential for your journey into the exciting world of Flutter development.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6397edb95a90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>