# Set iOS framework

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

{% stepper %}
{% step %}
Import the iOS framework header into your code.

```javascript
#import <ClearentIdtechIOSFramework/ClearentIdtechIOSFramework.h>
```

{% endstep %}

{% step %}
Add the `Clearent_Public_IDTech_VP3300_Delegate` interface to your code.

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

{% endstep %}

{% step %}
Add the `ClearentManualEntryDelegate` interface as a backup if the card reader fails to read the card.

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

{% endstep %}

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

```javascript
- (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.
{% endstep %}

{% step %}
Add the `clearentFeedback` method to return messages that guide customers during their interaction with the card reader.

```javascript
- (void)feedback:(ClearentFeedback *)clearentFeedback;
```

{% endstep %}

{% step %}
Add the `deviceConnected` method to check if the card reader is connected to your iOS app.

```javascript
-(void) deviceConnected;
```

{% endstep %}

{% step %}
Add the `deviceDisconnected` method to check if the card reader is disconnected from your iOS app.

```javascript
-(void) deviceDisconnected;
```

{% endstep %}

{% step %}
Add the following framework objects to interact with the card reader.

```javascript
Clearent_VP3300 *clearentVP3300;
ClearentManualEntry *clearentManualEntry;
```

{% endstep %}
{% endstepper %}

{% hint style="info" %}
Visit the [demo](https://github.com/clearent/IDTech_VP3300_Objc_Demo) site to explore code samples.
{% endhint %}
