CTBConsulting / Card.io-for-Capital-One-vertical-Cards

Code to Enhance Card.io so it can recognize Vertical Credit Card Formats from Capital One
Other
27 stars 10 forks source link

Cannot initialize a parameter of type 'UIResponder *' with an rvalue of type 'id<CardIOVideoStreamDelegate>' #26

Open jabransiddiqui opened 5 years ago

jabransiddiqui commented 5 years ago

Cannot initialize a parameter of type 'UIResponder *' with an rvalue of type 'id'

screenshot 2018-12-20 at 10 43 15 pm
xcracing commented 5 years ago

To fix this, go to classes/CardIOVideoStream.h Find line: (around line 46) @Property(nonatomic, weak, readwrite) id<CardIOVideoStreamDelegate> delegate;

Replace with: @Property(nonatomic, weak, readwrite) UIResponder<CardIOVideoStreamDelegate> *delegate;

The project should then build properly - however if you're like me that's not the only hurdle you'll run into. Now I'm getting an error when trying to deploy about nameSwitch in RootViewController.xib

I just deleted it and another - now I can deploy the test app, but it never asks for camera permission and subsequently just displays a black square where the camera view should be.

xcracing commented 5 years ago

FWIW, in the logs it's also complaining about not being able to find /usr/local/share/tessdata/co.traineddata file and mentiones making sure TESSDATA_PREFIX is set properly.

This seems like a super cool and much needed addition to card.io, but man I'm struggling here.... At this point I'd just like the test app to work on my phone so I can try it out and be in awe of it's coolness....

asimrazakhan commented 5 years ago

Add these two outlets in RootViewController.m

@property(nonatomic, strong, readwrite) IBOutlet UISwitch nameSwitch; @property(nonatomic, strong, readwrite) IBOutlet UISwitch zipOnlyNumericSwitch;