Azure / azure-notificationhubs-ios

Azure Notification Hubs SDK for Apple
Apache License 2.0
35 stars 33 forks source link

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

Open diegomichell opened 1 year ago

diegomichell commented 1 year ago

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):

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

brannon commented 1 year ago

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 commented 1 year ago

This should be fixed in #138

diegomichell commented 1 year ago

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 commented 9 months ago

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

brannon commented 8 months ago

@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.

marstr commented 8 months ago

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

hieucm commented 8 months ago

Can we know when this fixed is released?

Brqqq commented 1 month ago

Are there any plans for a release @marstr ?

marstr commented 1 month ago

Howdy - I accepted a new role, and the team transitioned to new ownership in a different department. I'll see if I can get this thread some attention from the new owners. But I'm afraid I won't be of much more help than that.

wscld commented 1 month ago

Any workaround for this issue?