0

I have a method which returns Bool based on the PassKit. refer the below code:-

class func isHardwareSuportedForApplePay() -> Bool {
        return PKPaymentAuthorizationViewController.canMakePayments()
    }

I need to write test case of above function. I think I need to check for the device. If device is later than iPhone 5 then it should be true. But I don't know how to check device like. iPhone 5 and later. Please help.

GameLoading
  • 6,552
  • 2
  • 31
  • 57
Mohit Mangla
  • 197
  • 13
  • Check the DeviceKit framework for testing device version and a number of other parameters: https://github.com/dennisweissmann/DeviceKit – HAK May 22 '18 at 07:54
  • 1
    Checkout this answer https://stackoverflow.com/a/27759550/3418097 – andromedainiative May 22 '18 at 08:05
  • 1
    Check this link it has an answer of your question. https://stackoverflow.com/a/26962452/563848 If your device has touchID as iphone-5 does not have. – GameLoading May 22 '18 at 08:45

0 Answers0