Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
9c043a6c
Verified
Commit
9c043a6c
authored
Feb 23, 2018
by
Sébastiaan Versteeg
Browse files
Add lines to AppDelegate to ease iOS development
parent
7c5a1468
Changes
1
Hide whitespace changes
Inline
Side-by-side
ios/ThaliApp/AppDelegate.m
View file @
9c043a6c
...
...
@@ -26,8 +26,25 @@
[[
UNUserNotificationCenter
currentNotificationCenter
]
setDelegate
:
self
];
NSURL
*
jsCodeLocation
;
#if DEBUG
// For Debug build load from development server. Start the server from the repository root:
//
// $ npm start
#if TARGET_IPHONE_SIMULATOR
// Run from locally running dev server
jsCodeLocation
=
[
NSURL
URLWithString
:
@"http://localhost:8081/index.bundle?platform=ios"
];
#else
// Run on device with code coming from dev server on PC (change the IP to your PCs IP)
jsCodeLocation
=
[
NSURL
URLWithString
:
@"http://192.168.1.1:8081/index.bundle?platform=ios"
];
#endif
#else
// For production load from pre-bundled file on disk. To re-generate the static bundle, run
//
// $ curl http://localhost:8081/index.ios.bundle -o main.jsbundle
jsCodeLocation
=
[[
RCTBundleURLProvider
sharedSettings
]
jsBundleURLForBundleRoot
:
@"index"
fallbackResource
:
nil
];
#endif
RCTRootView
*
rootView
=
[[
RCTRootView
alloc
]
initWithBundleURL
:
jsCodeLocation
moduleName:
@"ThaliApp"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment