Azure / azure-notificationhubs-ios

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

[BUG] Framework gives compile errors when using Xcode 16 #150

Open johnmartino opened 3 months ago

johnmartino commented 3 months ago

Describe the bug The framework doesn't compile under Xcode 16.

Exception or Stack Trace The error is: 'ANHAsync.h' file not found

To Reproduce Add the package in a project and try to build in Xcode 16.

Code Snippet No application specific code required.

Expected behavior The framework should build.

Screenshots

Setup (please complete the following information):

Additional context Nothing to add.

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

shvetsjr commented 2 months ago

Having same issue with using xcode 16 too

shvetsjr commented 2 months ago

@johnmartino I cloned the repo for now and made few changes and it seem to work.

Firstly I removed ANHAsync.h file and replaced ANH_SWIFT_DISABLE_ASYNC with NS_SWIFT_DISABLE_ASYNC and secondly I had to fix few imports but not sure its the correct way to do it but it worked..

-#import "SBTemplateRegistration.h"
+#import "../SBTemplateRegistration.h"

Hope for official fix

johnmartino commented 2 months ago

Thanks @shvetsjr. I will try your solution, or maybe just add the framework itself. I know that there won't be a fix before Xcode 16 is officially released in a few months. I was hoping that this would be fixed beforehand since I really dislike not upgrading when it's time.

johnmartino commented 2 months ago

It seems that Xcode 16 beta 4 fixes this issue.

learnwithgabbar commented 2 months ago

Not Fixed in Xcode 16 beta 4 SPM way

newky2k commented 2 months ago

This was an issue in Xcode 15 beta too, but resolved itself by the final release - #145

I would be good if this could be resolved, as above, as it will make it easier to test out new Xcode betas before they launch and this is the only SPM package we use that fails.

learnwithgabbar commented 3 weeks ago

Still in the Xcode 16 RC

newky2k commented 3 weeks ago

@redlistdevs Do you think the changes you did on your fork could be PR'd back into the main repo and fix this issue moving forward so we don't all get this everytime Apple releases a beta?

nharbo commented 2 weeks ago

It's not even only in the beta - the GM version (Xcode 16.0) gives this error as well.

johnmartino commented 2 weeks ago

I was informed that there will be a fix for this but it may not happen for several weeks or even months. It's a resource issue but they are trying to rectify the issue. I know that's not a satisfying answer. For now, I'm directly including the framework.