cancel
Showing results for 
Search instead for 
Did you mean: 

AuthNet Sdk Not Working in Xcode

Hello, 

 

   I am just trying to integrate the SDK of ios to my app, but for test perpus i followed the following step but SDK seems not working

 

1. I have created the Developer accout at test.authorize.net

2. I download the SDK from the  http://developer.authorize.net/downloads/

3. I goto Xcode and select file new project Name: paymentIntegration as saved at desktop 

4. Extracted the SDK folder which shows me all files inside this folder anet_ios_sdk-1.1.1/

5. then Drag and Drop to My Project Explorer into Xcode and then 

6. http://developer.authorize.net/integration/fifteenminutes/ios/  i followed the step as per this article

7. 

SO My setting like this as i saved my project at Desktop

  • Set your Library Search Paths with the path that contains the "Authorize.Net SDK" library. (ex. "/Users/lemosys/Desktop/AuthrizeProject/anet_ios_sdk-1.1.1").
  • Set your Other Linker Flags with "-lxml2" to allow for xml parsing.
  •      if not setting this flag got error massage "libxml/tree.h" file not found
  • Set your Header Search Paths with the path that contains "libxml2" header files. (ex. "/usr/include/libxml2" with recursive checked). 
  •    I SET THIS VARIABLE AND ITS LOOK LIKE :  "${SDK_DIR}"/usr/include/libxml2
  • Then I added one Class file and created NSSTRING * SessionToken  variable
  • Then Link binary Library SystemConfiguration.framework & SenTestingKit.framework and Add its
  • then added this code into classfile  Step 3- at this article http://developer.authorize.net/integration/fifteenminutes/ios/  
  • Then I click on build into Xcode but its gives me errors: 
  •   Build and Run simulator ERROR:

         Undefined symbols for architecture i386:

            "_OBJC_CLASS_$_SenTestCase", referenced from:

              _OBJC_CLASS_$_AuthNetUnitTests in AuthNetUnitTests.o

         "_OBJC_METACLASS_$_SenTestCase", referenced from:

               _OBJC_METACLASS_$_AuthNetUnitTests in AuthNetUnitTests.o

        ld: symbol(s) not found for architecture i386

          clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

 

My Xcode Version is : 4.4

IOS Version : 5.1

 

 

 

anciwasim
Member
4 REPLIES 4

Hi,

 

It looks like the error you are getting is because you aren't loading the SenTestingKit framework. Our IOS SDK is setup to run unit tests using this framework. To resolve the error, you can either add the SenTestingKit framework, or remove the AuthnetUnitTests files from the project.

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator

I'm having this issue as well.

Getting rid of those files is not the answer.

 

Please, take a look at this project from github: https://github.com/sibahota059/AuthorizeNetPaymentTest/tree/master

 

It does not get rid of anything but it's working anyways. Please, I've spent several days trying to resolve this issue and I was wondering if you could have updated steps to get the SDK working on Xcode 5.

I wasn't able to replicate the working example.

 

When getting rid of the Unit Test Folder, this is what you got: 

 

clang: error: no such file or directory: '/Users/ernestobarron/Developer/Kinektr/iOS/Authorize.NetEBarron/Black011/anet_ios_sdk-1.1.1/AuthNetUnitTests.m'

clang: error: no input files

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

https://developer.apple.com/library/mac/releasenotes/DeveloperTools/RN-Xcode/xc5_release_notes/xc5_r...

 

SenTestingKit is deprecated in Xocde 5.  It would appear the SDK is rather out of date.

Our latest SDK is available on GitHub at https://github.com/AuthorizeNet/sdk-mpos-ios.  

 

If you still have problems when using this version, I would encourage you to raise an issue on GitHub.

 

Richard