jbowmanp1107 / ImageCropper.Maui

MIT License
43 stars 10 forks source link

iOS Camera Click Crash #7

Closed samiracles closed 1 year ago

samiracles commented 1 year ago

I have been testing on iphone - iOS 16 and lower the app crashed when image is clicked using camera.

ERROR: An error occurred: 'Could not create an native instance of the type 'Bind_TOCropViewController.TOCropViewController': the native class hasn't been loaded.

FILE: PlatformImageCropper.

@jbowmanp1107 can you please help me on this

MGohil commented 1 year ago

@jbowmanp1107 Even after release 1.0.3 it still gives same crash as in https://github.com/jbowmanp1107/ImageCropper.Maui/issues/4

ObjCRuntime.ThrowHelper.ThrowArgumentNullException(String )
ObjCRuntime.NativeObjectExtensions.GetNonNullHandle(INativeObject , String )
Bind_TOCropViewController.TOCropViewController..ctor(TOCropViewCroppingStyle style, UIImage image)
ImageCropper.Maui.PlatformImageCropper.ShowFromFile(ImageCropper imageCropper, String imageFile)
ImageCropper.Maui.ImageCropper.Show(Page page, String imageFile)
ObjCRuntime.Runtime.ThrowException(IntPtr )
UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr )
UIKit.UIApplication.Main(String[] , Type , Type )
MyApp.Program.Main(String[] args)

Would you please check on this urgently.?

MGohil commented 1 year ago

@jbowmanp1107 : any update on this issue?

samiracles commented 1 year ago

@jbowmanp1107 @MGohil I have a situation where if i run the ImageCropper.MAUI project using Windows 10 / 11 System & Visual studio 2022 and install the app in iphone - (iOS 15 and above) then there's the above crash. Whereas same project if i run in Mac System & Visual Studio 2022 and install the app in iphone - (iOS 15 and above) then it runs perfectly. I understand that this issue is with respect to compilation of iOS and installing app in iphone using windows system that MAUI offers, without xCode the Framework - TimOliver.TOCropViewController.Maui doesnt compile that leads to crash. I am using MAC System for my project to debug in iOS. Please feel free to close the issue.