mono / Embeddinator-4000

Tools to turn .NET libraries into native libraries that can be consumed on Android, iOS, Mac, Linux and other platforms.
MIT License
758 stars 95 forks source link

Crash coming on using Embeddinator 4000 iOS Framework inside Obj-C Framework. #745

Closed amitkhoth closed 4 years ago

amitkhoth commented 4 years ago

1)I have a host App and a Obj-c framework inside workspace.

2) I am using Embeddinator 4000 iOS framework(HelloSharedUI.iOS.framework) inside Obj-c framework.

3) Crash is coming when I call func of HelloSharedUI.iOS.framework (Embeddinator)From Obj-c FrameWork.

Crash in this function

crash Log

MonoTouch: Could not install sigaction override, unexpected sigaction implementation.

HostApp[96001:1415276] The assembly mscorlib.dll was not found or could not be loaded.

HostApp[96001:1415276] It should have been installed in the `/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/sdks/out/ios-sim64-release/lib/mono/2.1/mscorlib.dll' directory.

This is Native call from Obj-c Framework.

import "ViewController.h"

import "HelloSharedUI.iOS/HelloSharedUI.iOS.h"

@implementation ViewController

@end

Exposed C# code of xamarin.Forms By xamarin Embeddinator 4000

@interface HelloSharedUI_UIHelpers : NSObject {

@public MonoEmbedObject* _object; }

(nullable instancetype)init;

(NSString *)getLabelText;

(void)showMyPageText:(NSString *)text;

(nullable instancetype)initForSuper;

@end

chamons commented 4 years ago

There are many moving pieces in setting up hosting. Many are easy to get wrong, and it can be difficult to reproduce the same failure state.

I appreciate the steps to reproduce, but could you post a sample application showing your setup?

amitkhoth commented 4 years ago
  1. create a Obj-c Workspace in Xcode.

  2. add(File-> new -> project->single View App) a single view Obj-c application in this workspace call it Host App.

  3. then Add (File->New -> project -> cocoa Touch framework) in same workspace(This is . Framework Project) call it Native Framework.

  4. Embed this Native framework in Host App.

  5. I have Embeddinator 4000 .framework created from Xamarin Studio call it shared.framework.

  6. Embed this shared.framework in Native Framework.

Steps to reproduce:

a) in Host App I have a button in storyBoard(view) file that launches Native FrameWork View.

b) in Native FrameWork View(.stroyboard viewcontoller) I have other Button that launches Xamarin view using shared.Framawork.

Call From Native framework to shared Framework(E4k)

import "ViewController.h"

import "HelloSharedUI.iOS/HelloSharedUI.iOS.h"

@implementation ViewController

(void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } (IBAction)launchXamarin:(id)sender { HelloSharedUI_UIHelpers *helpers = [[HelloSharedUI_UIHelpers alloc] init];//crash [helpers showMyPageText: @"Hi"]; } @EnD

Exposed C# code of xamarin.Forms By xamarin Embeddinator 4000

@interface HelloSharedUI_UIHelpers : NSObject {

@public MonoEmbedObject* _object; }

(nullable instancetype)init;

(NSString *)getLabelText;

(void)showMyPageText:(NSString *)text;

(nullable instancetype)initForSuper;

@EnD

chamons commented 4 years ago

So your steps leave out a number of steps, like what does this entail?

I have Embeddinator 4000 .framework created from Xamarin Studio call it shared.framework.

What settings did you use, command line invocation, etc?

Please consider attaching a zip file of a sample project.

whitneyschmidt commented 4 years ago

We have not received the requested information.

If you are still experiencing this issue please provide all the requested information then click the Reopen Issue button.

Thanks!