unrecognized selector sent to instance


Hi prince, you have 3 instances of fromViewController: [UIApplication sharedApplication].keyWindow.rootViewController in that file. Which one is the issue? Do the others work?

I got your code to build but don’t know how to replicate the issue.


all the

fromViewController: [UIApplication sharedApplication].keyWindow.rootViewController

works on simulation without any problem, the issues occur with real devices, and only on the payment process with my functions Pay and PaywithToken.


Thanks for narrowing down that first part, but the buttons in the app don’t seem to do anything when clicked, please describe the process to follow to cause the error to happen.


its a working example, https://www.dropbox.com/s/t8yfy1fohiwu8h8/Archive.zip?dl=0
please add -ObjC to “Other Linker Flags”
Add the bundles provided in SumupSDK.embeddedframework/Resources to your app target.


you have to specify the 3 input (the first is the amount) before pressing the bouton PayWithToken.


That archive looks very similar to the github repo you linked at the top. Are they the same? If so can’t I just use the repo?


You can use the repo , but the archive have all credentials needed already filled , so its ready to go.


Excellent, thanks


It ran but the button just logs haha i started to the console and nothing else happens. I am happy to test other versions you provide (especially if it was a more minimal test case).


the token take a bit time to be retrieved.
but it should work normally, hum i’m building a minimal test case


ok this is the minimal test case.


for the price I entered 100, for the foreigncode I enetered ‘a’, for the title I entered ‘b’

This is the result on the iPhone 6plus running iOS 9.3.2

2017-09-01 13:45:34.670 test[540:313470] "haha i started"
2017-09-01 13:45:35.006 test[540:313470] {"type":"default","status":200,"ok":true,"statusText":"OK","headers":{"map":{"status":["200 OK"],"x-content-type-options":["nosniff"],"content-type":["application/json; charset=utf-8"],"server":["nginx"],"connection":["keep-alive"],"date":["Fri, 01 Sep 2017 11:45:34 GMT"],"x-download-options":["noopen"],"x-frame-options":["SAMEORIGIN"],"x-xss-protection":["1; mode=block"],"content-length":["303"],"etag":["W/\"12f-XTnIGBvMCwYrRS1VhojLTMAVk9Y\""]}},"url":"","_bodyInit":"{\"access_token\":\"3067c162c3893489c62ede3c716ee9e343a52d56460b9df1cec66f4f8acff1e1\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"c288e6ab55bc7e8d4097705622ee9aa1898bec074c063855fd72e98d0247b3a1\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}","_bodyText":"{\"access_token\":\"3067c162c3893489c62ede3c716ee9e343a52d56460b9df1cec66f4f8acff1e1\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"c288e6ab55bc7e8d4097705622ee9aa1898bec074c063855fd72e98d0247b3a1\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}"}
2017-09-01 13:45:36.332 test[540:313470] "token non obtenu"

This is the result on the iPhone 6 running iOS 10.3.2

2017-09-01 13:47:23.162153+0200 test[1747:1492477] "haha i started"
2017-09-01 13:47:23.785709+0200 test[1747:1492477] {"type":"default","status":200,"ok":true,"statusText":"OK","headers":{"map":{"status":["200 OK"],"x-content-type-options":["nosniff"],"content-type":["application/json; charset=utf-8"],"server":["nginx"],"etag":["W/\"12f-F9JdF/rOlQB/0gr3UuI0EEfg7jk\""],"date":["Fri, 01 Sep 2017 11:47:23 GMT"],"x-download-options":["noopen"],"x-frame-options":["SAMEORIGIN"],"x-xss-protection":["1; mode=block"],"content-length":["303"],"connection":["keep-alive"]}},"url":"","_bodyInit":"{\"access_token\":\"95764a94dc65d2d951f82f439a1b2bc2793b8f4efc349b124792951e4b36fc8d\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"ed17db8c203e74e0ad54feb67ed401548d290339e53e281640b1ab64764990e9\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}","_bodyText":"{\"access_token\":\"95764a94dc65d2d951f82f439a1b2bc2793b8f4efc349b124792951e4b36fc8d\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"ed17db8c203e74e0ad54feb67ed401548d290339e53e281640b1ab64764990e9\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}"}
2017-09-01 13:47:33.710413+0200 test[1747:1492477] "token non obtenu"

Sadly not the crash you mentioned before. Any ideas?


token non obtenu is my error when login with token fails, seems like you are already logged in, as sumup dont provide a good error to manage this (the error is null),
the best to do for testing here is to change my line 54 in iOSImpl.uno to if (error == NULL)
the first payment will fail but next ones will works.
this is a video of my test on simulation.

as you can see , it works pretty well on simulation , in the device , it freeze when the modal payment open


I just see that i didn’t uploaded the good link of my video. sorry, updated the link


anyone to help me on this today ?


Hi prince, I will try to have a look at this tomorrow.


thank you , appreciate it


Changling like 54 to if (error==NULL) { just causes a different exception:

2017-09-07 11:25:28.273 test[795:1054760] SumupSDK: Ignoring 'prepareForCheckout'. Not logged in.
2017-09-07 11:25:28.273 test[795:1054760] SumupSDK: Not presenting checkout as user is not logged in.
libc++abi.dylib: terminating with uncaught exception of type uThrowable: Uno.Exception

Which makes a lot of sense to be honest.


this is not the error i get as shown on the video the checkout is presented and i’m each time connected


I openned a issue on the sumup side for this error.
this is the link.

the sumup developper is asking if uAppDelegate has a window property or method;

this is my code updated to test again. has responded the function should not complaining about to be logged to make a payment as each times you call the function it first log you in with a token before trying to make a payment.

      [SumupSDK loginWithToken:accessToken
                       completion: ^(BOOL success, NSError * _Nonnull error) {
                           if (error.code != 22 && error != NULL) {
                            NSLog(@"%@", error);
                            @{PayWithToken:Of(_this).Reject(string):Call(@"token not found")};                          

                            [SumupSDK prepareForCheckout];
      SMPCheckoutRequest *request = [SMPCheckoutRequest requestWithTotal:[NSDecimalNumber decimalNumberWithString:productAmount]
                                                            currencyCode:[[SumupSDK currentMerchant] currencyCode]

              [request setForeignTransactionID:foreignRef];

              [SumupSDK checkoutWithRequest: request
                          fromViewController: [UIApplication sharedApplication].keyWindow.rootViewController
                                    completion: ^(SMPCheckoutResult *result, NSError *error) {
                                            @{PayWithToken:Of(_this).Reject(string):Call(@"you need to be connected to make a payment")};
                                              @{PayWithToken:Of(_this).Resolve(string):Call(@"Le paiement a été effectué")};

        // something went wrong checkout was not started
        if (![SumupSDK checkoutInProgress]) {
           @{PayWithToken:Of(_this).Reject(string):Call(@"Une erreur de connard s'est produite")};



i really need to get this module working for both side (android and iOS) as we are planning to launch our fuse app soon.

2017-09-14 13:01:41.409 test[1107:1969075] "haha i started"
2017-09-14 13:01:41.512 test[1107:1969075] {"type":"default","status":200,"ok":true,"statusText":"OK","headers":{"map":{"status":["200 OK"],"x-content-type-options":["nosniff"],"content-type":["application/json; charset=utf-8"],"server":["nginx"],"connection":["keep-alive"],"date":["Thu, 14 Sep 2017 11:01:41 GMT"],"x-download-options":["noopen"],"x-frame-options":["SAMEORIGIN"],"x-xss-protection":["1; mode=block"],"content-length":["303"],"etag":["W/\"12f-HUKuemol4Sw7orGDLH4otkd8CQE\""]}},"url":"","_bodyInit":"{\"access_token\":\"23d8062c3735f7351d931f97c4b7dfb35495fb2b7ffad831825c7db43f75c3d0\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"f8dcfcbe7805f4aa73ee3a3ebdc4a9cd2f93712f5e5088cfd1647382cd50d88f\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}","_bodyText":"{\"access_token\":\"23d8062c3735f7351d931f97c4b7dfb35495fb2b7ffad831825c7db43f75c3d0\",\"token_type\":\"Bearer\",\"expires_in\":3600,\"refresh_token\":\"f8dcfcbe7805f4aa73ee3a3ebdc4a9cd2f93712f5e5088cfd1647382cd50d88f\",\"scope\":\"payments user.app-settings transactions.history user.profile_readonly user.subaccounts\"}"}
2017-09-14 13:01:41.676 test[1107:1968972] Error Domain=SumupSDKError Code=20 "(null)" UserInfo={NSUnderlyingError=0x1498e8010 {Error Domain=JSONRPCServerError Code=-32006 "Version not supported" UserInfo={NSLocalizedDescription=Version not supported, JSONObject={
    code = "-32006";
    data =     {
        message = "Sorry, but we've experienced an unexpected error. Please try closing the app and logging in again, or contact our Support Team (quote: UKN-W61QY)";
    message = "Version not supported";
2017-09-14 13:01:41.682 test[1107:1969075] "token not found"

Sorry prince this does not reproduce the issue. We really want to help you fix the error so you can ship, but without being able to get to the actual issue we just can’t help. Happy to test a smaller example of the error or to keep trying with this one.