5 Replies Latest reply on Mar 5, 2019 2:08 AM by Ernst Suedmeyer

    iOS - SDK - no printer found

    Ernst Suedmeyer

      Hi I'm new to this whole printing thing.  I have looked through the sdk am stuck with connecting to the printer.

       

      Used the connecting bluetooth sample functions from the iOS documentation, which I translated into swift, but no printer was found.  Tried this with device already connected to iOS and not connected to iOS.

       

              var serialNumber = ""

              let sam = EAAccessoryManager.shared()

              let connectedAccessories = sam.connectedAccessories as Array<EAAccessory>

              for accessory in connectedAccessories {

                  if accessory.protocolStrings.contains("com.zebra.rawport") {

                      serialNumber = accessory.serialNumber

                      break

                  }

              }

              let thePrinterConn : ZebraPrinterConnection = MfiBtPrinterConnection(serialNumber: serialNumber)

              var success = thePrinterConn.open()

              print(success)

       

      Any ideas? What am I missing?