Fork me on GitHub
#cljsrn
<
2016-09-21
>
artur07:09:19

Isn't this supposed to load image from network?

vikeri07:09:20

@rhiannon31 Remember that you need to have a developer account and a certificate if you intend to run your iOS app on a real device.

lxsameer10:09:00

guys, do you know how react native Navigator change the scene in general ?

vikeri10:09:01

@lxsameer Navigator is very OO but is being deprecated for NavigationExperimental which has a much more functional API. I have an example implementation here (using re-frame): https://github.com/vikeri/re-navigate

lxsameer10:09:31

@vikeri thanks buddy I'll take a look

savelichalex11:09:39

NavigationExperimental has breaking changes in each release

savelichalex11:09:12

@lxsameer I think that react-native-navigation from wix is better choice

lxsameer11:09:10

hamm I'm writing a compojure like router for re-frame right now, I think we need a more clojuric approach

savelichalex11:09:20

I have a wrapper around Navigator which track! changes from re-frame db and change scenes

lxsameer11:09:40

that's more like it

savelichalex11:09:19

Last time I throw away Navigator from project and create my own transitions between scenes with Animated API

lxsameer11:09:04

guys router/router does not get called again when route changes

lxsameer11:09:11

(defn app-root []
  (let [route (subscribe [:route])]
    (println ">>>>>>>>>>>>>>>")
    (println @route)
    [view
     [router/router routes @route]]))

mac13:09:03

Is anyone using re-natal with cider? The repl works fine but I keep getting user-error: ‘cider-eval-last-sexp’ needs a ClojureScript REPL. when trying to eval stuff from a buffer.

artemyarulin13:09:04

@mac Aren’t you using clojure-mode in CLJC file? Had the same issue some time ago, changing to clojurescript-mode helped

artemyarulin13:09:26

ah, did you use cider-connect? After that you need to lift clojure repl to clojurescript repl smth like (use 'figwheel-sidecar.repl-api)(cljs-repl)

mac13:09:41

@artemyarulin I thought so, but no change.

mac13:09:57

@artemyarulin Is there an easier way to connect? I need to run (use 'figwheel-sidecar.repl-api)(cljs-repl) at some point, right?

mac13:09:47

@artemyarulin Sorry I meant run (start-figwheel "android") at some point.

artemyarulin13:09:45

Oh, I have no idea - I’m not using re-natal. But if you run (use 'figwheel-sidecar.repl-api)(cljs-repl) does it stuck? If it does stuck it means you have no RN connection yet

mac13:09:45

@artemyarulin No, it connects just fine.

artemyarulin13:09:39

hm, then you should have a connection, weird

mac13:09:40

@artemyarulin The repl is there and working, evals stuff in the browser and everything, but for some reason cider doesn't use/see it.

artemyarulin13:09:14

are you using CLJC file?

mac13:09:46

@artemyarulin Sorry meant emulator, not browser.

mac13:09:00

@artemyarulin No, a cljs file.

artemyarulin13:09:30

Hm yeah, very strange then it should work fine

mac13:09:41

@artemyarulin Will go pester the nice people in the cider channel

artemyarulin13:09:12

yeah, updating emacs/cider also sometimes helps

rhiannon3117:09:24

Hey y'all, I'm still trying to run my app on my real device from Xcode. It works in Simulator with Figwheel. Here's what I've done: 1. Got IP address from iphone settings 2. Ran re-natal use-ios-device with that IP address. 3. Ran lein prod-build 4. Opened Xcode, changed scheme configuration from Debug to Release, changed platform to physical device 5. Hit Run on Xcode. Result: white screen of death

rhiannon3117:09:57

Earlier @misha recommended editing AppDelegate.m. However, my AppDelegate doesn't have those options at all! I did this anyway:

//   jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

artemyarulin17:09:46

@rhiannon31 Check that you actually have main.jsbundle file included in project. I remember using RNv31 which for some reason didn’t include this file into project although it was generated by the packager

rhiannon3117:09:15

I do have a file ios/build/Build/Products/Release-iphonesimulator/loqApp.app/main.jsbundle….

rhiannon3117:09:33

Hmmm…in Xcode, main.jsbundle shows on sidebar in red, but has never been the source of errors in development

artemyarulin17:09:29

yep, it’s not included then

rhiannon3117:09:41

I should drag and drop it in?

rhiannon3117:09:31

Okay, I copied it in to loq-app/ios/loqApp/, same level as AppDelegate.m, then lein prod-build, unfortunately still throwing an exception

rhiannon3117:09:59

Actually main.jsbundle still shows in red even though it exists now

artemyarulin18:09:51

Well easiest way would be to remove main.jsbundle from xcode project and then add it once again using drag-n-drop

rhiannon3118:09:49

You’re right, doing that made it stop showing red (although now it shows two). It added weird code to another file but I got rid of those errors. Still white screen of death though!

rhiannon3118:09:26

https://github.com/facebook/react-native/issues/240 recommends react-native bundle --platfrom ios --dev false --entry-file index.ios.js