-
Notifications
You must be signed in to change notification settings - Fork 50
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
Can't resolve the reference 'System.IntPtr ObjCRuntime.DisposableObject::get_Handle()' on 4.0.0 beta 3 #275
Comments
@Dipannita20 Thanks for reporting. Please ensure that the OneSignal Nuget references are up-to-date with the same version number. Could you provide the details regarding the type of project you are using the OneSignal SDK for? If possible, could you also share the code where you are setting up the email subscription observer? Additionally, are you using an M1 (apple silicon) Mac or an intel chip Mac? |
Double checked OneSignal Nuget references, all are up-to-date with the same version number 4.0.0 beta 3 Its Xamarin Forms project Installed Version: Professional ASP.NET and Web Tools 2019 16.11.94.52318 Azure App Service Tools v3.0.0 16.11.94.52318 C# Tools 3.11.0-4.21602.3+fc14a1355c0461af5110b74b26f6478f22d26565 Common Azure Tools 1.10 Extensibility Message Bus 1.2.6 (master@34d6af2) IntelliCode Extension 1.0 Microsoft JVM Debugger 1.0 Microsoft MI-Based Debugger 1.0 Mono Debugging for Visual Studio 16.10.15 (552afdf) NuGet Package Manager 5.11.0 ProjectServicesPackage Extension 1.0 TypeScript Tools 16.0.30526.2002 Visual Basic Tools 3.11.0-4.21602.3+fc14a1355c0461af5110b74b26f6478f22d26565 Visual F# Tools 16.11.0-beta.21514.6+b6c2c4f53ea3a08fa603ea93d6d2f808a62a21d1 Visual Studio Code Debug Adapter Host Package 1.0 Visual Studio Tools for Unity 4.11.4.0 VisualStudio.DeviceLog 1.0 VisualStudio.Foo 1.0 VisualStudio.Mac 1.0 Xamarin 16.11.000.197 (d16-11@6934992) Xamarin Designer 16.11.0.47 (remotes/origin/d16-11@e0d612363) Xamarin Templates 16.10.5 (355b57a) Xamarin.Android SDK 12.0.0.3 (d16-11/f0e3c2d) Xamarin.iOS and Xamarin.Mac SDK 15.2.0.17 (738fde344) Chip: Apple M1 Have not setup any Email subscription observer. I have initialize code on App.xaml.cs Attached full build diagnostic log |
@Dipannita20 Thanks for providing the details. Upon reproducing the issue, we were able to conclude that the issue does not exist in Xamarin.iOS versions above 15.4 and would suggest updating to the latest Xamarin version using the Visual Studio installer Alternatively, if updating the Xamarin version is not preferred, you could also change the linker behavior to we'll also be updating our docs to make a note of this requirement for the 4.0.0 release |
@tanaynigam Thanks for the information. I checked the Xamarin.iOS version which is 15.2.0.17(basically I use windows system which has latest visual studio 2019 16.11.10 and pair mac to build iOS app, Xamarin.iOS version 15.2.0.17 is available on latest visual studio 2019 windows and same get sync with Mac) . I tried alternative by setting linker behaviour to Don't Link. build was successful, notification sent. Received notification, however on tap of notification app crashed. Attached log. OneSignal_notification_error_7th_march.txt Attached OneSignal service class file(changed extension from cs=>txt) which get initialized on App.xmal.cs So do I have only option to upgrade Xamarin.iOS versions above 15.4? I have installed latest beta(ignore android part) |
@Dipannita20 Thanks for trying out the "Don't Link" build setting, good to hear that fixed build issue. For the crash you are seeing now I check the log and it is the same issue as reported in #274:
This was fixed in PR #276 and has been released in 4.0.0-beta4. I see your screenshot does show 4.0.0-beta4 already but since your stacktrace line numbers are still pointing to beta3 it seems the updated did not apply. I recommend doing a clean build to ensure OneSignal has been updated in your app. |
Additional details on |
I double checked and clean build, did a clean deployment. I am on latest beta4 Attached log for both the cases: |
@jkasten2 I have installed Visual Studio 2022 on windows which has support for Xamarin.iOS and Xamarin.Mac SDK 15.6.0.3 (caa899d24) on pairing with Mac I was able to build app with Link Framework SDKs only, which is good. But without Additional Data app is still crashing and Additional data is set to null on notification payload. I am on latest 4.0.0-beta4. Cleaned up builds multiple times before testing. Please look into these issues Microsoft Visual Studio Professional 2022 Installed Version: Professional Azure App Service Tools v3.0.0 17.1.358.51495 C# Tools 4.1.0-5.22109.6+0c82c4114a4e4b8b723b915eee3b13261db6717f Common Azure Tools 1.10 Extensibility Message Bus 1.2.6 (master@34d6af2) Microsoft JVM Debugger 1.0 Microsoft MI-Based Debugger 1.0 Mono Debugging for Visual Studio 17.1.10 (65f98f5) NuGet Package Manager 6.1.0 Visual Basic Tools 4.1.0-5.22109.6+0c82c4114a4e4b8b723b915eee3b13261db6717f Visual F# Tools 17.1.0-beta.21610.4+07b5673e4f2fa7630e78abe37f16b372353a7242 Visual Studio Code Debug Adapter Host Package 1.0 Visual Studio IntelliCode 2.2 VisualStudio.DeviceLog 1.0 VisualStudio.Foo 1.0 VisualStudio.Mac 1.0 Xamarin 17.1.0.309 (d17-1@3f96c58) Xamarin Designer 17.1.0.87 (remotes/origin/main@d50fb5635) Xamarin Templates 17.1.8 (590388a) Xamarin.Android SDK 12.2.0.4 (d17-1/19b97b7) Xamarin.iOS and Xamarin.Mac SDK 15.6.0.3 (caa899d24) |
Good to hear this part is fixed for you!
Thanks for confirming, we are looking at this on our end. We are looking to ship an update for this sometime next week. |
@jkasten2
|
Code update as per https://github.com/OneSignal/OneSignal-Xamarin-SDK/blob/4.0.0_release/Samples/OneSignalNotificationServiceExtension/NotificationService.cs resolve build issues related to OneSignalNotificationServiceExtension |
There is no update so far, any update on this? |
@Dipannita20 We are still working on the release, we will update you shortly. |
@Dipannita20 We have a release OneSignalSDK.Xamarin-4.0.0-beta5 which should have a fix for the notification open crash. Please note that we have changed the package name and namespace for the SDK from Additionally, when searching for the package on nuget.org, you will be required to search for OneSignalSDK.Xamarin to import the package |
Description:
iOS Build failed, got below log
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(254,3): error MT2101: Can't resolve the reference 'System.IntPtr ObjCRuntime.DisposableObject::get_Handle()', referenced from the method 'System.Void Com.OneSignal.iOS.OSEmailSubscriptionObserverWrapper::OnOSEmailSubscriptionChanged(Com.OneSignal.iOS.OSEmailSubscriptionStateChanges)' in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
Environment
Visual Studio 2019 version 16.11.9
OneSignal Xamarin SDK 4.0.0 beta 3
Xamarin iOS and Xamarin.Mac SDK - 15.2.0.17
XCode: 13.2.1
Added SDKs using nuget
Steps to Reproduce Issue:
Anything else:
(crash stacktraces, as well as any other information here)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(254,3): error MT2101: Can't resolve the reference 'System.IntPtr ObjCRuntime.DisposableObject::get_Handle()', referenced from the method 'System.Void Com.OneSignal.iOS.OSEmailSubscriptionObserverWrapper::OnOSEmailSubscriptionChanged(Com.OneSignal.iOS.OSEmailSubscriptionStateChanges)' in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
The text was updated successfully, but these errors were encountered: