<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in EXDevLauncherBundleURLProviderInterceptor.swift</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>765b47da - [ios] Fix lint issues in Swift files (#15640)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-dev-launcher/ios/ReactNative/EXDevLauncherBundleURLProviderInterceptor.swift#765b47da</link>
        <description>[ios] Fix lint issues in Swift files (#15640)

            List of files:
            /expo/packages/expo-dev-launcher/ios/ReactNative/EXDevLauncherBundleURLProviderInterceptor.swift</description>
        <pubDate>Thu, 30 Dec 2021 16:20:40 +0000</pubDate>
        <dc:creator>Tomasz Sapeta &lt;tomasz.sapeta@swmansion.com&gt;</dc:creator>
    </item>
<item>
        <title>d5087a6c - [dev-launcher] Fix app hanging on the splash screen on iOS. (#12971)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/expo-dev-launcher/ios/ReactNative/EXDevLauncherBundleURLProviderInterceptor.swift#d5087a6c</link>
        <description>[dev-launcher] Fix app hanging on the splash screen on iOS. (#12971)# WhyCloses ENG-1133.I noticed that the app contains a weird file called `ip.txt`.When you build your app with the eas, it&#8217;ll contain an IP of the builder - that IP will be outside of your network.Unfortunately, RN tries to ping this address:https://github.com/facebook/react-native/blob/b67dc01d1d52a9d12a1b9c807f6f89dd8490131a/React/Base/RCTBundleURLProvider.mm#L105-L108https://github.com/facebook/react-native/blob/b67dc01d1d52a9d12a1b9c807f6f89dd8490131a/React/Base/RCTBundleURLProvider.mm#L112-L115We can&apos;t just remove this file, cause it&apos;s responsible for WebSocket connection with bundler. So we need to establish this connection single-handedly. # HowFirstly, I ignored the `ip.txt` file by swizzling the `guessPackagerHost` method from `RCTBundleURLProvider` (https://github.com/expo/react-native/blob/85f6d8f2b00f72ee18cedef2052471ae16c34e26/React/Base/RCTBundleURLProvider.m#L96-L112). After that, the app won&apos;t be stuck on the splash screen anymore, but the WebSocket connection won&apos;t be available either.To fix the socket connection, I chose a similar solution to the one from our fork (https://github.com/expo/react-native/blob/85f6d8f2b00f72ee18cedef2052471ae16c34e26/React/DevSupport/RCTPackagerConnection.mm#L151-L164) - set the URL in `EXDevLauncherController`. Sadly there is one more caveat - to do it, we need to have access to the `_mutex` variable from the `RCTPackagerConnection` class (https://github.com/expo/react-native/blob/85f6d8f2b00f72ee18cedef2052471ae16c34e26/React/DevSupport/RCTPackagerConnection.mm#L40). This variable is private and comes from cpp. Normally, we could use `valueForKey` to get such a variable, but not in that case (`valueForKey` will crash because it&apos;s coming from cpp!). The other solution that I found is to use `object_getInstanceVariable`. This function isn&apos;t normally available. To use it, you need to disable ARC. So that&apos;s what I did (only for one file).I  confirmed that the socket connection is working and the `RCTReconnectingWebSocket` is released (ensured that we don&apos;t have any leaks).# Test Plan- bare-expo &#9989;

            List of files:
            /expo/packages/expo-dev-launcher/ios/ReactNative/EXDevLauncherBundleURLProviderInterceptor.swift</description>
        <pubDate>Thu, 20 May 2021 11:04:22 +0000</pubDate>
        <dc:creator>&#321;ukasz Kosmaty &lt;lukasz.kosmaty@swmansion.com&gt;</dc:creator>
    </item>
</channel>
</rss>
