Replies: 16 comments 4 replies
-
If you use the plugin generator it already includes the .m, you don’t need to create one nor the bridging header. Also your problem seems to be on the web/types part, not on the native part. |
Beta Was this translation helpful? Give feedback.
-
@jcesarmobile see changed the name, but same problem
This dependency was not found:
the socketio folder is in node_modules
|
Beta Was this translation helpful? Give feedback.
-
on the .m file.. I was only commenting on the doc which says you MUST do it thru xcode new file |
Beta Was this translation helpful? Give feedback.
-
I can install and use your plugin without problems, had to use it like this Did you run |
Beta Was this translation helpful? Give feedback.
-
I did not run npm run build on the plugin. nothing said to do that for native app |
Beta Was this translation helpful? Give feedback.
-
i see the same error.. after running npm run build in the plugin folder, or the project folder after reinstalling the plugin |
Beta Was this translation helpful? Give feedback.
-
so, here is what I did cd to my ionic vue project
|
Beta Was this translation helpful? Give feedback.
-
clone the latest copy of the repo above.. trying to use this via plugin (as I understand it, I need to wrap swift code with a plugin ) |
Beta Was this translation helpful? Give feedback.
-
i see you replied in https://forum.ionicframework.com/t/capacitor-plugin-with-3rd-party-ios-framework/185322 using this lib https://github.com/socketio/socket.io-client-swift |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
You have to add a dependency to socketio in the plugin .podspec file |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
the dependency should be to moving this to discussions as it's not a bug in Capacitor itself, but I'll update the plugin docs to remove the bridging headers part as it's not correct |
Beta Was this translation helpful? Give feedback.
-
don't know what I did, but now its loaded.. on to the next part!.. now the socketio connect is rejected due to http:// vs https:// ( and I have the info.plist options specified in the app and plugin info.plist
|
Beta Was this translation helpful? Give feedback.
-
and socketio is working.. the lib returns a promise itself, SO.. have to wait til "connect" event before emitting.... fun thanks for your help and patience |
Beta Was this translation helpful? Give feedback.
-
see above, solved |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report
trying to create plugin for socket-io.client on ios
Capacitor Version
Platform(s)
Current Behavior
Describe how the bug manifests. Be specific.
npx cap sync sees plugin
build doesn't see the plugin
ionic capacitor sync ios
code is
following the guid for plugins
https://capacitorjs.com/docs/plugins/workflow
Expected Behavior
Code Reproduction
if I knew what was causing this I would document it..
I created the plugin
then linked to project
https://capacitorjs.com/docs/plugins/workflow#local-testing
then tried to use in code by name
(this is ionic vue app)
Other Technical Details
in https://capacitorjs.com/docs/plugins/ios#export-to-capacitor, says
that does NOT happen (bridging) the .m file is generated by cap plugin setup(https://capacitorjs.com/docs/plugins/creating-plugins#plugin-generator). deleting and recreating with xcode does NOT prompt for the bridging file
all on mac
npm --version
output:7.15.1
node --version
output:v16.3.0
pod --version
output (iOS issues only):1.10.1
xcode
Version 13.0 beta (13A5154h) (needed to support iphone version 14.1, need big sur to support xcode 13
osx big sur, 11.5.1
Additional Context
Beta Was this translation helpful? Give feedback.
All reactions