Azure-Samples / communication-services-ios-quickstarts

Sample code for Azure Communication Services iOS quickstarts
MIT License
11 stars 24 forks source link

Push Notification: 'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead. #70

Open mattials opened 8 months ago

mattials commented 8 months ago

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Followed the Microsoft Azure tutorial link for integrating push notifications into a chat application. Encountered the error message: "'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead."

Any log messages given by the failure

The error you provided, "'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead," indicates a problem with the AzureCore dependency.

Expected/desired behavior

Successful compilation without errors on ./add-chat-push-notifications in xcode 15.

OS and Version?

macOS Ventura. xCode 15

Versions

pod 'AzureCommunicationChat', '~> 1.3.3'

Mention any other details that might be useful

Encountered the same issue in both a direct integration into the chat project and when using the Microsoft-provided example project link. The issue appears to be related to the AzureCore dependency, and a possible solution was suggested in the Apple Developer Forums link, recommending the use of @available(iOSApplicationExtension, unavailable). This change may need to be implemented in the Azure SDK to resolve the issue.

Issue
mattials commented 8 months ago

The workaround: https://github.com/Azure/azure-sdk-for-ios/pull/1673#issuecomment-1888098995