This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-01
Channels
- # aatree (1)
- # admin-announcements (11)
- # beginners (77)
- # boot (73)
- # braid-chat (29)
- # cbus (3)
- # clara (3)
- # cljs-dev (16)
- # cljsjs (2)
- # cljsrn (68)
- # clojure (149)
- # clojure-austin (1)
- # clojure-czech (2)
- # clojure-miami (8)
- # clojure-poland (28)
- # clojure-russia (165)
- # clojure-ukraine (1)
- # clojurebridge (3)
- # clojurescript (64)
- # community-development (1)
- # core-async (27)
- # core-matrix (2)
- # cursive (38)
- # data-science (2)
- # datavis (4)
- # datomic (3)
- # dirac (78)
- # emacs (10)
- # events (1)
- # funcool (6)
- # hoplon (25)
- # immutant (2)
- # jobs (3)
- # ldnclj (34)
- # luminus (4)
- # mount (23)
- # off-topic (26)
- # om (121)
- # onyx (320)
- # other-lisps (1)
- # proton (13)
- # re-frame (33)
- # yada (3)
hey everyone, I’m using natal and can run my app in simulator using natal launch
. Now I tried to open project in XCode because I wanted to run in on a device. I selected my device and clicked run/build button. But I’m getting following error
ld: library not found for -lAmbly
clang: error: linker command failed with exit code 1 (use -v to see invocation)
. Anyone had the same issue?You opening the workspace or the prj?
yeah, I think I opened project. After I did natal xcode
it opened workspace and everything worked. Thanks!
@podviaznikov: Glad you sorted that. We had that occur for a while and it was presumably fixed, but to be honest the problem was a bit subtle. https://github.com/omcljs/ambly/issues/116
What root element should be specified when running AppRegistry.registerComponent? In react web you specify a dom element, but what do you do for react native?
don’t remember, but there is parameter that will be passed to your generator function, and it may have rootTag
property which would be equal to 1 for the first RCTRootView, 2 for the second, etc.
well, actually if you are using registerComponent
then there is nothing to specify. You just do something like:
(def root-component (core/class {:render #(components/text {:onPress (fn[](start-figwheel))} "Start figwheel”)
(core/register-component app-name (constantly root-component)))))
but in case you don’t have RN component, then you have to call registerRunnable
smth like:
(.registerRunnable js/AppRegistry app-name #(mount (aget % "rootTag"))))
where mount is a function specific for your frameworkSo, om-next doesn’t want to mount a component until it ensures the data is available for it. So what are you supposed to put there?
not sure that I follow, do you have an example or gist?
hmm, give me a second and I’ll create one
So, that works because I’m passing a react component. But that’s not what I’m supposed to be doing for om-next.
I should be something like that
(defn main []
- (.registerComponent app-registry "SimpleExampleApp"
- #(om/factory MainView)))
+ (.registerRunnable app-registry "SimpleExampleApp"
+ #(om/add-root! reconciler
+ MainView
+ (aget % "rootTag”))
hm, actually it may work with registerComponent if you wrap it with om/factory… but apparently it doesn’t for you
omg, thank you!
that fixed it
How do you trigger om-next to re-render? For live javascript reloading.
I don’t - figwheel does it for me, it just reloads the namespace and this code reruns again
well, there is a force-rerender or something like that in om-next, don’t remember unfortunately
One thing I noticed when you mount your component on rootTag, warnings does not appear anymore on screen
@drapanjanas: Hm, really? What do you use then? Another number?
when using figwheel I preseve original component (which first shows splash) and load all js files in componentDidMount function. So that I do need to mount on 1
its a bit not that streight forward but works with warnings
do not know if that is the only way to show warnings, but that what I have found
hm, thanks - I’ll check my code and test this
yep, usually I rely on NSLog inside XCode, this one is much better. Interesting why it doesn’t work after moun to the rootTag
I am just guessing that in dev mode when you register your component with registerComponent your component is somehow wrapped by something else to show warinngs. And when you remount rootTag you loose that wrapper
good god, react-native is full of bugs
>good god, react-native is full of bugs you are new to RN, aren’t you? 😄
plus I'm not accustomed to the tolerance for crazy issues in the javascript community
also is npm down? I'm getting ETIMEDOUTs 😞
I'm working with react-native 0.19 now (upgrading from 0.14), and it looks like the latest version of the packager cannot cope with Google Closure compiled bundles anymore (it freezes in the "minify" step
do you use re-natal or any other helper?
boot-react-native
@mjmeintjes: have you managed to build "offline bundles" with recent versions of the react-native packager yet? I'm having trouble getting it to work.
I confess I don't have a clue how the RN packager works
@pesterhazy: No, haven't really tried but I'll check it out.
it's proving more difficult than I thought
if I use optimizations :none, it doesn't find the depdendencies
if I use optimizations :whitespace, it misinterprets goog.require as RNpackager's require
and fails
if I use optimizations :advanced, I see Unhandled JS Exception: Assert failed: c
which is not very informative
as for :whitespace, apparently RN's packager uses a simple regex to find everything that looks like require(...)
, and interprets that as a dependency
... including goog.require!
I'd be curious what you think
Yes, RN's packager uses a lot of regex's to parse dependencies. However, I've definitely been able to build the bundle before. Just checking - are you using boot-react-native, and if so, have you disabled boot-react-native for your deployment builds?
@mjmeintjes: yes, I'm just using (cljs)
: https://github.com/pesterhazy/boot-react-native/blob/feature/dist/example/build.boot#L60
I'm calling the packager manager for now like so:
node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev true --entry-file dist/main.js --bundle-output main.jsbundle --verbose
Does it work when you aren't creating the bundle - i.e. just running boot dist
, then react-native start
and then running the app?
boot dev --platform ios
brings up the app in the simulator
ah wait, you mean something else...
you mean to use
with optimizations: whitespace, I get
{"message":"Unable to resolve module goog.debug.Error from /Users/pe/fy/boot-react-native/example/app/dist/main.js: Invalid directory /Users/node_modules/goog.debug.Error","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]}
again the same problem (the reference to /Users/node_modules/goog.debug.Error
is the packager's oblique way of saying it can't find your mdoule)
with optimizations :advanced, I get
2016-02-02 00:26:12.662 [warn][tid:com.facebook.React.JavaScript] Assert failed: c
2016-02-02 00:26:12.668 [error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: Assert failed: c
2016-02-02 00:26:12.906 [warn][tid:com.facebook.React.JavaScript] Module AppRegistry is not a registered callable module.
2016-02-02 00:26:12.907 [error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module.
maybe I'm missing the necessary externs?
I'm trying optimizations :simple now - grasping at straws
now I'm getting Module AppRegistry is not a registered callable module
For simplicity's sake I would focus on getting optimizations :whitespace
working first before trying :advanced
. I've reproduced the problem on my PC. Will play around and let you know.
yup I agree that anything but :whitespace
is a path to madness when you need to identify errors