-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules #40
Comments
Hi @lucasoliveiraw00 which errors occur on other libraries with |
About the wrapper, this is just a simple example: MobileMessagingCustomWrapper.h #import <Foundation/Foundation.h>
@interface MobileMessagingCustomWrapper : NSObject
+ (void)startMobileMessagingWithApplicationCode:(NSString * _Nonnull)code;
@end MobileMessagingCustomWrapper.m #import "MobileMessagingCustomWrapper.h"
@import MobileMessaging;
@implementation MobileMessagingCustomWrapper
+ (void)startMobileMessagingWithApplicationCode:(NSString * _Nonnull)code {
MMUserNotificationType *userNotificationType = [[MMUserNotificationType alloc] initWithOptions:@[MMUserNotificationType.alert, MMUserNotificationType.sound]];
[MobileMessaging withApplicationCode: code notificationType: userNotificationType];
}
@end AppDelegate.mm #import "MobileMessagingCustomWrapper.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MobileMessagingCustomWrapper startMobileMessagingWithApplicationCode:@"Your app code"];
return YES;
}
@end |
@riskpp could you tell me which option would it be to add the |
This is the screenshot which I did from the Example app |
@riskpp, thank you very much, this solution worked! |
You are welcome, I'll close the issue then. |
Hello, I have an error when performing
@import MobileMessaging;
import, could you help me with this problem?AppDelegate.mm:
Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
When adding the indicated flags, errors occur in other libraries when compiling.
Originally posted by @lucasoliveiraw00 in #6 (comment)
The text was updated successfully, but these errors were encountered: