Вопрос

I'm having trouble with Sphero and iOS 7. Like it said to on the quick start guide, since the 1.6 release notes which were supposed to have instructions for starting a new project did not have said instructions, I used the "integrate into an existing project" tab, I set my deployment target to 6.0, brought in all the frameworks, and added the linker settings. When I launch it, I get this error:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_RKMCStop", referenced from:
      objc-class-ref in RobotKit(RKMacroObject.o)
  "_OBJC_CLASS_$_RKMCWaitUntilStop", referenced from:
      objc-class-ref in RobotKit(RKMacroObject.o)
      objc-class-ref in RobotKit(RKRobotControl+MacroAdditions.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can anybody help me? I would appreciate it a lot! Thanks in advance,

Joe

I guess I was wrong in assuming "The examples in this guide were built using Objective-C and have been tested with the current released OS and current version of Xcode" meant that the API was tested for the current version of iOS and Xcode.

Это было полезно?

Решение

Alright, so I was able to reproduce this error in my own project, so that's good. I don't think the problem is specific to iOS 7, but rather to their poor instructions for integration. But, I was able to get something working, so hopefully you can also. But, if you haven't yet really started, your best bet is probably cloning HelloWorld and putting your code in it. Moving on.

The version of the files they in the Frameworks directory appear to have a bug in it, and it's at a level that us developers can't fix. I'm filing an issue on GitHub (will update this later) for their info. Fix Number 1: Use the three files from the HelloWorld/Frameworks directory instead of the top-level frameworks directory.

That will get you building and running, but you'll get an error in your log because you're trying to use an external accessory without declaring permissions on it. So, head over to your Info.plist, and add a key: "Supported external accessory protocols", with item 0 being "com.orbotix.robotprotocol". Worth a thousand words:

Plist Changes

From there, you just need to implement the rest of what they show in that sample. Easier said than done. I ended up making a handful of other changes to make my project look more like HelloWorld, but I'm not sure they're necessary. I've uploaded the initial, working state of my project to GitHub if you want to take a look / give it a try. It's here: SpheroSays on GitHub

Good luck!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top