From a5f19de9224b5ca68e2f74297b924cd4fcb41b83 Mon Sep 17 00:00:00 2001 From: Jamie Pinkham Date: Tue, 21 Jun 2016 08:45:00 -0400 Subject: [PATCH] fix reachability --- RxExample/RxExample/Services/Reachability.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RxExample/RxExample/Services/Reachability.swift b/RxExample/RxExample/Services/Reachability.swift index 8a154d13..b6f07b61 100644 --- a/RxExample/RxExample/Services/Reachability.swift +++ b/RxExample/RxExample/Services/Reachability.swift @@ -145,8 +145,8 @@ public class Reachability: NSObject { var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) //TODO: Swift 3.0 beta 1 is missing the toOpaque method, rdar://26876680 -// let u = Unmanaged.passUnretained(self).toOpaque() -// context.info = u as? UnsafeMutablePointer + let opaque = OpaquePointer(bitPattern:Unmanaged.passUnretained(self)) + context.info = UnsafeMutablePointer(opaque) if !SCNetworkReachabilitySetCallback(reachabilityRef!, callback, &context) {