Scandit Subclassing issue

I've made a subclass of SIBarcodePicker passing the app key through : base(key)
It works perfectly fine on the device, but on iOS Simulator it has a runtime error:

The selector loadView does not have a proper signature for dynamic invoke

Any ideas?

Posts

  • MagnusAhlinMagnusAhlin GBMember ✭✭

    Ive got the same.

  • Hi,

    I have tried replicating this problem but failed so far. I tried it with our sample app that comes with the component. The app subclasses SIBarcodePicker and uses base(appKey) to pass the app key but it works without problems in the simulator. If you could paste some code snippets of how you subclass the picker and how you instantiate and show it in the UI that might help us find the problem.

  • In the presenting view controller I am instantiating the subclassed VC in LoadView and that is where the exception is happening.

    Here is the inheritance:

    public class ScannerController : SIBarcodePicker

    Here is the relevant code inside the class:

    const string _key = "mykeyhere";
            const string _apiKey = "myapikeyhere";
    
            ScanDelegate _scanDelegate;
    
            public ScannerController () : base (_key) {}
    

    Here is the error(which happens at the constructor):
    The selector loadView does not have a proper signature for dynamic invoke

    Here is the relevant part of the stack trace:
    at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper_IntPtr (intptr,intptr,intptr) at ScanditSDK.SIBarcodePicker..ctor (System.String appKey) [0x00000] in <filename unknown>:0 at RecipeScanner.ScannerController..ctor () [0x00000] in .../RecipeScanner/iOS/Scandit/ScannerController.cs:15 at RecipeScanner.RootViewController.LoadView () [0x00035] in

    Like I said, works perfectly fine on device just not in the simulator

  • I have tried it with the code you provided and it all worked fine. I can offer you that we look at you project (or a minimal version of it where the problem occurs). If you would like us to do that please send the project to [email protected]

Sign In or Register to comment.