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

No such module 'MQTTNIO' for watchos application #7

Closed
arrow53 opened this issue Aug 20, 2022 · 5 comments
Closed

No such module 'MQTTNIO' for watchos application #7

arrow53 opened this issue Aug 20, 2022 · 5 comments

Comments

@arrow53
Copy link

arrow53 commented Aug 20, 2022

Per the instructions I have added this package, but I can't seem to import the module. Seems to work fine for an ios application. I must be missing something obvious. Is there anything I can try?

This is the relevant code in my swift code

import MQTTNIO
@sroebert
Copy link
Owner

I just tested with a watch application and it seems to work fine.

  • Which deployment target do you have?
  • What is the actual error you are getting in Xcode?

@arrow53
Copy link
Author

arrow53 commented Aug 21, 2022

@sroebert awesome it works. I have a standalone watchos application as my target.

The error is just No such module MQTTNIO which shows up in the xcode UI.

Let me play with this a bit more. i'm sure i'm doing something stupid. Thanks for confirming it works!

@sroebert
Copy link
Owner

That happens from time to time with Xcode, in the new beta version you can clear the errors from the menu before building, this might hide it.

@arrow53
Copy link
Author

arrow53 commented Aug 26, 2022

@sroebert is there a chance you can share your watch application. I basically create a new standalone watchos "Watch App", add the mqtt-nio package with File -> Add Packages... with URL https://github.com/sroebert/mqtt-nio.git (tried main and 2.6.0) and then added the import MQTTNIO in the ContentView swift file at the top. I get the error No such module 'MQTTNIO'

@arrow53
Copy link
Author

arrow53 commented Aug 27, 2022

in case anyone runs into this the trick is to add the package to the extension and not the base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants