Link-OS Multiplatform SDK

// Expert user has replied.
J Jordan Cyr 10 months 4 weeks ago
76 3 0

Recently with trying to implement the Link-OS Multiplatform SDK for our application we have been running into an issue where on IOS the app cannot successfully execute NetworkDiscoverer.localBroadcast() without running into a ZSDK_API_ERROR_DOMAIN.

This error only seems to happen on IOS 16.5 and not any of the previous versions of IOS.

 

The full error in question:

findNetworkPrinters failed: Error Domain=ZSDK_API_ERROR_DOMAIN Code=5 "Network error during discovery" UserInfo={NSLocalizedDescription=Network error during discovery}

 

The Method:

public func discoverNetworkPrinters(port: Int) -> [CustomDiscoveredPrinter]{

    

      print("Searching for Zebra network printers...")

      do {

        let discoveredPrinters = try NetworkDiscoverer.localBroadcast()

        if let networkPrinters = discoveredPrinters as? [DiscoveredPrinterNetwork] {

          print("Found \(networkPrinters.count) Zebra network printers.")

          let printers = networkPrinters.map { dp inCustomDiscoveredPrinter(name: dp.dnsName, address:dp.address)}

          return printers

        } else {

          print("findNetworkPrinters failed to cast discoveredPrinters to [DiscoveredPrinterNetwork].")

          return []

        }

      } catch let err as NSError {

        print("findNetworkPrinters failed: \(err.description)")

        return []

      } 

  }

SDK version:

1.5.1049

Please register or login to post a reply

3 Replies

S Steven Si

For the network printer discovery on iOS 14.5 and higher, we need to have the Multicast Network Entitlement granted from Apple Developer Program. The network printer discovery uses the multicast to obtain the printer’s information on the network. By default, the multicast is disabled on iOS 14.5 and higher due to Apple enhanced security & privacy policy. Please follow the article below to request the entitlement and then add the entitlement to the info.plist of the Xcode project. Link-OS SDK for iOS – Printer Network Discovery API impacted by iOS 14.5 and higher.

J Jordan Cyr

Hi Steven
Im not sure if its the link thats broken or i need to be the account holder to open the link but Multicast Network Entitlement request opens up for me as unauthorized.
For reference my account is listed as developer.

 

S Steven Si

Only the account owner has the access to the request form. You will need to ask the account owner of the Apple Developer Account to raise the request.

CONTACT
Can’t find what you’re looking for?