# iOS 12 ParticleSetup not completing after selecting device

**URL:** <https://community.particle.io/t/ios-12-particlesetup-not-completing-after-selecting-device/50782>\
**Category:** Developer Tools\
**Tags:** photon\
**Created:** [July 1, 2019, 5:16am UTC](https://community.particle.io/t/ios-12-particlesetup-not-completing-after-selecting-device/50782 "2019-07-01T05:16:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james\_tc](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@james\_tc](https://community.particle.io/u/james_tc)\
**Post date:** [July 1, 2019, 5:16am UTC](https://community.particle.io/t/ios-12-particlesetup-not-completing-after-selecting-device/50782/1 "2019-07-01T05:16:46Z")

</div>

Hi there,

I’m having issues with the iOS ParticleSetup library.

The setup process starts OK. I click “Ready” and get passed the first screen. Second screen comes up telling me to select the device from WiFi and then come back. I select the device from WiFi, but when I return to the app nothing happens.

The only errors I see in console are things like:  
`NSURLConnection finished with error - code -1005`  
`TIC Read Status [2:0x0]: 1:57`  
`TIC TCP Conn Failed [5:0x283429500]: 1:50 Err(50)`  
`Task <FC02FA32-46C3-4D89-AC6D-35A551F8719A>.<0> HTTP load failed (error code: -1009 [1:50])`  
`NSURLConnection finished with error - code -1009`

As far as I’m aware I’ve followed the setup instructions correctly. I’ve got the Pods file my bridging header setup and referenced in the build settings.

**Update:**

**Findings**  
The above errors are related to an [iOS 12 bug](https://github.com/AFNetworking/AFNetworking/issues/4279). Closing and reopening an app produces these errors. Along with:

```auto
[BoringSSL] nw_protocol_boringssl_error(1584) [C2.1:2][0x103333150] Lower protocol stack error: 53

```

**Actual cause of issue**  
The current version (0.9.0) of the ParticleSetup iOS pod uses CNCopyCurrentNetworkInfo which, in iOS 12, needs the ‘Access WiFi Information’ capability. In XCode: Project \> Capabilities \> Access WiFi Information.

It looks like they’re currently developing a different method using sockets, so this may change in future.

---

<div class="post-metadata">

**Author:** ![Raimis](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/raimis/32/17562_2.png) [@Raimis](https://community.particle.io/u/Raimis)\
**Post date:** [July 8, 2019, 6:51pm UTC](https://community.particle.io/t/ios-12-particlesetup-not-completing-after-selecting-device/50782/2 "2019-07-08T18:51:18Z")

</div>

Hello. Glad you were able to find the solution to the problem. This is not the cause of the issue, this is just how iOS handles the security and there’s nothing much we can do on our end to avoid this. For photon setup that permission is required and it became a requirement in iOS 12.

The BLE based setup (not sockets though) will only be available for 3rd gen devices.

---

<div class="post-metadata">

**Author:** ![james\_tc](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@james\_tc](https://community.particle.io/u/james_tc)\
**Post date:** [July 9, 2019, 12:13am UTC](https://community.particle.io/t/ios-12-particlesetup-not-completing-after-selecting-device/50782/3 "2019-07-09T00:13:34Z")

</div>

Thanks Raimis. What I meant was that the issue was caused by me **not** having the permission enabled. I’ve written it up like this so it may help others facing the same problem. If the requirement for this permission is mentioned in the docs, I must have missed it.
