Skip to content
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

[not a bug][help with xcode plugin build] building the plugin successful, building godot project with the plugin results with a fail. #5

Open
yan88a opened this issue Jan 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@yan88a
Copy link

yan88a commented Jan 24, 2024

Godot version

3.5.1

Plugin version

v1

Phone information

iphone 11

Issue description

Thats not a plugin issue, but more of an ask for help with xcode & godot building process.
so - thanks for the help!

i downloaded the source code for the plugin and the extracted headers for v 3.5.1.

i work with xcode 14 & have scons installed.

Steps to reproduce

  1. download the plugin source code.
  2. download godot extracted headers for 3.5.1
  3. add the search paths in xcode for the headers - $(SRCROOT)/godot, $(SRCROOT)/godot/platform/iPhone, $(SRCROOT)/
  4. build the project in xcode - success! (build for any ios device)
  5. copy the file from build folder (which for some reason builds as debug even when i change the config to build for release - probably doing something wrong --> but it should work too..).
  6. add it to my project under ios --> add the gdip file (i used yours)
  7. enable the plugin in the export settings.
  8. export the project.
  9. go the exported project, open it in xcode and build --> build fails with the following error:
    Undefined symbol: ClassDB::bind_methodfi(unsigned int, MethodBind*, MethodDefinition const&, Variant const**, int)

Additional context

No response

@yan88a yan88a added the bug Something isn't working label Jan 24, 2024
@kyoz
Copy link
Owner

kyoz commented Jan 24, 2024

The gdip file is something like this:

[config]
name="Local Notification"
binary="local-notification.a"

initialization="register_local_notification_types"
deinitialization="unregister_local_notification_types"

[dependencies]
linked=[]
embedded=[]
system=[]

capabilities=[]

files=[]

[plist]

Can you check the name of your plugin file, your initialization and deinitialization function in your plugin code. They all must match, if else godot will unable to register your plugin, so will cause build error.

Another thing you must pay attention is that when exporting for iOS, there will be a small checkbox Export with debug, like so:
Screenshot 2024-01-24 at 16 06 43

If you just building for release, you have to uncheck that checkbox or else the plugin will not work.

I think you should build both debug and release file, something like:

  • yourplugin.debug.a
  • yourplugin.release.a

Put that along with gdip file with binary:

binary="yourplugin.a"

It will automatically work for both debug and release.

@yan88a
Copy link
Author

yan88a commented Jan 24, 2024

@kyoz you rock! thanks for the reply.

yep - think i had a naming gap - the [pluginName].release/debug.a did the trick and it compiles just fine.

have a small issue with not finding the plugin in run time, i do see it in the export screen, but for some reason the engine.has_singletone("...") wont return it - probably something with the naming - i'll poke it a bit more.

again - thanks!

@kyoz
Copy link
Owner

kyoz commented Jan 24, 2024

Yup, that normally by wrong plugin name, see this.

I haven't test if Godot support space between plugin name but to be sure you should name it without space 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants