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

SwiftUI Hello World app wouldn't build with SDK version 2.4.1 #191

Closed
nivbp7 opened this issue Oct 10, 2024 · 3 comments · Fixed by #207
Closed

SwiftUI Hello World app wouldn't build with SDK version 2.4.1 #191

nivbp7 opened this issue Oct 10, 2024 · 3 comments · Fixed by #207

Comments

@nivbp7
Copy link

nivbp7 commented Oct 10, 2024

Hello,
I've created a new Xcode project. I've selected SwiftUI as the interface.
I've added the TelemetryDeck SDK, as described in this guide, where the Dependency Rule is set to Up to Next Major Version and the selected version is 2.4.1 release link.
Doing just that (not even importing TelemetryDeck to any file or Initializing the package, and the app fails during the build phase.
The failure is in the TelemetryClient file, in this line:

nonisolated(unsafe)

nonisolated can not be applied to stored properties

If I change the Dependency Rule to Exact Version and the selected version 2.3.0, the app can be built and run.

My setup:
Xcode: Version 15.0.1 (15A507)
macOS: 13.6 (22G120)
mac: MacBook Pro 13-inch, 2020, Four Thunderbolt 3 ports, 2 GHz Quad-Core Intel Core i5
simulator: iPhone 13 Pro, iOS 17.0.1

@gparadelo
Copy link

Same issue with version 2.5.0

@Jeehut
Copy link
Contributor

Jeehut commented Nov 26, 2024

Thank you for reporting this. I just investigated and found that the nonisolated(unsafe) was introduced via SE-412 in Swift 5.10, which shipped in a later version of Xcode. Unfortunately, later versions don't show that this was missing in Swift 5.9 even though the SDK defines Swift 5.9 as its target.

I rewrote the code to use a different approach without making use of nonisolated(unsafe) so we can reinstate support for Swift 5.9. Just waiting for #207 to get merged, should be fixed in the next update!

@Jeehut
Copy link
Contributor

Jeehut commented Dec 2, 2024

@nivbp7 @gparadelo I'm happy to inform you that the fix is now part of the new SDK release 2.6.0.

Please give it a try and let me know if you run into any issues! Thank you again for reporting this. 🙏

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