Fork me on GitHub

@nick.romer Sounds like a local IP issue, try setting something like

{:ring-server-options {:port 9500 :host " (your local network IP here)"}}
… in the figwheel-main.edn


Thank you ! I'll try that.

👌 1

Hi @U050KSS8M, I actually don't understand the link between a ring server and a mobile app. I thought ring servers were for web apps?


OK, thank you @U050KSS8M! I learned something about figwheel. I really appreciate you answering me and I hope you hang on a little more. My problem is not during the dev phase; I can repl into figwheel just fine and expo web (the mobile phone emulator running in a browser) shows me the correct mobile app behaviour. My problem arises when I want to compile my app for prod release in order to create an installable Android apk. My assumption is that figwheel should remove itself from the code during a prod compile. Am I right?


Unfortunately I don’t think figwheel does that automatically in the case of React Native. I ended up modifying the :advanced output manually after compilation.


Remove the code that looks something like:

module.exports = { renderFn: ar.main.figwheel_rn_root };


… And make sure that the application has a way to start when in production mode. There might be a better/automatic way to do this but I haven’t investigated.


That is, the local network IP of your laptop/computer, not the phone/device.


Hi @U050KSS8M, that didn't help. I'm trying to take a step back and understand the fundamentals. I ran a prod build like so: clojure -m figwheel.main -O advanced -bo android and tried to visualizer it with expo start -w. Is that legit? The problem with that is that the compiled main.js is not copied to the project root as index.js. Therefore I modified package.json: `{ "main": "target/public/cljs-out/android/main.js",` Again, I'm not sure if that's the right way to do it. In any case, after this modification expo start -w compiles without errors, however there is an error on the browser based emulator: ReferenceError: fig is not defined pointing to this line in the code : module.exports = { renderFn: fig.main.figwheel_rn_root }; My goal is to get a functioning apk that runs on my phone. I'm grateful or any help I can get.