walterholohan / react-native-crisp-chat-sdk

React-Native bridge for Crisp Chat iOS and Android SDK's
MIT License
70 stars 26 forks source link

"No such module 'Crisp'" on iOS #8

Closed minuitagency closed 3 years ago

minuitagency commented 3 years ago

Hi,

When trying to build the app with Xcode I get this error message, it doesn't appear on 1.xx releases but I want the latest one obviously,

Any idea?

Thanks,

Théo

walterholohan commented 3 years ago

Hey Theo, what version of xcode are you using? And also what version of RN are you on? Have you tried running your app from the command line using 'react-native run-ios'. Make sure to do a clean too of your ios repo.

rajscet commented 3 years ago

I have same issue

RN 0.63.1 version Xcode 11.5

moxspoy commented 3 years ago

Hallo, could you give additional information regarding to your issue?

step to reproduce [Write here]

expected result [Write here]

actual result [Write here]

**Version*** React native Crisp chat sdk Xcode/Android Studio

walterholohan commented 3 years ago

I've just tested the example app in https://github.com/walterholohan/react-native-crisp-chat-sdk/blob/master/example and there are no issues. The example is using "react-native": "0.63.2". What does your Podfile look like? Are you auto-linking the library?

After you update the package to 0.2.1 you will need to do pod install --repo-update or pod update Crisp

Also, make sure to check out https://github.com/walterholohan/react-native-crisp-chat-sdk/blob/master/example/src/App.tsx to see how you trigger the iOS Crisp chat modal to appear in your app. You need to call CrispChatSDK.show();

walterholohan commented 3 years ago

Ohh @minuitagency @rajscet I know what your issue is. In 0.2.1 there was a breaking change for how you import Crisp into your AppDelegate.m. Check out https://github.com/walterholohan/react-native-crisp-chat-sdk/blob/master/example/ios/CrispChatSdkExample/AppDelegate.m

TLDR Import Crisp using #import <Crisp/Crisp.h>

And configure in didFinishLaunchingWithOptions using [CrispSDK configureWithWebsiteID:@"YOUR_WEBSITE_ID"];

minuitagency commented 3 years ago

Thanks so much! I’ll try that on Monday and keep you updated,

Théo

rajscet commented 3 years ago

Thanks will check and let you know

rajscet commented 3 years ago

Screenshot 2020-09-20 at 6 15 10 PM xcode 11.5 and your example is not working. In my app also same issue

walterholohan commented 3 years ago

Have you run "pod install" on the example project? The error looks like the Crisp package is mot installed

walterholohan commented 3 years ago

@rajscet I've just stumbled across the below on StackOverflow for your 'No such module' error image

Instead of building in Xcode, can you try build using the command line e.g.react-native run-ios

rajscet commented 3 years ago

@minuitagency does it work for you? @walterholohan I am opening xcworkspace already

walterholohan commented 3 years ago

@rajscet can you see Crisp in your pods? image

rajscet commented 3 years ago

I installed it but I can see in products folder only(.a file). is there any option so that I can see ?

walterholohan commented 3 years ago

In that case you haven't installed your pods correctly. What command did you use to install the pods in the example app?

rajscet commented 3 years ago

first I do yarn install then cd ios and pod install

walterholohan commented 3 years ago

what errors do you get in the terminal when you run react-native run-ios?

minuitagency commented 3 years ago

Hi guys, I have the same error as @rajscet still...

I'm launching from workspace, I added it as you told in the example

walterholohan commented 3 years ago

What errors do you get when running the example app?

Can you follow the instructions given in https://github.com/walterholohan/react-native-crisp-chat-sdk/blob/master/CONTRIBUTING.md when running the example app from your local machine?

rajscet commented 3 years ago

@rajscet can you see Crisp in your pods? image

yes it(crisp) is pod folder

walterholohan commented 3 years ago

Can you run the following commands in the react-native-crisp-chat-sdk directory

  1. yarn bootstrap
  2. yarn example start
  3. yarn example ios

And then take a screenshot of the errors in the terminal

rajscet commented 3 years ago

`/Users/dreams/Documents/react-native-crisp-chat-sdk-master/ios/CrispChatSdk.swift:10:8: error: no such module 'Crisp' import Crisp ^

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'OpenSSL-Universal' from project 'Pods') warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'boost-for-react-native' from project 'Pods') warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'CocoaLibEvent' from project 'Pods')

BUILD FAILED

The following build commands failed: CompileSwift normal x86_64 /Users/dreams/Documents/react-native-crisp-chat-sdk-master/ios/CrispChatSdk.swift CompileSwift normal x86_64 /Users/dreams/Documents/react-native-crisp-chat-sdk-master/ios/CrispChatView.swift CompileSwift normal x86_64 /Users/dreams/Documents/react-native-crisp-chat-sdk-master/ios/CrispViewManager.swift CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (4 failures)

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1.`

rajscet commented 3 years ago

@rajscet same error i am getting see above log

rajscet commented 3 years ago

No need of this SDK i fixed it by loading following url in webview

https://go.crisp.chat/chat/embed/?website_id=your_web_id

walterholohan commented 3 years ago

Ive just released a new version of this library that updates both iOS and Android SDK's

walterholohan commented 3 years ago

@minuitagency can you check to see if you still have this issue?

talhatsk commented 1 year ago

@walterholohan I'm facing this issue. How to fix it? react-native-crisp-chat-sdk: 0.13.4 react-native: 0.71.3 xcode: 13.2.1

baptistejamin commented 1 year ago

Hey there !

It would help if you could zip a sample project so we can replicate the problem

talhatsk commented 1 year ago

Hey there !

It would help if you could zip a sample project so we can replicate the problem

wont be able to provide the project, is there any other way for me to debugg it for you?

baptistejamin commented 1 year ago

You can create a boilerplate for instance.

Just to make sure. Did you pod install?

talhatsk commented 1 year ago

You can create a boilerplate for instance.

Just to make sure. Did you pod install?

Yes i have done pod install

talhatsk commented 1 year ago

@baptistejamin i tried running the example given in this package, having same issue on that.