ko-devHong / react-native-mqtt

MIT License
6 stars 0 forks source link

While running in ios i am getting this issue #1

Closed sri-nayak closed 3 months ago

sri-nayak commented 4 months ago

!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod CocoaMQTT depends upon MqttCocoaAsyncSocket, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

ko-devHong commented 3 months ago

@sri-nayak Hello, I saw your reply and PR document well but I already wrote to install CocoaMQTT in Dependency. What is the problem? I don't know the difference from my existing code.

sri-nayak commented 3 months ago

@ko-devHong Hii, so when i am using this library with expo react native it asking to to add the code to install the cocomq in project direcotry . and my project version are Expo => 51.0.8 react-native 0.74.2 Node => 20

ko-devHong commented 3 months ago

@sri-nayak Yes, I've tried declaring modular_headers in podspec files, but I don't support it properly at the moment, so I want you to install it directly into the project podfile that uses this library.

ko-devHong commented 3 months ago

@sri-nayak
This is the document I looked for, and I tried to apply the solution, but it didn't work.

  1. https://github.com/CocoaPods/CocoaPods/issues/7683
  2. https://github.com/CocoaPods/CocoaPods/issues/7598
  3. https://stackoverflow.com/questions/74296853/how-to-set-module-headers-in-podspec-dependency
sri-nayak commented 3 months ago

Ook issue resolved thank u for the reference. u can decline the PR Request and again thank u. i have few doubts I am not able to confugre the topic name and queue name in mqtt could u help with this. and thank u for the library .

ko-devHong commented 3 months ago

@sri-nayak Why do we need a queue name? The name of the queue is not important. Please refer to the following instructions for the name of the topic https://github.com/ko-devHong/react-native-mqtt?tab=readme-ov-file#subscribe

OR You can run the example file that I created.

스크린샷 2024-07-08 오후 4 17 51 스크린샷 2024-07-08 오후 4 18 20
sri-nayak commented 3 months ago

And I want to persist the connection even after closing the application the connection should persist until uninstall of application could u help with this

ko-devHong commented 3 months ago

@sri-nayak Use global variables. ex) redux, react-query