-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Xcode recursive search frameworks in project dir #28153
Make Xcode recursive search frameworks in project dir #28153
Conversation
Were you able to bypass this in the XCode project @DrMoriarty? Is your framework an ObjectiveC .a file? I’m working on this as well... |
@vini-guerrero I'm using facebook sdk and many firebase related frameworks, and they works pretty well with this enhancement. |
That’s exactly what I’m trying to achieve... Facebook login, can you provide an example on this @DrMoriarty? I got a little bit confused on how to pass/recieve variables between Godot and the .a framework (perhaps call_deferred?) To retrieve the token... |
@vini-guerrero You can check my FB module: https://github.com/DrMoriarty/godot-facebook |
Thank you!! Do you still have to create the GDNative part / reference the framework as stated here ( #11783 ) gdnlib extension to refer this framework ? @DrMoriarty |
@vini-guerrero The FB module has native C++ class which uses obj-c frameworks. All frameworks placed in My
|
Oh I understand now! So, no GDNative required acctually... thanks a lot @DrMoriarty! |
Did you need a developer account to test local device @DrMoriarty ? I got some issues with linker: |
@vini-guerrero No, you should use this module when rebuild iOS template. Copy GodotFacebook folder to godot/modules. Then rebuild template as described in http://docs.godotengine.org/en/3.1/development/compiling/compiling_for_ios.html |
@DrMoriarty I thought the reason of ( #11783 ) ( Similar to 3.2 Android Custom Modules Feature ) was not having anymore the need of re-compiling the engine since modules could be added via .gd ( So frameworks such as Facebook will be in both res://addons// and godot/modules ) I'm asking because I've been also working on a few custom iOS modules. |
@vini-guerrero As far as I know #11783 can add any frameworks to your project but it doesn't add you any gd script interface to it. |
Makes sense now, thanks for the explanation @DrMoriarty Hopefully some future release allows custom modules thru editor on iOS as well... |
@DrMoriarty took the opportunity to go on and test your commit ( applied the changes on 3.1 ) Facebook Module Compiling ( all 3 archs ) -> Worked Here's the Godot script ( basic scene ) with this attached: The XCode part worked pretty well with recursive as it got compiled. |
@vini-guerrero could you show the run log from Xcode? |
Do you have discord or slack @DrMoriarty ? When I ran on XCode it didn't print anything, after unpluggin it crashed. |
Finally, got the logs pulled out, @DrMoriarty :
|
@vini-guerrero it looks like your app didn't linked against FBSDKCoreKit.framework |
@DrMoriarty weird is that it didn’t show any error during compile and the CoreKit.framework is inside the solution folder. 🤔 Another weird behavior is that even with this framework files inside the Godot project, it still requires pointing at them later on in XCode... |
@vini-guerrero just thought about that, did you add -ObjC linker flag? |
Hi @DrMoriarty, I did added the flag, however it did not find the frameworks on the first try, I even tried downloading the sdk (newest from fb source) and include manually... I tried referencing the sdk within the module folder, XCode says dependencies are fixed, but I couldn’t solve that error... maybe I'm doing something wrong, not sure, still researching on how to do it. |
@vini-guerrero have you find out whats the issue? have you complete FB login integration? |
@atologist-pratik still having the same issue =/ I know that the problem is XCode not linking the library itself, but inside XCode it shows ok, but when you compile it throws that error, so I'm not sure what is the proper way to link this lib. |
Hey! Thanks for this. This looks good to me, but it should go against the |
e1acfbf
to
6419227
Compare
@mhilbrunner done |
Thanks again! |
Cherry-picked for 3.1.2. |
Use case:
I have made exporting plugin as described in #11783
My frameworks placed in "res://addons/iOS/ThirdParty.framework"
The exporting plugin copied them in ProjectDir/addons/iOS/ and Xcode doesn't find them without recursive search flag.