Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-9183

Return cellular connection type even if wifi is reachable on 64-bit iOS, similar to CB-6350.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.3
    • None
    • None
    • HardWare:iPhone6 PLUS
      OS:iOS8.2

    Description

      Maybe this issue is similar to CB-6350.
      When we get connection type on 64-bit iOS, return value is set to cellular event if wifi is reachable.
      On 64-bit iOS, "BOOL" is now the same as "bool", and the return type of networkStatusForFlags method cannot use this type anymore.
      Using "NetworkStatus" type resolve this issue.
      source on 64-bit iOS BOOL change: http://blog.bignerdranch.com/564-bools-sharp-corners/

      CDVReachability.m L.189

        - (NetworkStatus)localWiFiStatusForFlags:(SCNetworkReachabilityFlags)flags
        {
            CDVPrintReachabilityFlags(flags, "localWiFiStatusForFlags");
      
            BOOL retVal = NotReachable; <- this line.
            //NetworkStatus retVal = NotReachable; <- we implement temporary this line.
            if ((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) {
                retVal = ReachableViaWiFi;
            }
            return retVal;
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Yohei Takeda Yohei Takeda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: