Closed
Description
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 = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
#else
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
And also add compilation callback that would be update main.jsbundle
.