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

[Bug]: iOS - framework not found OneSignalCore #76

Open
1 task done
mkjainit opened this issue Oct 26, 2023 · 7 comments
Open
1 task done

[Bug]: iOS - framework not found OneSignalCore #76

mkjainit opened this issue Oct 26, 2023 · 7 comments

Comments

@mkjainit
Copy link

mkjainit commented Oct 26, 2023

What happened?

Sdk not working on iOS platform with Latest .net8-rc2 - MAUI

Steps to reproduce?

1. Create new .Net MAUI project using latest .net8 rc2
2. Add onesignaldotnet sdk
3. target the ios platform 
3. Build the solution and it will failed with error

XCode version 14.3.1, iOS version 16.1, 16.4, 16.0
MAUI .NET 8 RC 2

What did you expect to happen?

I expected to build the MAUI app by targeting iOS platform

Relevant log output

1>Tool xcrun execution finished (exit code = 1).
1>ld: framework not found OneSignalCore
1>clang: error: linker command failed with exit code 1 (use -v to see invocation)
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.8968-net8-rc2\targets\Xamarin.Shared.Sdk.targets(1556,3): error : clang++ exited with code 1:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.8968-net8-rc2\targets\Xamarin.Shared.Sdk.targets(1556,3): error : ld: framework not found OneSignalCore
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.8968-net8-rc2\targets\Xamarin.Shared.Sdk.targets(1556,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@emawby
Copy link
Contributor

emawby commented Nov 3, 2023

Hello @mkjainit thank you for reporting. Were you using Windows or Mac to build this and with visual studio or visual studio code with the extensions? Additionally were you using the hot restart feature?

@mkjainit
Copy link
Author

mkjainit commented Nov 4, 2023 via email

@msmoises69
Copy link

msmoises69 commented Dec 4, 2023

I'm getting same error with Visual Studio 2022, maui .net 7.0, OneSignal version 5.0.2
When target is android, everything works fine.

@emawby
Copy link
Contributor

emawby commented Jan 17, 2024

The next release of the SDK will no longer be using the xamarin tool chain to and instead be using .net7. We were not able to reproduce this issue using the .net7 tools. I will ping here when the release is available.

@grabnerM
Copy link

grabnerM commented Jun 7, 2024

@emawby as of today we use version 5.1.3. As I still can´t build my ios app, can you predict, when the new version including the bug fix will be released?

@l0gaw
Copy link

l0gaw commented Jun 14, 2024

Is there any workaround here?

@tele-bird
Copy link

tele-bird commented Sep 14, 2024

I have the same issue. I get these linker errors building our iOS app using the latest version: OneSignalSDK.DotNet v5.2.1 Note that I can build and debug our Android app just fine using the same setup.

"/Users/phadley/Projects/GitHub/tele-bird/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode.csproj" (Build target) (1) -> (_LinkNativeExecutable target) -> /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(1641,3): error : clang++ exited with code 1: [/Users/phadley/Projects/GitHub/tele-bird/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode.csproj::TargetFramework=net8.0-ios] /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(1641,3): error : ld: framework not found OneSignalCore [/Users/phadley/Projects/GitHub/tele-bird/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode.csproj::TargetFramework=net8.0-ios] /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8030/targets/Xamarin.Shared.Sdk.targets(1641,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/phadley/Projects/GitHub/tele-bird/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode/HelloMauiVisualStudioCode.csproj::TargetFramework=net8.0-ios]

To reproduce the issue, using VS Code on a Macbook Pro:

  1. .NET New Project => .NET MAUI App => MauiApp1
  2. Add Existing Project => iOS Class Library => iOSLib1
  3. Modify the contents of iOSLib1 to match what I have in my HelloMauiNotificationServiceExtension project in my example repro at https://github.com/tele-bird/HelloMauiVisualStudioCode
  4. To the HelloMauiVisualStudioCode project, add a project reference to the HelloMauiNotificationServiceExtension project.
  5. Select the HelloMauiVisualStudioCode project as the Startup Project
  6. On the Run and Debug tab, click the Run and Debug button :-)

VS Code version info:
Version: 1.93.1 (Universal)
Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
Date: 2024-09-11T17:20:05.685Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

Workload info
Installed Workload Id: maui
Manifest Version: 8.0.82/8.0.100
Installation Source: SDK 8.0.300

.NET MAUI extension for VS Code info
v1.3.29

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

No branches or pull requests

6 participants