livechat / chat-window-ios

Embeding LiveChat mobile chat window in iOS application
MIT License
24 stars 31 forks source link

.mm file @import LiveChat an error Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules #83

Closed wwj256 closed 3 years ago

wwj256 commented 3 years ago

QQ20210617-154733 QQ20210617-163159

pod 'LiveChat', '~> 2.0.20' My project will use.mm file, @import LiveChat error There is no way to use #import Thank you very mush!

wwj256 commented 3 years ago

use Xcode version 12.3(12C33)

wwj256 commented 3 years ago

I created a.m file, added a public method, and then.mm to call it, that is, my project is horizontal, LiveChat will not become vertical after opening, what is the solution? `+(void)showChat:(NSString)name email:(NSString)email { LiveChat.licenseId = @"1283333"; // Set your licence number here //LiveChat.groupId = @"1"; // Optionally, you can set specific group LiveChat.name = name; // User name and email can be provided if known LiveChat.email = email;

[LiveChat presentChatWithAnimated:YES completion:nil];

}`

kamil-szostakowski commented 3 years ago

Hello @wwj256. Unfortunately, your issue is not reproducible on our end. Could you please provide a sample project reproducing this issue?

I did the following steps.

  1. Created ObjC project.
  2. Integrated the widget as SPM.
  3. Added .mm file. (with some actual C++ code)
  4. Reference class defined in .mm file in AppDelegate.

App build without any issues and the widget was displayed without any issues.

kamil-szostakowski commented 3 years ago

Closed due to inactivity.