Why jsCodeLocation couldn't be defined by compiler, instead of programmer?
I've googled, XCode provide DEBUG macro, so we could do something like this:
#if DEBUG
jsCodeLocation = [NSURLURLWithString:@"http://localhost:8081/index.ios.bundle"];
#else
jsCodeLocation = [[NSBundlemainBundle] URLForResource:@"main"withExtension:@"jsbundle"];
#endif
And also add compilation callback that would be update main.jsbundle.
Why
jsCodeLocationcouldn't be defined by compiler, instead of programmer?I've googled, XCode provide
DEBUGmacro, so we could do something like this:And also add compilation callback that would be update
main.jsbundle.