This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-05
Channels
- # admin-announcements (10)
- # beginners (18)
- # boot (29)
- # capetown (2)
- # cider (46)
- # cljs-dev (1)
- # cljsrn (69)
- # clojure (126)
- # clojure-android (9)
- # clojure-gamedev (3)
- # clojure-greece (16)
- # clojure-poland (13)
- # clojure-russia (45)
- # clojure-spec (27)
- # clojure-uk (21)
- # clojurescript (99)
- # cursive (1)
- # datascript (1)
- # datomic (42)
- # functionalprogramming (10)
- # hoplon (47)
- # instaparse (12)
- # jobs (5)
- # jobs-rus (9)
- # keechma (22)
- # lein-figwheel (8)
- # leiningen (5)
- # luminus (1)
- # mount (7)
- # off-topic (1)
- # om (15)
- # onyx (47)
- # other-languages (14)
- # planck (28)
- # proton (8)
- # re-frame (30)
- # reagent (15)
- # remote-jobs (3)
- # slack-help (2)
- # untangled (9)
- # yada (6)
Anyone successfully changing the statusbar background color in ios?
@jinsolkn: I think it's {:InitialPage 0}
@tiensonqin: i tried 240min before
@tiensonqin: and statusbar background color in ios is refer to Luno demo app src/ios
I can set statusbar background color in appdelegate.m like:
UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0,[UIScreen mainScreen].bounds.size.width, 20)];
view.backgroundColor=[UIColor colorWithRed: 0
green: 0
blue: 0
alpha: 0.85];
[self.window.rootViewController.view addSubview:view];
I want to dynamically change the color from js
I'm trying to write some obj-c, really know nothing about it
@pesterhazy: I saw your comments here: https://github.com/facebook/react-native/issues/5196#issuecomment-194311091 Running into the same issue. Did you solve it in a way cleaner than manually patching the react native package?
@vikeri: yeah I "solved" it by using --dev true
, which disables whole-program optimizations
ah, interesting. I was getting by bumping up the memory allocated to the node process: --max_old_space_size=4096
--dev true
it doesn't seem to affect performance too badly, though it's obviously not ideal
Does clojurescript cause this to happen more? You’d think that more people would be hitting this problem.
however, it also enables runtime checks which you don't want (e.g. the yellow error message in the app)
for that I just patch out the DEV__ constant on the top of the file
#!/usr/bin/env python
# Patch jsbundle to set __DEV__ to false
import sys, re
print(re.sub(r'__DEV__\s*=\s*true;', "__DEV__=false;",
sys.stdin.read()))
(aset js/console "disableYellowBox" true)
🙂
@seantempesta: didn't know that existed. We should build a knowledge base
re-frame was driving me crazy by pushing handler/subscription changes to the yellow box
yeah, for sure
yeah I don't like the yellow boxes or red stacktraces at all
there are so many little things that you have to learn to do cljsrn development
@seantempesta: I think the memory issue is a result of the Google Closure Compiler
because it creates an enormous bundle that needs to be consumed by the optimizer
It’d be great to have a “best practices” template with code based solutions rather than just a wiki
@seantempesta: where did you change the —max_old_space_size=4096
?
@pesterhazy: yeah, that was my guess too
@seantempesta: setting the heap size in node didn't work for me as it didn't affect the worker processes
@seantempesta: Yes! I have been advocating a common resource for re-natal and boot users.
also almost no-one seems to be setting heap size in the node world, which is quite concerning
Xcode: Build Phases —> Bundle React Native code and images —>
export NODE_BINARY='node --max_old_space_size=4092'
../node_modules/react-native/packager/react-native-xcode.sh
ah NODE_BINARY is the trick?
I forget where I had to change it in Android
I think I tried that, but maybe didn't do it correctly
I'll give that a shot the next time I run into this issue
I guess so? I tried to look into what was failing and almost cried. The current state of babel/babylon just seems like a shit show.
though tbh --dev true also seems to work
yeah, good to know
re: best practices, even just a mailing list would help
slack is nice and all but all the info gets lost
yeah. I like slack for discussions, but for informational storage I think it’s terrible
= you can't google
if you guys are interested I'll set up a mailing list
I’d sign up and contribute for sure
a wiki is good for established best practices, but I'm not sure we have those yet in the community
I find mailing lists not optimal. Having to pan through random answers until I hit the one that actually solves it.
stack overflow?
Stack Overflow has great SEO at least
people feel mailing lists are anachronistic but I'm always glad when I find a discussion with different sides online
@seantempesta: haha true. But it feels less responsive. I generally ask here since I’ll get a much faster response and can discuss the issue. But I guess stack overflow was meant to solve this particular issue.
I guess if the person asking the question just copied and pasted it into SO and put a reference to it in the channel, we could just answer it there and take advantage of that whole ecosystem.
@seantempesta: Sounds like a good solution
we could just agree to tag the questions a certain way? #C0E1SN0NM
#ios #android for specific platform questions
sounds good
maybe also tag react-native in hopes the wider community might have similar issues?
yeah, the yellow box is an example
god I forget where I even found that. I’ve been having to dig through the react-native source code for a lot of things since the documentation is so sparse.
Hah, tried to create the tag cljsrn, but I don’t have 1500 in reputation so I couldn’t do it. Feel free to add the tag (and the Android solution): http://stackoverflow.com/questions/38198511/how-to-prevent-node-from-running-out-of-memory-when-bundling-js-for-react-native/38198512#38198512
haha, you assume I have 1500 points. I’ll add the solution though. Eventually one of us will have enough points to add it. 🙂
oh you already did it
@seantempesta: Yes, at least your iOS solution.
when I remember my android fix I’ll post it
I added my workaround too
turns out I also don't have enough karma 🙂
Pleading to the greater community: https://clojurians.slack.com/archives/off-topic/p1467709190000629