Sphero with iOS 7 - ios

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:
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!

Related

I can't build dlib library on xcode

I'm trying to use dlib in ios so I can run an application using face recognition
I'm following this link to build dlib for ios then the error below shows up.
Undefined symbols for architecture arm64:
"_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_", referenced from:
_dlib_check_consistent_assert_usage in DlibWrapper.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My environment
Mac (OSX) Catalina 10.15.4
SwiftUI (working with)
XCode 11.4
iPhone 6S
IOS 13.4.1
I'm afraid your title is a little misleading. You're not trying to build a library - you've downloaded a precompiled library and are trying to use it in a way it wasn't meant to be used. The library in question was not built for Intel architecture, so it won't run on the simulator. You have a number of options on how to proceed:
You can look for binaries with the appropriate architecture
Find the source code to the library (perhaps in a git project) and compile the libraries yourself
or look into Apple's Machine Learning Libraries and Technologies
https://developer.apple.com/videos/play/wwdc2019/209/
https://developer.apple.com/videos/play/wwdc2018/703/
Check out these and other WWDC videos on machine learning and ARKit as a starter.
I recommend you download Apple's own Developer app from the App Store.
https://apps.apple.com/us/app/apple-developer/id640199958
You can use it to find many videos on available resources.
There are a number of very powerful tools available. It helps if you know python, since that's where a lot of the development work is happening.
Maybe it would help if you were to look into how things are done in the iOS environment so you can better understand how it relates to other platforms.
There are many helpful articles out there, this is the first one I found:
https://towardsdatascience.com/core-machine-learning-for-ios-developers-7f2a4b19ec08
The key is to not get discouraged! There's a lot of useful information out there and it's important to look for alternatives when you've gone down a dead end.
Good Luck! 🍀

Adding GooglePlayGames API to Xcode results in multiple architecture i386 errors

So I'm trying to add Google Play Games into my app, but I'm struggling to get their sample code to work. I've seen this issue mentioned a couple times on stack overflow, but I have yet to find a definitive answer.
I'm following the manual instructions listed here:
https://developers.google.com/games/services/ios/quickstart
and adding them to the buttonclicker code here:
https://github.com/playgameservices/ios-basic-samples
What results is a 32 Undefined symbols for architecture i386 errors like the ones below.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GTLCollectionObject", referenced from:
_OBJC_CLASS_$_GTLGamesEventDefinitionListResponse in gpg(GTLGamesEventDefinitionListResponse.o)
_OBJC_CLASS_$_GTLGamesLeaderboardListResponse in gpg(GTLGamesLeaderboardListResponse.o)
_OBJC_CLASS_$_GTLGamesPlayerAchievementListResponse in gpg(GTLGamesPlayerAchievementListResponse.o)
_OBJC_CLASS_$_GTLGamesPlayerEventListResponse in gpg(GTLGamesPlayerEventListResponse.o)
_OBJC_CLASS_$_GTLGamesPlayerLeaderboardScoreListResponse in gpg(GTLGamesPlayerLeaderboardScoreListResponse.o)
_OBJC_CLASS_$_GTLGamesRoomList in gpg(GTLGamesRoomList.o)
_OBJC_CLASS_$_GTLGamesTurnBasedMatchList in gpg(GTLGamesTurnBasedMatchList.o)
...
"_OBJC_CLASS_$_GTLObject", referenced from:
_OBJC_CLASS_$_GTLGamesManagementHiddenPlayer in gpg(GTLGamesManagementHiddenPlayer.o)
_OBJC_CLASS_$_GTLGamesManagementPlayer in gpg(GTLGamesManagementPlayer.o)
_OBJC_CLASS_$_GTLGamesAchievementDefinition in gpg(GTLGamesAchievementDefinition.o)
_OBJC_CLASS_$_GTLGamesAchievementIncrementResponse in gpg(GTLGamesAchievementIncrementResponse.o)
_OBJC_CLASS_$_GTLGamesAchievementSetStepsAtLeastResponse in gpg(GTLGamesAchievementSetStepsAtLeastResponse.o)
_OBJC_CLASS_$_GTLGamesAchievementUpdateResponse in gpg(GTLGamesAchievementUpdateResponse.o)
_OBJC_CLASS_$_GTLGamesCategory in gpg(GTLGamesCategory.o)
I've added the GoogleSignIn.framework, gpg.bunde, and gbg.framework to the project.
I searched for some of these (like GTLCollectionObject) and could not find where it is referenced in the project.
I've tried it on a device, tried removing the 64-bit architecture, and a host of other things, but I'm stuck at 32 errors. What am I missing with this set up?
You need to add the GoogleOpenSource.framework as well.
This is covered in steps 3 and 4 of https://developers.google.com/games/services/ios/quickstart#option_2_manual_installation
Download and extract the latest Google+ iOS SDK from the Google+ Downloads page.
Copy the following items from the Google+ SDK into your project:
GoogleOpenSource.framework
Just out of curiosity, why no use Cocoapods? It does a great job of adding the required frameworks to the project without all the hassle of downloading from multiple sites and then copying them into the project.

Undefined symbols for x86_64 - iOS - 64-bit transition - Xcode6

I apologise for a dumb question. I really had tough time with this.
I am now, converting my existing code to support 64-bit. My app uses few frameworks
(I use kstenerud/iOS-Universal-Framework)
And I get this error.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MyFrameworkClass", referenced from:
objc-class-ref in MyUI(iPhone_MyVC.o)
MyFrameworkClass is defined in my framework, Which I built using the below settings
In my project, I use this framework and have the same build setting as above.
I am sure, I have the same setting throughout. But still I get this error. Am unsure, what else Am I missing.
You can build the static library for individual architectures and then 'lipo' them together.
Check out the excellent article here: http://blog.diogot.com/blog/2013/09/18/static-libs-with-support-to-ios-5-and-arm64/
You are building your lib for arm only, then you try to run it on x86 (simulator).
Make a lib that supports x86 (64) and use that for debug, the one you have for production.
You should include more of the error message for better help, but it looks as though whatever is providing the MyFrameworkClass class doesn't have a simulator x86_64 slice.
With Xcode 6, you update your project to use Xcode's provided framework target instead of using kstenerud/iOS-Universal-Framework

Apple Mach-0 linker warning

I'm fairly new to ios programming. I've got an app that I think is almost ready for the appstore. However, I have one remaining warning and I'm not sure how to track down where the problem lies.
Here's the warning:
(null): Ignoring file /Users/maclehose/Library/Developer/Xcode/DerivedData/epidemiologyCalculator-esumevitgvkrmsfrmqeerqjyjfoh/Build/Products/Debug-iphoneos/epidemiologyCalculator.app/epidemiologyCalculator, missing required architecture arm64 in file /Users/maclehose/Library/Developer/Xcode/DerivedData/epidemiologyCalculator-esumevitgvkrmsfrmqeerqjyjfoh/Build/Products/Debug-iphoneos/epidemiologyCalculator.app/epidemiologyCalculator (2 slices)
Can anyone give me any specific advice on how to track down the source of the warning?
Thanks,
Rich
Go to targets and then Build Settings. Then turn the architectures to (armv7, armv7s). Like this you can silence the warning.
But then when you change it like this, it means that your app doesn't gets compiled for the 64-Bit architecture (iPhone 5S uses it).
You don't need 64-bit setting, if performance is not an issue. However if you really need it, you'll need to compile and build CorePlot library from source by adding it as a dependent project inside your app.

Anybody have any luck getting FMDB to work with Rubymotion?

I'm trying to get FMDB to work with Rubymotion but every time I try to build the app I get this error:
FMDBTest(master):rake
Build ./build/iPhoneSimulator-5.1-Development
Build vendor/Pods
Link ./build/iPhoneSimulator-5.1-Development/FMDBTest.app/FMDBTest
ld: duplicate symbol _main in ./build/iPhoneSimulator-5.1-Development/objs/main.o and /Users/Bodacious/Apps/FMDBTest/vendor/Pods/build-iPhoneSimulator/libPods.a(fmdb.o) for architecture i386
Here's the app I'm using to test: https://github.com/Bodacious/FMDBTest
Has anybody else got this to work? :/
I don't know RubyMotion, but have had similar problems as I've included FMDB into projects. Bottom line, exclude fmdb.m from your build. It has it's own main() function, which is useful for testing, but it when included in a project, it gives you an error like this. You need the FMDB classes, but not fmdb.m.
I've build an ActiveRecord-like adapter for MotionModel that uses FMBD. As of now, it can be found at https://github.com/aceofspades/MotionModel/commits/sql.

Resources