Debugging an iOS app with an external accessory connected via Dock

前端 未结 4 890
北海茫月
北海茫月 2021-02-01 03:14

Am I missing something glaringly obvious or is there no way to debug an iOS app which uses an external accessory that\'s connected via the 30-pin dock without using a bucket loa

相关标签:
4条回答
  • 2021-02-01 03:43

    At CES today, I talked to a developer from Wahoo Fitness that makes an ANT+ accessory for iPhone. They had this same problem, but found a solution.

    They found a pass-through dock extender that has a mini-USB port. They used the mini-USB port for debugging while the accessory was connected.

    The product they were using is http://www.cablejive.com/products/dockStubz.html

    This blog talks about remote debugging iOS with a dock accessory attached

    0 讨论(0)
  • 2021-02-01 03:57

    Here's my understanding for why just the USB protocol works for some external accessories and doesn't for other external accessories. Looks like a fundamental problem, without an arbitrator, two masters can't talk to a single slave over USB, a serial Master/Slave protocol. So XCode is one master, the iPhone is the slave device. If the external accessory is a master too, one won't be able to connect the iPhone (Xcode slave) to the second master (the external accessory).

    Probably the Wahoo Key for iPhone" is a slave device and that's why the dockStubz solution works for such an external accessory.

    I have tested the dockStubz. It doesn't work for my external accessory. As suspected, the USB protocol can't be used to have two Master devices controlling a single slave device. Trying to hook up a Mac (Master) (via the mini USB ) & an external accessory (Master) (via the 30 pin connector) to the iPhone 4 (Slave) causes the iPhone to go in loop of connect & re-connect.

    Following looks promising too, though expensive: digi.com/support/kbase/kbaseresultdetl.jsp?id=485.

    Has any one tried to use USB to Ethernet connectors and use a router to route requests from two masters (XCode & External Accessory) to the slave (iPhone)? I am off to Best Buy to purchase USB to Ethernet cables and hook all three on to my IP router. Will report if it works.

    This is what will be needed : http://www.bestbuy.com/site/IOGEAR+-+USB+Ethernet+Extender/9614781.p?id=1218131339965&skuId=9614781&st=USB%20to%20Ethernet&cp=1&lp=1

    http://www.frys.com/product/6103339

    1. So connect XCode mac using the male end into the USB slot of your computer. . Use a ethernet cable to connect this to a router.
    2. Connect the iPhone to the female part of the IO gear connector. Connect it to the router via ethernet cable.
    3. Connect the external accessory with the male connector (Sabrent USB to Fast Ethernet Network Adapter.) Connect it to router.

    I am still researching if this will work. Just ordered the parts. Will get it by Friday & will report back then.

    Update: The IOGear male end draws too much current when connected to router. Also, the female end can't charge iPhone when connected to the router even when 5V USB current supplied.

    So tried to directly connect the iPhone to the USB slot of the router (used for printers). It does charge the iPhone. Also used USB to Fast Ethernet Network Adapter (BestBuy had one to connect Wii via USB) to connect the Mac to the router. It did connect to internet but couldn't find the iPhone. In the router client list I don't see any login entires for the iPhone. So this experiment was a failure unless someone have other pointers.

    0 讨论(0)
  • 2021-02-01 04:03

    You could connect the external accessory to another iOS device (not the one tethered to the Mac running the Xcode debugger). Then tunnel all your EA framework messages from the accessory connected device to the device running the app being debugged over a pair of wifi sockets. Look at the code for tunneling accelerometer messages from a device to the iOS Simulator (a common trick for debugging game code on the Simulator) for one example of how this could be done.

    0 讨论(0)
  • 2021-02-01 04:04

    After further researching, and having seen that people had to do sending strings over Wi-Fi to get around this, I'm concluding the answer is no.

    I have filed a bug request for this.

    In the mean time, it seems like the Wi-Fi logging, and on-device text logging will be the way to go for now.

    0 讨论(0)
提交回复
热议问题