sanzaru / SimpleToast

SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or MacOS applications in SwiftUI. Because of the flexibility to show any content it is also possible to use the library for showing simple modals.
Apache License 2.0
388 stars 33 forks source link

As of macOS15 + Xcode 16 I get "Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore" from this package #40

Open itsthisjustin opened 2 months ago

itsthisjustin commented 2 months ago

Not sure if it's your fault or mine but I just noticed this was the package the reference comes from. Super stuck at the moment so any ideas would be great.

sanzaru commented 2 months ago

@itsthisjustin This error usually occurs when a library or framework has not been added to "Frameworks, Libraries, and Embedded Content" inside the "General" tab in your project's target and to "Link Binary With Libraries" inside the "Build Phases" tab.

Has the SimpleToast library been added in both places?

itsthisjustin commented 2 months ago

To be clear, this issue is ONLY on xcode 16 and ONLY on macOS 14 and iOS 17 when build from xcode 16. iOS 18 and macOS 15 work fine.

sanzaru commented 2 months ago

I can test this tomorrow on a macOS 14 device. However, it sounds more like an issue with Xcode, as it seems to be losing the reference to the library. Are you opening the same project file in different versions of Xcode? I’ve encountered various problems in the past by doing that.

itsthisjustin commented 2 months ago

Opening the project on Xcode 15 works fine. Opening it on Xcode 16 does not work on macOS14. Opening it on Xcode 16 on macOS 15 works and runs, but not if you run the binary on macOS 14 or iOS 17. Removing your library fixes the issue on all OS's unfortunately (fortunately?)

sanzaru commented 2 months ago

I tried several combinations but, unfortunately, I cannot reproduce your issue. I still suspect that your Xcode might be causing the problem. Perhaps removing and re-adding the package could help. For me, any combination of macOS and Xcode works.

gferrara8596 commented 2 months ago

Downgrading to version 0.8.0 on swift package manager temporarily will resolve the problem

sanzaru commented 2 months ago

The changes between versions 0.8.0 and 0.9.0 mainly focus on the drag gesture. 🤔

@gferrara8596 @itsthisjustin do you use the library via SPM or CocoaPods?

gferrara8596 commented 2 months ago

Before yesterday with cocoapods but now with spm