You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You cannot compile a target for visionOS if it imports Bugsnag as a dependency.
This is because Bugsnag uses #if TARGET_OS_IOS in many places and Apple has "changed the meaning" of this in the sense it cannot be used to identify builds for iOS devices only. It identifies that it is an iOS-like platform, and Bugsnag is gating some code using this that is not valid on visionOS.
Steps to reproduce
In Xcode 15b2, Open an iOS project that uses Bugsnag via SPM
Go to the app target and go to General > Supported Destinations
Remove the "visionOS (Designed for iPad)" destination if present
Add a "visionOS" destination.
Agree to the suggested changes
Build project
You will see compile errors about endGeneratingDeviceOrientationNotifications being unavailable in visionOS
Environment
Bugsnag version: 6.27.0
iOS/tvOS/macOS version(s): visionOS 1.0 beta
Simulator or physical device: Simulator
Xcode version: 15.0 Beta 2
Explanation
This causes an issue with this code in BugsnagClient specifically when building for visionOS:
Hi @marcpalmer. Thanks for raising. It is something we are aware of and currently discussing, I'm going to close this in favour of #1565 which I believe is a duplicate of exactly what you are suggesting.
Describe the bug
You cannot compile a target for
visionOS
if it imports Bugsnag as a dependency.This is because Bugsnag uses
#if TARGET_OS_IOS
in many places and Apple has "changed the meaning" of this in the sense it cannot be used to identify builds for iOS devices only. It identifies that it is an iOS-like platform, and Bugsnag is gating some code using this that is not valid onvisionOS
.Steps to reproduce
endGeneratingDeviceOrientationNotifications
being unavailable invisionOS
Environment
Explanation
This causes an issue with this code in
BugsnagClient
specifically when building forvisionOS
:This
endGeneratingDeviceOrientationNotifications
API is not available at all onvisionOS
so it will not compile.The solution provided by Apple engineers is to check that TARGET_OS_XR is not also set, something like:
The text was updated successfully, but these errors were encountered: