poingstudios / godot-admob-ios

Godot's AdMob Plugin for iOS with support for Mediations.
https://poingstudios.github.io/godot-admob-plugin/
MIT License
89 stars 14 forks source link

Invalid plugin config file MyStaticlib.gdip while exporting ios project from Godot #81

Closed kyadalu1 closed 6 months ago

kyadalu1 commented 6 months ago

This is not an issue with your Admob Plugin. I just needed your attention on an issue i am facing. I am currently learning how to create an iOS plugin for myself, I tried going through your repo but it seems extremely complicated for me and i am not sure where to even start. Sorry to raise this as an issue, if you find this annoying you can close the issue.

I am trying to learn how to create iOS plugin for Godot engine. I just created simple iOS plugin which stores some key value data in UserDefaults and retrieve it. Here are the steps which i followed

  1. Download Godot source code from master branch
  2. brew install scons
  3. cd to Godot source code directory in terminal and ran scons platform=ios target=template_release -j4
  4. Open xcode and selected static library for iOS
  5. Go to the downloaded godot-repo, navigate to platform / iOS folder and add this path to Build settings => Header Search Paths in Xcode
  6. Add the required code to my objective-c file & selected my iOS simulator and ran Command + B for the library to be build which is successfull
  7. Create my Godot poject in Godot editor and created a bin folder
  8. Found the libmystatticlib.a from my iOS project and copy pasted it to the bin folder of my iOS project
  9. Create a folder called iOS and inside that a plugins folder. In pulgins folder created .gdip file and copied the code from docs and refactored it according to my needs
  10. In Godot, click project => Export => Add iOS => Click Fix Import Error => Added bundle identifier & App Store team id
  11. Created a button in Godot tscn and added pressed listener to gdscript file
  12. On button pressed code , added the followed code
var bridge = load("res://ios/plugins/MyStaticlib.gdip").new()
bridge._save_value("Hello", "keyhello")

When i try to export my godot project for iOS i keep getting error saying Invalid plugin config file MyStaticlib.gdip

Which step am i doing wrong. Please help

Here is the sample ios plugin repo Here is the sample godot projectn repo

gumaciel commented 6 months ago

You shouldn't do this, please check the "godot-admob-plugin" to see how we use the plugin.

It is the same for iOS and Android.

kyadalu1 commented 6 months ago

@gumaciel Thank you for your reply. My question is not on "godot-admob-plugin" but on how to create an ios plugin for godot