Tuesday 22 January 2013

PayPal SDK for iOS


PayPal SDK for iOS


Another day another dollar. After spending half a day, well I should say wasting half a day I've finally figured out how to add PayPal's SDK for iOS. I'm currently using XCode 4.

I will break it down into steps so hopefully this will help others!



1.) SDK Download.
- First you have to download the PayPal iOS SDK from here.

2.) "Adding the Files"
- Control Click on your project.xcode file and chose "Add files to project" (or chose File->"Add files to Project").
- Navigate to where you had saved your downloaded PayPal SDK on disk.
- You will find a folder named "Library" which contains 11 header files, as well as a static library named "libPayPalMPL.a".
- Select all of these files and check the "Copy items into destination group's folder (if needed) check box.
- Now before you build your project you have to add additional libraries. 
- Navigate to your Link Binary With Libraries within your project target and add the following Libraries.

  • Security.framework

  • libxml2.dylib

  • libz.dylib

  • 3.) #import "PayPal.h"
    - Now that you have everything added properly you have to #import "PayPal.h" and follow the documentation provided from PayPal.

    4.) Build your project and you will be ready to go!

    Hopefully this helps someone else out. I had searched on google for quite sometime and didn't really find anything helpful. Happy Coding!

    No comments:

    Post a Comment