Compiling Error GSTreamer on Xcode (Swift) - ios

I am trying implementation GStreamer my personel project. I complied GStreamer tutorials successfully but I don't adding my project. I have 201 issues. Issues types same, like this;
Undefined symbols for architecture x86_64:
"_g_main_context_new", referenced from:
-[GStreamerBackend app_function] in GStreamerBackend.o
-[GStreamerBackend app_function_audio] in GStreamerBackend.o
I don't understand anything. GStreamer tutorials wroten OBJC but I codding my project with swift. How can I solve this issue or how can I implement GStreamer from my project.

Related

Firebase Unity - Undefined Symbol errors for iOS

Firebase
6.15.2
Unity
2019.4
Xcode
11.6
OSX Catalina
10.15.6
Hi there,
Relative newbie, so apologies if I’m missing anything obvious here…
I’m attempting to build a unity project for iPhone using Firebase, using cocoapods.
I'm only using Firestore within the project.
I keep getting the following set of errors when building to a device,
Undefined symbol: firebase::auth::User::GetToken(bool)
Undefined symbol: firebase::auth::AuthStateListener::~AuthStateListener()
Undefined symbol: firebase::auth::Auth::AddAuthStateListener(firebase::auth::AuthStateListener*)
Undefined symbol: firebase::auth::Auth::current_user()
Undefined symbol: firebase::g_auth_initializer
Undefined symbol: typeinfo for firebase::auth::AuthStateListener
Undefined symbol: firebase::auth::Auth::GetAuth(firebase::App*, firebase::InitResult*)
I’ve tried all of the suggestions in this thread :
iOS - Firebase Undefined symbols for architecture x86_64 - Stack Overflow
And am at a loss as to what to try next, besides smashing my head into the desk one more time.
Any pointers would be hugely appreciated!!
A good thing to remember with the Unity SDK is that it's different enough from the iOS SDK that the specific fixes there might mess with the games tooling a little bit.
When you export, EDM4U should auto-generate a Podfile and run install for you. So make sure you just go straight to the xcworkspace rather than opening the xcproj. If you're successfully running pod install for example on the generated project, then CocoaPods should already be setup enough for this to not be the issue.
Now the linker errors you're getting are part of the C++ SDK. This is the middle layer of the SDK:
| Unity (C#) |
|-----------------------------------------------------------|
| C++ |
|------------------------------------------- |
| Android (Java/Kotlin) | iOS (ObjC/Swift) | Desktop (C++) |
These files you're looking for on iOS are .a files in Assets/Plugins/iOS. If you're not using the Unity Package Manager, make sure you haven't removed these (.a is a common exclusion pattern for version control) - and try re-adding the SDK if you have. For the Unity Package Manager, it should just work - you can try deleting the Library directory with Unity closed and let Unity regenerate this (pulling down the packages in the process). I believe that the file you're missing is libFirebaseCppAuth.a, although whatever is causing an issue here could be affect the other .a files that are needed.
If the file is included, ensure that it's included in your iOS build:
LMK if that helps!
I had the same problem and solved it by adding the Firebase Authentication package on my Unity Project.
I don't use any authentication on my game, so it is a workaround that solved my problem. I think there's a bug on Firebase core requiring these authentication package.

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

Compile Speex on xCode for iOS

I'm trying to compile and use the Speex codec for an iPhone app. I've used several tutorials:
http://codeforfun.wordpress.com/2010/04/29/compile-speex-for-iphone/
Also tried to compile it with this suggestion:
Cross -Compiling speex library for ios
and offcourse change the "SDKROOT" to "iphoneos"
all of this got me to a problem that I cannot really create binary files. I think I've tried everything!
I think the issue is something about makefile missing. I've changed the original Makefile.in to a "makefile" and now xCode can find it but still it doesn't work.
The error I get is : d: warning: directory not found for option '-L.../CSource/libspeex/.libs'
Undefined symbols for architecture armv7s:
"_speex_nb_mode", referenced from:
-[MainViewController viewDidLoad] in MainViewController.o
Please help!
I haven't tested it, but here is the Speex library precompiled for iOS: https://github.com/iosdevzone/IDZPrecompiledSpeex

Resources