Closed taoqf closed 5 years ago
I'm at the beach right now, I'll check it out later today. We'll be using this library in production in less that a month.
Take your time.
@SudoPlz Please add more details to readme about link this lib on IOS, If you have time, Thanks.
I'll try to do that, yes
@SudoPlz any news?
@taoqf I've added an example project and updated Readme.
Basically what I did was on the root of the new example project I did:
npm install sp-react-native-mqtt --save
react-native link sp-react-native-mqtt
cd ios
pod init
Added pod 'MQTTClient' in /ios/Podfile like so https://github.com/SudoPlz/sp-react-native-mqtt/blob/master/rnmqttexample/ios/Podfile#L7
then did pod install
then followed the android steps from readme
voila
Thanks, I'll try it later.
I got too many trouble on ios, so I did this: https://www.npmjs.com/package/@taoqf/react-native-mqtt. it is easy to use and do not depend on any native module.
Hi, I want use your great lib https://www.npmjs.com/package/sp-react-native-mqtt, but I am new on ios, so I don't know what does
Add pod 'MQTTClient' to your podfile and pod install
mean, and How can I do this?I tried in 2 ways:
1.
cd `my project/node_mobules/sp-react-native/ios'
vi Podfile
pod install (and I get a warning here)
Then I got an error which says could not find header file MQTTClient.h,
so I add the pods/mqttclient add header search path into RCTMqtt.xcodeprj, even did not work.
2. cd `my project/ios' I did not get a Podfile here, so I create one.
vi Podfile
pod install
then I compile the project, and get linking error.
Could you pls show me the right way to do this? thanks.
By the way, is this able to be done with
react-native link
?