-1

I am just writing code for paypal button as below in ViewDidLoad

UIButton *button = [[PayPal getInstance] getPayButtonWithTarget:self andAction:@selector(payWithPayPal) andButtonType:BUTTON_278x43];

and getting the crash as following

2011-11-17 05:41:39.541 MothProject[654:707] -[PayPal getPayButtonWithTarget:andAction:andButtonType:andButtonText:]: unrecognized selector sent to instance 0x2bd2d0
2011-11-17 05:41:39.548 MothProject[654:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PayPal getPayButtonWithTarget:andAction:andButtonType:andButtonText:]: unrecognized selector sent to instance 0x2bd2d0'
*** First throw call stack:
(0x328d78bf 0x367411e5 0x328daacb 0x328d9945 0x32834680 0x8f9b 0x311837ff 0x3118fc39     0x3118faa9 0x3118f98f 0x3118f15b 0x3118ef53 0x31183673 0x31183349 0x77ad 0x311fd565 0x31275ce7 0x37a6e943 0x328aba63 0x328ab6c9 0x328aa29f 0x3282d4dd 0x3282d3a5 0x37f6efed 0x31178743 0x2831 0x27c8)
terminate called throwing an exceptionProgram received signal:  “SIGABRT”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)

I have used implemented all required delegate methods in self, and also used Delegate too,

What is issue, does anyone has idea about it?

Chatar Veer Suthar
  • 15,541
  • 26
  • 90
  • 154
  • possible duplicate of [Paypal iphone timout error again and again](http://stackoverflow.com/questions/8028343/paypal-iphone-timout-error-again-and-again) – PengOne Nov 17 '11 at 05:47
  • If this is the same question, then consider adding a bounty to the original instead of reposting. – PengOne Nov 17 '11 at 05:48
  • Read it carefully, it is not duplicated, The same thing is working fine with my simulator, can see button, press it, but as run on iPod Touch, then it gives that error. – Chatar Veer Suthar Nov 17 '11 at 05:49
  • Here is sigabrt, there was timeout, hopefully you will remove close vote, – Chatar Veer Suthar Nov 17 '11 at 05:50
  • Close votes cannot be removed. However, it takes 5 close votes to close a question. Based on your comments, that will likely not happen. – PengOne Nov 17 '11 at 06:13
  • Hope so, but Sir Why did you make it close vote, while both are completely different, well can you understand the issue, see this question for a while http://stackoverflow.com/questions/6940985/can-i-use-paypal-in-iphone-ipad-apps – Chatar Veer Suthar Nov 17 '11 at 06:19

1 Answers1

0

I think you need to initialize the instance of PayPal first, using the method

-initializeWithAppID:forEnvironment:
PengOne
  • 48,188
  • 17
  • 130
  • 149