Setting up the iOS framework in your Objective-C app

To set up the iOS framework for your Objective-C app:

1

Import the iOS framework header into your code.

#import <ClearentIdtechIOSFramework/ClearentIdtechIOSFramework.h>
2

Add the Clearent_Public_IDTech_VP3300_Delegate interface to your code.

@interface ViewController : UIViewController<UIAlertViewDelegate,Clearent_Public_IDTech_VP3300_Delegate, UIActionSheetDelegate,MFMailComposeViewControllerDelegate>
3

Add the ClearentManualEntryDelegate interface as a backup if the card reader fails to read the card.

@interface ViewController : UIViewController<UIAlertViewDelegate,Clearent_Public_IDTech_VP3300_Delegate, UIActionSheetDelegate,MFMailComposeViewControllerDelegate>,ClearentManualEntryDelegate
4

Add the successTransactionToken method to get a JSON Web Token (JWT) that represents the credit card and the current transaction request.

- (void)successTransactionToken:(ClearentTransactionToken *)clearentTransactionToken;

The iOS Framework calls the successTransactionToken method when tokenization is successful after reading the card data, either by swiping or inserting the card with an EMV chip. You can submit this token to the mobile payment gateway to process the payment.

5

Add the clearentFeedback method to return messages that guide customers during their interaction with the card reader.

- (void)feedback:(ClearentFeedback *)clearentFeedback;
6

Add the deviceConnected method to check if the card reader is connected to your iOS app.

-(void) deviceConnected;
7

Add the deviceDisconnected method to check if the card reader is disconnected from your iOS app.

-(void) deviceDisconnected;
8

Add the following framework objects to interact with the card reader.

Clearent_VP3300 *clearentVP3300;
ClearentManualEntry *clearentManualEntry;

Visit the demo site to explore code samples.

Last updated

Was this helpful?