Fork me on GitHub
#cljsrn
<
2016-11-06
>
keatondunsford05:11:55

@keithsparkjoy I think I was actually getting that earlier too when I was trying to make a new app out of the blue. I forget if it was that exact error, if I was able to fix it, or if it was just something that I messed up in XCode or a syntax bug so the thing couldn’t compile. Sorry that wasn’t very helpful. 😕

keatondunsford05:11:33

Yo, who wants to help make an Android clone of Whale with Om Next? 🙉😋

keatondunsford05:11:28

P.S. I have no idea wtf I’m doing:)

pesterhazy17:11:43

@keithsparkjoy I think the actual error is not in the snippet you posted

pesterhazy17:11:18

this looks like an XCode problem. my suggestion would be to try this: rm -rf "$HOME/Library/Developer/Xcode/DerivedData"

pesterhazy17:11:07

otherwise try opening the project in XCode and run it from there

pesterhazy17:11:14

maybe it'll give you better information

keithsparkjoy17:11:01

Thanks @pesterhazy - will give that a shot.

keithsparkjoy17:11:40

Hmm, doesn’t seem to be a DerivedData subdir under my $HOME/Library/Developer/Xcode

keithsparkjoy17:11:21

Maybe I should try completely uninstalling and reinstalling XCode wholesale.

pesterhazy17:11:48

what version is your xcode?

pesterhazy17:11:42

ah. I'm still on 7.3

pesterhazy17:11:49

what error causes that compile to fail? It should be further up in the terminal output

pesterhazy17:11:36

or update to react-native 0.33 in package.json

keithsparkjoy17:11:15

I’m going back and running react-native run-ios, which is what produced that error.

keithsparkjoy17:11:35

scrolling up through all the output

keithsparkjoy17:11:56

Yep, looks like it’s the same issue you posted above

pesterhazy17:11:38

yeah apple decided to upgrade a warning to an error in xcode 8

keithsparkjoy17:11:08

Maybe I should try Xcode 7.3

pesterhazy17:11:27

potentially updating rn just fixes things

pesterhazy17:11:48

I'd try that first

keithsparkjoy17:11:56

okay will look for package.json

keithsparkjoy17:11:25

found it in example/app

pesterhazy17:11:39

that's the one

keithsparkjoy17:11:00

currently says "react-native": "0.30.0"

keithsparkjoy17:11:06

gonna switch that to 0.33.0

keithsparkjoy17:11:04

then npm install I suppose

keithsparkjoy17:11:22

sorry I’m such a newb at all of this

keithsparkjoy17:11:09

Okay npm install gave me a warning: UNMET PEER DEPENDENCY [email protected]

pesterhazy17:11:35

ah you have to update that one as well

keithsparkjoy17:11:35

ahh another update to package.json is needed

keithsparkjoy17:11:26

So there’s react and react-dom - gonna update both of those in package.json to 15.3.1 and see if that does any better

keithsparkjoy18:11:04

okay happy npm now

keithsparkjoy18:11:29

ooh this is looking better now

keithsparkjoy18:11:47

woohoo! Build succeeded!

pesterhazy18:11:16

nice. if all works, I'll update BRN's example app

keithsparkjoy18:11:32

the IOS app did come up, although it’s quite red

keithsparkjoy18:11:48

goog.require could not find: cljs.core

keithsparkjoy18:11:22

so not quite there yet.

keithsparkjoy18:11:59

ahh gotta apply the patch

pesterhazy18:11:01

boot dev should do that automatically these days

keithsparkjoy18:11:52

yep that patched it. Trying again.

keithsparkjoy18:11:09

boot dev is running, then ran react-native run-ios and still red. This time, Could not connect to development server. It’s asking me to run ‘npm start’ - I don’t remember seeing anything about that in the getting started doc...

keithsparkjoy18:11:45

either npm start, or “ensure… Node server URL is correctly set in AppDelegate"

keithsparkjoy18:11:25

Not seeing that in the troubleshooting guide - will google around

keithsparkjoy18:11:27

Found this, “Run npm start on local machine to start the development server. React Native relies on a development server to communicate with the app running in the simulator."

keithsparkjoy18:11:37

I wonder if there’s a step missing in that getting started blog post

keithsparkjoy18:11:54

I was thinking ‘boot dev’ was the development environment.

keithsparkjoy18:11:21

So there must just be something broken still - somehow I think running 'npm start’ doesn’t make sense here.

pesterhazy18:11:11

npm start runs the RN packager

pesterhazy18:11:34

that used to be part of BRN, but that turned out not to work too well

pesterhazy18:11:50

nowadays we just ask users to run npm start in a terminal

pesterhazy18:11:18

usually the packager starts itself in a new window when you do run-ios, but obviously that doesn't work always

pesterhazy18:11:24

I should add that to the guide

keithsparkjoy18:11:26

the packager did start I think

keithsparkjoy18:11:33

let me try again..

pesterhazy18:11:47

ah then it's a good idea to close that window and start npm start manually

keithsparkjoy18:11:55

from what directory?

keithsparkjoy18:11:59

example? or example/app

pesterhazy18:11:29

i.e. the directory that contains package.json

keithsparkjoy18:11:42

react-native run-ios

pesterhazy18:11:47

exactly 🙂

keithsparkjoy18:11:54

cool okay trying again

pesterhazy18:11:15

you'll see the packager working after run-ios

pesterhazy18:11:30

sometimes that takes longer than 60s the first time, and you get a red screen

pesterhazy18:11:40

do not give up!

keithsparkjoy18:11:47

transformed 794/795

pesterhazy18:11:49

just reload it again in the simulator

keithsparkjoy18:11:00

kinda sitting there now, I’m waiting

keithsparkjoy18:11:23

okay red again...

keithsparkjoy18:11:30

yea same message

pesterhazy18:11:10

did the packager complete?

keithsparkjoy18:11:20

still at 794/795

keithsparkjoy18:11:27

if that’s what you mean

pesterhazy18:11:39

yeah, that means it's not finished

keithsparkjoy18:11:48

It did say <END>

keithsparkjoy18:11:52

find dependencies

pesterhazy18:11:01

you can try getting that url in a browser

pesterhazy18:11:06

see if you get a bundle

keithsparkjoy18:11:02

I got some javascript returned

keithsparkjoy18:11:55

It takes 2-3 seconds to return it, but yea, looks like that URL is alive.

pesterhazy18:11:23

so try reloading in the sim again now

keithsparkjoy18:11:10

well dang there it goes

keithsparkjoy18:11:17

Welcome to boot-react-native

keithsparkjoy18:11:27

Button works. Woohoo!

keithsparkjoy18:11:33

Thanks for your patience, @pesterhazy

pesterhazy18:11:11

it should be faster now, with the packager's warm cache

keithsparkjoy18:11:32

Now to explore native development with cljs. Fun fun fun 🙂

keithsparkjoy18:11:58

Pretty amazing to be able to change the text of that button, but see the state stay the same. Magical.

pesterhazy18:11:46

yeah that's the idea, and hugely helpful when building apps

pesterhazy18:11:27

it works well for us for a moderately sized app (Fy, in the iOS app store if you're curious)

pesterhazy18:11:41

@keithsparkjoy if you could put up a github issue with the problems you encountered with the guide, that'd be amazing: https://github.com/mjmeintjes/boot-react-native/issues

keithsparkjoy18:11:02

Sure I can do that.

misha18:11:30

How one defines an app's size? Locs? Domain objects count?

pesterhazy18:11:16

number of screens 🙂

keithsparkjoy19:11:27

I started from scratch and ran through it again to make sure it all worked as advertised. Got it working again.

pesterhazy19:11:48

awesome, thanks. That's great for googl-ability too 🙂

pesterhazy20:11:52

@keithsparkjoy updated the example app in master to use rn 0.36, seems to work fine

a.espolov21:11:05

guys how to use native background service on ios and android?