Closed invaliduser closed 9 years ago
The warnings in Xcode are fairly normal. This may help: https://github.com/omcljs/ambly/wiki/Connectivity
All connected! Thanks.
@invaliduser For #90, I've expanded the instructions that Ambly prints to detail how to eliminate the delayed upload to the WebDAV server https://github.com/omcljs/ambly/blob/master/Clojure/src/ambly/core.clj#L465
On OS X this issue doesn't occur. But you're revised description includes what appears to be ((fn render ))
which is probably a typo, where the root problem is an inability to see js/window
?
I tried just now in a fresh directory and the requestAnimationFrame
bit worked for me:
cljs.user=> ((fn render []
(.requestAnimationFrame js/window render)))
1
@invaliduser Do you see the initial screen displaying "Welcome to React Native!" in the UI, prior to running the REPL?
The default one put in by the facebook team? Yes.
Something strange is going on here, though:
window
.even in the event that the workaround fn succeeds, require
seems to fail at actually interning symbols:
cljs.user=> (require 'awesome-project.core) nil
cljs.user=> js/awesome_project
and the UI fails to respond to require
statements (including clicking, as I was worried the workaround didn't work).
widget
. In that case, however, the environment seems to fail to find om
. I discovered this when I tried manually typing the rendering code into the repl (I was not rigorous here, though; I may have neglected to do the ns -> bootstrap om -> ns setup through the repl, though my .core file is just copy-pasted.js/window
to be giving errors.Interesting. One idea is to flush out any residual state: Stop the iOS app in the simulator, and do iOS Simulator > Reset Content and Settings, and also look for any target and out directories that might be sitting in the same directory as your project.clj
file, and look for any stale /Volumes/Ambly-*
mount directories and remove them.
Then after this, fire up the app in Xcode, followed by connecting the REPL, to see if things work cleanly.
If not, perhaps you can share your code tree; I'd be interested in taking a look. You mentioned manually doing awesome-app.core
at the REPL; perhaps there is a subtle issue when doing it that way.
Another thought that might be worth trying: There is a working app with startup instructions here https://github.com/mfikes/qttt#react-native-port that might be interesting for you to try to see if it fails in some interesting way that is specific to your environment (older Xcode or iOS simulators, etc.)
Narrative as I go:
out
/target
, which may or may not be holdovers from previous; left them aloneswap!
updating and edit-then-namespace-reload both workSo, all seems to be working. If I can reproduce I'll investigate more.
For reference: Xcode 6.3.1, iOS simulator 8.3 (SimulatorApp-565.9 CoreSimulator-117.15) [[org.clojure/clojure "1.7.0- RC1"] [org.clojure/clojurescript "0.0-3269"] [org.omcljs/om "0.8.8"] [org.omcljs/ambly "0.5.0"]]
Cool!
Upon selecting "[1] AwesomeProject on iPhoneSimulator" at the REPL, Xcode logs a bunch of warnings (EDIT: normal), and the REPL is blind to variables it should be able to see:
To quit, type: :cljs/quit cljs.user=> ((fn render [] (.requestAnimationFrame js/window render))) ReferenceError: Can't find variable: window cljs$user$render (NO_SOURCE_FILE) global code (NO_SOURCE_FILE)
I will keep investigating this and will report back if I figure it out. (This may be related to the Ubuntu race condition, but I'm running on OS X, so we'll see).
EDIT: markdown problems, will edit later (fun fact: the clojure [parameter] (body) syntax matches markdown's [link title] (link address) syntax)