How to debug Lightning Accessory via Xcode on iOS

I am developing an iOS app that interacts with a lightning-fast accessory. Now that the accessory is connected, I cannot use the lightning port to debug my application in Xcode.

Is there a way to connect a debugger to my application if a lightning accessory is connected to my iOS device?

or

Can I somehow attach a lightning-fast accessory to my Mac and debug it in the simulator?

I know that some people talk about WiFi debugging, but this is not supported in Xcode 6.

+7
source share
4 answers

When using accessories for lightning, there seems to be no option for connecting both Xcode and accessories at the same time. I think this has something to do with how Lightning cables require hardware to authenticate internally (so no one could find the key / delimiter). The solution I ended up using was a remote logging tool that sends log messages over the network to your Mac. I use NSLogger , but there is also CocoaLumberJack .

Of course, you need to port your code with log messages so that it is useful and there are other limitations, but it is better than nothing. You can also clear your log messages using a custom macro log (Objective-C only).

+3
source

I am trying to do the same. I could do this on a 30-pin device using the CableJive adapter. But there seems to be no way to do this with Lightning. I suspect that since lightning connections (including cable) are protected from the built-in serial number chip, this means that the iOS device only allows one authentication chip per lightning connector, which means there are no splitters / bridges / Y-connectors or other elements, if that not endorsed by Apple.

Apple has some magic devices for developers approved by MFI, but my MFI approval has expired, so I'm not sure if they have any Lightning devices to test.

0
source

You may be able to connect to Xcode wirelessly and design with the accessory connected. This question may help with this.

What distinguishes the preference for Xcode 4.2 "Support for wireless connected devices" to do?

0
source

Wireless debugging is now available in Xcode 9 or later, and in iOS 11 or later. A good article on how to connect your mobile device for remote debugging is here:

0
source

Source: https://habr.com/ru/post/1214104/


All Articles