1
votes

I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.

This works on the iOS simulator, so I wonder if its an iOS compatibility issue? The Movies example app works ok on this device.

```

2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10 2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10' * First throw call stack: (0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) ```

1
Are you sure you aren't using NSURLComponents anywhere?danielbeard
This has been fixed already but not released yet - github.com/facebook/react-native/issues/5227Adamski

1 Answers

2
votes

NSURLComponents queryItems is only available on iOS8+ That's why you are seeing the crash.

See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems

Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.