OneSignal / OneSignal-DotNet-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your .NET app with OneSignal. https://onesignal.com
MIT License
16 stars 5 forks source link

[question]: Install the version 5.2.0 failed #115

Open Rt-Yi opened 3 months ago

Rt-Yi commented 3 months ago

How can we help?

Severity Code Description Project File Line Suppression State Error Could not find a part of the path 'C:\Users\xxxxxx.nuget\packages\onesignalsdk.dotnet\5.2.0\res\ios\OneSignalLiveActivities.xcframework\ios-arm64_x86_64-maccatalyst\OneSignalLiveActivities.framework\Versions\A\Modules\OneSignalLiveActivities.swiftmodule\x86_64-apple-ios-macabi.private.swiftinterface'.

Code of Conduct

emawby commented 3 months ago

@Rt-Yi I am not able to reproduce the issue in my project, but it seems like something to do with mac catalyst. The OneSignal .Net SDK does not currently support Mac Catalyst. Is your app attempting to build for mac catalyst?

DM-98 commented 3 months ago

I get the same issue; Could not find a part of the path 'H:\danny\.nuget\packages\onesignalsdk.dotnet\5.2.0\res\ios\OneSignalLiveActivities.xcframework\ios-arm64_x86_64-maccatalyst\OneSignalLiveActivities.framework\Versions\Current\Modules\OneSignalLiveActivities.swiftmodule\x86_64-apple-ios-macabi.private.swiftinterface'.

Cant upgrade 5.2.0.

FYI, my MAUI is configured to only use Android + iOS (removed Catalyst & Windows stuff in .csproj as well as their folders).

davidtolosa commented 3 months ago

I have the same error too.

jkasten2 commented 3 months ago

@Rt-Yi @DM-98 @davidtolosa some follow up questions to help us narrow down the issue:

  1. Do you get a similar error if you build on macOS directly, without going through a WIndows machine?
  2. What version of Xcode does the Mac have?
  3. What version of Visual Studio is used on Windows?
  4. What version of .NET MAUI is the project using?
  5. Does it matter if you build with the iOS device connected to the Windows machine or the macOS machine?
daltzctr commented 3 months ago

The issue here is two-fold.

  1. Now that OneSignal depends on a native XCFramework instead of the legacy solution, it uses an extremely long path that's common for apple native frameworks.
  2. Visual Studio does NOT support long paths.

You can hack together a build by enabling long paths and using terminal, but it's certainly not intuitive. The solution here on OneSignal's side is to either do a sort of symlink or static link against the native lib instead.

This is a Windows VS problem (doesn't support long paths), but OneSignal should still attempt to workaround it IMO.

daltzctr commented 3 months ago

Another alternative is to downgrade to 5.1.2

DaveBrask commented 2 months ago

Can OneSignal do something for us in 5.2.1? It is not clear how to get 5.2.0 to work in Visual Studio.

mads195 commented 2 months ago

This is the same as #108

deluxxDevelopment commented 1 month ago

Same problem here. Any news?

DaveBrask commented 1 month ago

I stuck with 5.1.2 because of worries about iOS failure. Issue #108 documents a command line workaround. I turned on Long Path support on Windows 11 for a different problem and that's probably necessary for this one too. 5.2.1 is available; I haven't tried it.

andresbarragan commented 1 week ago

Any update, I have the same problem