Skip to content

Instantly share code, notes, and snippets.

@gphilipp
Last active January 19, 2016 22:24
Show Gist options
  • Save gphilipp/da933b0fd4e6d094518e to your computer and use it in GitHub Desktop.
Save gphilipp/da933b0fd4e6d094518e to your computer and use it in GitHub Desktop.
Ambly iOS react native

React native with Om/Ambly/Natal experience

Troubleshooting

When the simulator can't start anything try this:

  • Disable chrome debugging in the simulator (CMD-D shortcut)
  • Clean up the build folder in Xcode : natal xcode then shift-alt-cmd-K
  • Kill the CoreSimulatorService via the Process Monitor OSX tool
  • Null is not an object (evaluating 'prevComponentInstance._currentElement'). I had forgotten to add libRNVectorIcons.a in the 'Build phases -> Link Binary with Libraries`section.

Previous Troubleshooting (on Yosemite)

  1. Had to kill f****g sun proxy server running on same port (8081) than react-packager
  2. update package.json to use react-native 0.8 instead of 0.9
  3. Had to reboot computer completly because ambly couldn't find any device, even though the app was running correctly in the simulator.
  4. Fixed all bonjour issues after upgrading from Mac OS X 10.10.3 to 10.10.5
  5. Don't forget to edit script/repl because it has a reference to the project name "awesome_project"
  • After fresh computer reboot, running app in simulator:
confidere-ios  dns-sd -B _http._tcp                                                                                          
Browsing for _http._tcp
DATE: ---Tue 18 Aug 2015---
14:59:44.393  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
14:59:44.394  Add        2   4 local.               _http._tcp.          Ambly ConfidereIos on iPhone Simulator (MacBook-Pro-de-Gilles)
  • After refreshing a few times inside the simulator:
➜  confidere-ios  dns-sd -B _http._tcp
Browsing for _http._tcp
DATE: ---Tue 18 Aug 2015---
15:01:18.167  ...STARTING...
Confidere 1164 gilles    7u  IPv4 0xec12eec5aeaa8c51      0t0  TCP *:49155 (LISTEN)
Confidere 1164 gilles    9u  IPv6 0xec12eec5ab96db71      0t0  TCP *:49155 (LISTEN)
Confidere 1164 gilles   12u  IPv4 0xec12eec5aeaa7ab1      0t0  TCP *:* (CLOSED)
Confidere 1164 gilles   14u  IPv4 0xec12eec5aeaa8381      0t0  TCP *:49154 (LISTEN)
Confidere 1164 gilles   15u  IPv6 0xec12eec5ab96e071      0t0  TCP *:49154 (LISTEN)
debugserv 1169 gilles    3u  IPv4 0xec12eec5aeaa6911      0t0  TCP 127.0.0.1:49325->127.0.0.1:49324 (ESTABLISHED)
var _TimerMixin = require('react-timer-mixin');
var _TimerMixin2 = _interopRequireWildcard(_TimerMixin);
//var _Dimensions = require('Dimensions');
//var _Dimensions2 = _interopRequireWildcard(_Dimensions);
'use strict';
//var _Dimensions$get = _Dimensions2['default'].get('window');
var React = require('react-native');
var {
Dimensions
} = React;
var {width, height} = Dimensions.get('window');
//var {Dimensions} = _reactNative; (or) _React$StyleSheet$Text$View$ScrollView$TouchableOpacity;
//var {width, height} = Dimensions.get('window');
//var width = _Dimensions$get.width;
//var height = _Dimensions$get.height;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment