Home › Forums › Ask the Flomies › Flomio Basic SDK crashes when reading tag
-
AuthorPosts
-
June 8, 2016 at 4:52 am #55667
Hi,
I’m quite new to the Flomio SDK and I’m trying to move my first steps using your framework for iOS.
I have followed the example in the Readme file included with the SDK. So, now I have in the viewDidLoad() method the following code:
self.sessionManager = FmSessionManager.sharedManager() as? FmSessionManager
sessionManager!.selectedDeviceType = DeviceType.FlojackMsr
sessionManager!.delegate = self
sessionManager!.startReaders()
sessionManager!.scanPeriod = NSNumber(integer: 500)
sessionManager!.scanSound = NSNumber(bool: false)
I have also implemented some dummy methods connected to the delegate notifications:
`func didFindATagUuid(UUID: String!, fromDevice deviceId: String!, withError error: NSError!) {
print(“Tag!”)
}func didRespondToApduCommand(response: String!, fromDevice deviceId: String!, withError error: NSError!) {
print(“Apdu!”)
}func didUpdateConnectedDevices(devices: [AnyObject]!) {
print(“Devices!”)
}`The last method gets called correctly, while the others don’t. When i put a NFC tag on the reader, the app crashes on compiled code (something related to your SDK) with the following exception:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NFCTest.ViewController didChangeCardStatus:fromDevice:]: unrecognized selector sent to instance 0x13ed27510'
What am I doing wrong?
Thank you in advance for your help,
- This topic was modified 8 years, 5 months ago by Monica. Reason: Improving formatting
June 9, 2016 at 2:15 pm #55688Hi,
Please include the delegate method:
- (void)didChangeCardStatus:(NSNumber *)status fromDevice:(NSString *)device { //Card status will change depending on whether it is in range }
This is not fully supported for the the Flojack BZR or MSR readers at the moment but will be added shortly. I will also make sure to add this to the Readme.
Thanks for pointing this out,
Cheers,
Scott- This reply was modified 8 years, 5 months ago by Scott.
-
AuthorPosts
You must be logged in to reply to this topic.