Skip to content
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

Build failure in Objective C++ projects [BUG] #136

Open
3 tasks done
diegomichell opened this issue Jan 2, 2023 · 7 comments
Open
3 tasks done

Build failure in Objective C++ projects [BUG] #136

diegomichell opened this issue Jan 2, 2023 · 7 comments
Assignees

Comments

@diegomichell
Copy link

diegomichell commented Jan 2, 2023

Describe the bug
Some of the files like MSNotificationHub.m and MSNotificationHub.h use "template" as the name for properties which is a reserved keyword in Objective C++, this essentially prevents projects that use Objective C++ from calling this library and this also affects React Native users as the latest version of the framework uses Objective C++ for the AppDelegate.mm

Exception or Stack Trace
Expected identifier; 'template' is a keyword in Objective-C++

To Reproduce
Reference the library in .mm files.

Code Snippet
+ (BOOL)setTemplate:(MSInstallationTemplate *)template forKey:(NSString *)key { return [sharedInstance setTemplate:template forKey:key]; }

this and other similar code where "template" keyword is used.

Expected behavior
The project should compile without errors.

Setup (please complete the following information):

  • OS: 16.2
  • IDE : 14.2
  • Version of the Library used: 3.1.5

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@brannon brannon self-assigned this Jan 23, 2023
brannon added a commit that referenced this issue Feb 7, 2023
causing compilation errors when building Objective C++ source files.

Introduce a unit test that utilizes the Objective C++ compiler, to
prevent future issues.

ref: #136
@brannon
Copy link
Collaborator

brannon commented Feb 7, 2023

Thanks for pointing this out! I have a PR that should resolve this. I'll get it merged once it passes the required checks.

brannon added a commit that referenced this issue Feb 7, 2023
This was causing compilation errors when building Objective C++ source files.
Introduce a unit test that utilizes the Objective C++ compiler, to
prevent future issues.

ref: #136
@brannon
Copy link
Collaborator

brannon commented Feb 7, 2023

This should be fixed in #138

@brannon brannon closed this as completed Feb 7, 2023
@diegomichell
Copy link
Author

diegomichell commented Mar 26, 2023

This was fixed, though do you know when a new binary will be created and available for installation through cocoa pods that includes this change?

@mrzslr
Copy link

mrzslr commented Feb 12, 2024

hey, this issue still exists. even downloading the latest release source codes and still using template keyword instead of installationTemplate

@brannon
Copy link
Collaborator

brannon commented Mar 7, 2024

@marstr this issue was fixed a while back, but it requires a new release of the SDK.

I'll reopen the issue for now. We can close it once the fix is released.

@brannon brannon reopened this Mar 7, 2024
@marstr
Copy link
Member

marstr commented Mar 7, 2024

Acknowledged. Thanks for bringing this back to our attention, @brannon.

@hieucm
Copy link

hieucm commented Mar 25, 2024

Can we know when this fixed is released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants