<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: FitStreak</title>
    <description>The latest articles on DEV Community by FitStreak (@fitstreak_app).</description>
    <link>https://dev.to/fitstreak_app</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4143921%2F939a7158-b8f4-4d36-bffb-326668b810bc.png</url>
      <title>DEV Community: FitStreak</title>
      <link>https://dev.to/fitstreak_app</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fitstreak_app"/>
    <language>en</language>
    <item>
      <title>The Expo native module that compiled in every build and was never registered</title>
      <dc:creator>FitStreak</dc:creator>
      <pubDate>Sat, 26 Sep 2026 07:32:45 +0000</pubDate>
      <link>https://dev.to/fitstreak_app/the-expo-native-module-that-compiled-in-every-build-and-was-never-registered-19mc</link>
      <guid>https://dev.to/fitstreak_app/the-expo-native-module-that-compiled-in-every-build-and-was-never-registered-19mc</guid>
      <description>&lt;p&gt;I build FitStreak solo: a workout-habit app for iPhone, with a home-screen widget and an Apple Watch app. The app itself is React Native + Expo. The widget, the Watch app, its complication and the Shortcuts intents are native Swift targets that share data with the app through App Groups, via a small local native module (&lt;code&gt;WidgetData&lt;/code&gt;) that writes to the shared container and pushes payloads to the Watch over WatchConnectivity.&lt;/p&gt;

&lt;p&gt;For several releases, the widget and the Watch received nothing on real devices. No crash, no visible error. And every signal said things were fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything was green
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The EAS build passed.&lt;/li&gt;
&lt;li&gt;Code signing and App Store validation passed.&lt;/li&gt;
&lt;li&gt;The module's class was inside the IPA.&lt;/li&gt;
&lt;li&gt;Locally, every Swift target compiled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The actual cause
&lt;/h2&gt;

&lt;p&gt;The module's podspec sat at the module root. React Native's autolinking found it and compiled the pod into the app. But Expo's module &lt;code&gt;resolve&lt;/code&gt; step only searches subdirectories, so the module was never written into the generated &lt;code&gt;ExpoModulesProvider.swift&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;requireNativeModule('WidgetData')&lt;/code&gt; threw on every real launch, our JS caught it, and every widget write, &lt;code&gt;WidgetCenter&lt;/code&gt; reload and WatchConnectivity send became a silent no-op.&lt;/p&gt;

&lt;p&gt;The fix was one line in &lt;code&gt;expo-module.config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"platforms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"apple"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"apple"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"podspecPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"WidgetData.podspec"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"modules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"WidgetDataModule"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also added a Jest test that runs Expo's real resolver against the repo and fails if the module isn't registered, so this can't silently regress.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it was finally found
&lt;/h2&gt;

&lt;p&gt;Not from any build output. From the phone's unified log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;log collect &lt;span class="nt"&gt;--device-udid&lt;/span&gt; &amp;lt;hardware UDID from &lt;span class="sb"&gt;`&lt;/span&gt;xcrun xctrace list devices&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
log show &lt;span class="nt"&gt;--predicate&lt;/span&gt; &lt;span class="s1"&gt;'process == "wcd"'&lt;/span&gt; system_logs.logarchive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An app with a working &lt;code&gt;WCSession&lt;/code&gt; shows up as a &lt;code&gt;wcd&lt;/code&gt; client within seconds of launch. Ours never did. That was the thread to pull.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson
&lt;/h2&gt;

&lt;p&gt;Compiling, signing and passing App Store validation are three separate gates, and none of them proves a native module is &lt;em&gt;registered&lt;/em&gt;. If you ship native targets or local modules alongside Expo, test registration, not just compilation. And when a native feature is "silently doing nothing", go to the device log before you trust any green checkmark.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;FitStreak, if you're curious: guided daily workouts with step-by-step demos, 30-day programs, streaks where a planned rest day doesn't break the streak, chair and low-impact options, and a companion pet that grows with your streak. Free on the App Store, with an optional subscription:&lt;/em&gt; &lt;a href="https://apps.apple.com/app/id6759306186" rel="noopener noreferrer"&gt;https://apps.apple.com/app/id6759306186&lt;/a&gt;&lt;/p&gt;

</description>
      <category>swiftaginput</category>
      <category>iostaginput</category>
      <category>reactnativetaginput</category>
    </item>
  </channel>
</rss>
