Environment
Mac OS X Version 10.11.3 (15D21)
Xcode Version 7.2 (7C68)
Simulator Version 9.2 (SimulatorApp-643)
react-native-cli 0.1.10
node v5.5
For me, I needed to upgrade my version of XCode
from Yosemite to Sierra.
This can be done via App Store
> Updates
.
For me port 8081 was in use :
lsof -n -i4TCP:8081
Open Your Xcode project
Run it
You should have 2 errors from RCTSRWebSocket.m
add (void) to the beginning of both line :
SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
become
(void)SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
Save and Re-run your project with Xcode or terminal. It should work for sure. I have tested all the solution before, this one is the only who worked for me.
Surprisingly, this was the solution for me: Open the file Views/RTCScrollView.m in Xcode and change the variable _refreshControl to refreshControl. All occurrences of _refreshControl were already marked as errors. The new code becomes:
- (void)setRefreshControl:(RCTRefreshControl *)refreshControl
{
if (refreshControl) {
[refreshControl removeFromSuperview];
}
refreshControl = refreshControl;
[self addSubview:refreshControl];
}
For me I just needed to edit the iOS project build settings
Product Bundle Identifier was not set
You need to set it for both the Project and 2 Targets