OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
496 stars 263 forks source link

[Bug]: Can not build at AppCenter #1420

Closed devperson closed 6 months ago

devperson commented 6 months ago

What happened?

I use OneSignal.Xamarin 4.3.5 in my Xamarin.iOS project (I know that there is a newer version - OneSignal.DotNet but I can not migrate for now). It builds in Visual Studio and Visual Studio for Mac but fails at AppCenter. I get the following errors:

"/Users/runner/work/1/s/testProject.iOS/testProject.iOS.csproj" (Rebuild target) (1) ->
(_CompileToNative target) -> 
  MTOUCH : error MT1035: Cannot include different versions of the framework 'OneSignal.framework' [/Users/runner/work/1/s/testProject.iOS/testProject.iOS.csproj]
  MTOUCH : error MT1036: Framework 'OneSignal.framework' included from: /Users/runner/.nuget/packages/onesignalsdk.xamarin/4.3.5/res/iOS/OneSignal.xcframework/ios-arm64/OneSignal.framework (Related to previous error) [/Users/runner/work/1/s/testProject.iOS/testProject.iOS.csproj]
  MTOUCH : error MT1036: Framework 'OneSignal.framework' included from: /Users/runner/work/1/s/packages/OneSignalSDK.Xamarin.4.3.5/res/iOS/OneSignal.xcframework/ios-arm64/OneSignal.framework (Related to previous error) [/Users/runner/work/1/s/testProject.iOS/testProject.iOS.csproj]

Steps to reproduce?

Publish the Xamarin.iOS project with OneSignal.Xamarin ver 4.3.5 component to AppCenter. Select Xamarin.iOS 16.1 in the build settings

What did you expect to happen?

It should build without issues

OneSignal iOS SDK version

4.3.5

iOS version

16

Specific iOS version

No response

Relevant log output

No response

Code of Conduct

nan-li commented 6 months ago

Hi @devperson, I see this post in our Xamarin SDK that looks similar to your issue: https://github.com/OneSignal/OneSignal-Xamarin-SDK/issues/375.

Please take a look at how the reporter was able to resolve the issue, and if you are able to apply the same steps.

emawby commented 6 months ago

Closing the issue here. If you continue to have problems lets continue the conversation in the thread linked above!

devperson commented 6 months ago

Thanks @emawby, yes it seems it can help. I will check it out