Receipt Refresh causes Apple Review to Reject App due to iTunes Store Connection Error










2















I'm seeing a very strange thing happening with my application.



To be specific, I am issuing a receipt request in order to download a receipt from Apple when I detect that the application does not contain a receipt file in its bundle.



Sure, calling the receipt refresh API causes the Apple ID login screen to be shown.



I have created "test"/"sandbox" users in iTunes Connect in order to test my application.



When running the application on my device (iPad with WiFi), the app successfully calls the refresh receipt function and then sure enough, the Apple ID login screen pops up. I enter the correct credentials of the test/sandbox user configured in iTunes Connect and everything is fine (i.e., the receipt is downloaded successfully.)



However, if I attempt to use a real Apple ID user, I get "didFailWithError" and the localized error description is: "Cannot connect to iTunes Store", the error code being "16".



This is expected, in my opinion.



Now, the sad part is that when I have submitted my build to Apple Review, they are getting the exact error mentioned above.



They are saying that they are using a sandbox user and thus they have rejected the application as they were unable to continue.



Note: They too have used an iPad with WiFi for testing the application.



I have consistently been able to reproduce this problem only when using real Apple ID user accounts and have never had a problem with sandbox users!



I've read somewhere that one would have to also make sure that the sandbox user is logged out of the "Settings" screen when testing. I've politely asked Apple Review to make sure that they would not be logged into "Settings" when testing.



They have sent me two screenshots: One with the Apple ID login screen that asks for BOTH the Apple ID user and the password (which causes me to think that they indeed were logged out of the "Settings" screen, otherwise they'd already have the Apple ID user pre-populated in the dialog) and one showing the error mentioned in this post.



I have no idea how to proceed now because I simply cannot reproduce this problem. It works perfectly with any sandbox users on my device -- it just doesn't work with real Apple ID users.



Apple Review sent me a screenshot showing the error mentioned in this post, again, an error that I can only reproduce when using a real Apple ID user in what is really a sandbox environment.



I think the only difference may be the fact that my device is running iOS 10.x while their device may be running iOS 12.x but I don't think it should be an issue.



Any thoughts ?



Thanks in advance!



P.S., they are not using an Apple ID sandbox user created by me -- they use their own. I have suggested to send them my sandbox users to test, but they said they could not accept as it would be a breach of privacy.



UPDATE: I have confirmed that the same thing happens on iOS 12.1 so it's not due to an OS difference.










share|improve this question
























  • Is iOS showing the error message or is it your code?

    – Paulw11
    Nov 15 '18 at 2:11











  • iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

    – MariusVE
    Nov 15 '18 at 2:11












  • And what does your app do when it can't refresh the receipt?

    – Paulw11
    Nov 15 '18 at 2:12











  • It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

    – MariusVE
    Nov 15 '18 at 2:13







  • 1





    Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

    – Paulw11
    Nov 15 '18 at 2:17















2















I'm seeing a very strange thing happening with my application.



To be specific, I am issuing a receipt request in order to download a receipt from Apple when I detect that the application does not contain a receipt file in its bundle.



Sure, calling the receipt refresh API causes the Apple ID login screen to be shown.



I have created "test"/"sandbox" users in iTunes Connect in order to test my application.



When running the application on my device (iPad with WiFi), the app successfully calls the refresh receipt function and then sure enough, the Apple ID login screen pops up. I enter the correct credentials of the test/sandbox user configured in iTunes Connect and everything is fine (i.e., the receipt is downloaded successfully.)



However, if I attempt to use a real Apple ID user, I get "didFailWithError" and the localized error description is: "Cannot connect to iTunes Store", the error code being "16".



This is expected, in my opinion.



Now, the sad part is that when I have submitted my build to Apple Review, they are getting the exact error mentioned above.



They are saying that they are using a sandbox user and thus they have rejected the application as they were unable to continue.



Note: They too have used an iPad with WiFi for testing the application.



I have consistently been able to reproduce this problem only when using real Apple ID user accounts and have never had a problem with sandbox users!



I've read somewhere that one would have to also make sure that the sandbox user is logged out of the "Settings" screen when testing. I've politely asked Apple Review to make sure that they would not be logged into "Settings" when testing.



They have sent me two screenshots: One with the Apple ID login screen that asks for BOTH the Apple ID user and the password (which causes me to think that they indeed were logged out of the "Settings" screen, otherwise they'd already have the Apple ID user pre-populated in the dialog) and one showing the error mentioned in this post.



I have no idea how to proceed now because I simply cannot reproduce this problem. It works perfectly with any sandbox users on my device -- it just doesn't work with real Apple ID users.



Apple Review sent me a screenshot showing the error mentioned in this post, again, an error that I can only reproduce when using a real Apple ID user in what is really a sandbox environment.



I think the only difference may be the fact that my device is running iOS 10.x while their device may be running iOS 12.x but I don't think it should be an issue.



Any thoughts ?



Thanks in advance!



P.S., they are not using an Apple ID sandbox user created by me -- they use their own. I have suggested to send them my sandbox users to test, but they said they could not accept as it would be a breach of privacy.



UPDATE: I have confirmed that the same thing happens on iOS 12.1 so it's not due to an OS difference.










share|improve this question
























  • Is iOS showing the error message or is it your code?

    – Paulw11
    Nov 15 '18 at 2:11











  • iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

    – MariusVE
    Nov 15 '18 at 2:11












  • And what does your app do when it can't refresh the receipt?

    – Paulw11
    Nov 15 '18 at 2:12











  • It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

    – MariusVE
    Nov 15 '18 at 2:13







  • 1





    Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

    – Paulw11
    Nov 15 '18 at 2:17













2












2








2








I'm seeing a very strange thing happening with my application.



To be specific, I am issuing a receipt request in order to download a receipt from Apple when I detect that the application does not contain a receipt file in its bundle.



Sure, calling the receipt refresh API causes the Apple ID login screen to be shown.



I have created "test"/"sandbox" users in iTunes Connect in order to test my application.



When running the application on my device (iPad with WiFi), the app successfully calls the refresh receipt function and then sure enough, the Apple ID login screen pops up. I enter the correct credentials of the test/sandbox user configured in iTunes Connect and everything is fine (i.e., the receipt is downloaded successfully.)



However, if I attempt to use a real Apple ID user, I get "didFailWithError" and the localized error description is: "Cannot connect to iTunes Store", the error code being "16".



This is expected, in my opinion.



Now, the sad part is that when I have submitted my build to Apple Review, they are getting the exact error mentioned above.



They are saying that they are using a sandbox user and thus they have rejected the application as they were unable to continue.



Note: They too have used an iPad with WiFi for testing the application.



I have consistently been able to reproduce this problem only when using real Apple ID user accounts and have never had a problem with sandbox users!



I've read somewhere that one would have to also make sure that the sandbox user is logged out of the "Settings" screen when testing. I've politely asked Apple Review to make sure that they would not be logged into "Settings" when testing.



They have sent me two screenshots: One with the Apple ID login screen that asks for BOTH the Apple ID user and the password (which causes me to think that they indeed were logged out of the "Settings" screen, otherwise they'd already have the Apple ID user pre-populated in the dialog) and one showing the error mentioned in this post.



I have no idea how to proceed now because I simply cannot reproduce this problem. It works perfectly with any sandbox users on my device -- it just doesn't work with real Apple ID users.



Apple Review sent me a screenshot showing the error mentioned in this post, again, an error that I can only reproduce when using a real Apple ID user in what is really a sandbox environment.



I think the only difference may be the fact that my device is running iOS 10.x while their device may be running iOS 12.x but I don't think it should be an issue.



Any thoughts ?



Thanks in advance!



P.S., they are not using an Apple ID sandbox user created by me -- they use their own. I have suggested to send them my sandbox users to test, but they said they could not accept as it would be a breach of privacy.



UPDATE: I have confirmed that the same thing happens on iOS 12.1 so it's not due to an OS difference.










share|improve this question
















I'm seeing a very strange thing happening with my application.



To be specific, I am issuing a receipt request in order to download a receipt from Apple when I detect that the application does not contain a receipt file in its bundle.



Sure, calling the receipt refresh API causes the Apple ID login screen to be shown.



I have created "test"/"sandbox" users in iTunes Connect in order to test my application.



When running the application on my device (iPad with WiFi), the app successfully calls the refresh receipt function and then sure enough, the Apple ID login screen pops up. I enter the correct credentials of the test/sandbox user configured in iTunes Connect and everything is fine (i.e., the receipt is downloaded successfully.)



However, if I attempt to use a real Apple ID user, I get "didFailWithError" and the localized error description is: "Cannot connect to iTunes Store", the error code being "16".



This is expected, in my opinion.



Now, the sad part is that when I have submitted my build to Apple Review, they are getting the exact error mentioned above.



They are saying that they are using a sandbox user and thus they have rejected the application as they were unable to continue.



Note: They too have used an iPad with WiFi for testing the application.



I have consistently been able to reproduce this problem only when using real Apple ID user accounts and have never had a problem with sandbox users!



I've read somewhere that one would have to also make sure that the sandbox user is logged out of the "Settings" screen when testing. I've politely asked Apple Review to make sure that they would not be logged into "Settings" when testing.



They have sent me two screenshots: One with the Apple ID login screen that asks for BOTH the Apple ID user and the password (which causes me to think that they indeed were logged out of the "Settings" screen, otherwise they'd already have the Apple ID user pre-populated in the dialog) and one showing the error mentioned in this post.



I have no idea how to proceed now because I simply cannot reproduce this problem. It works perfectly with any sandbox users on my device -- it just doesn't work with real Apple ID users.



Apple Review sent me a screenshot showing the error mentioned in this post, again, an error that I can only reproduce when using a real Apple ID user in what is really a sandbox environment.



I think the only difference may be the fact that my device is running iOS 10.x while their device may be running iOS 12.x but I don't think it should be an issue.



Any thoughts ?



Thanks in advance!



P.S., they are not using an Apple ID sandbox user created by me -- they use their own. I have suggested to send them my sandbox users to test, but they said they could not accept as it would be a breach of privacy.



UPDATE: I have confirmed that the same thing happens on iOS 12.1 so it's not due to an OS difference.







ios receipt-validation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 12:37







MariusVE

















asked Nov 15 '18 at 2:07









MariusVEMariusVE

5411




5411












  • Is iOS showing the error message or is it your code?

    – Paulw11
    Nov 15 '18 at 2:11











  • iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

    – MariusVE
    Nov 15 '18 at 2:11












  • And what does your app do when it can't refresh the receipt?

    – Paulw11
    Nov 15 '18 at 2:12











  • It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

    – MariusVE
    Nov 15 '18 at 2:13







  • 1





    Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

    – Paulw11
    Nov 15 '18 at 2:17

















  • Is iOS showing the error message or is it your code?

    – Paulw11
    Nov 15 '18 at 2:11











  • iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

    – MariusVE
    Nov 15 '18 at 2:11












  • And what does your app do when it can't refresh the receipt?

    – Paulw11
    Nov 15 '18 at 2:12











  • It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

    – MariusVE
    Nov 15 '18 at 2:13







  • 1





    Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

    – Paulw11
    Nov 15 '18 at 2:17
















Is iOS showing the error message or is it your code?

– Paulw11
Nov 15 '18 at 2:11





Is iOS showing the error message or is it your code?

– Paulw11
Nov 15 '18 at 2:11













iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

– MariusVE
Nov 15 '18 at 2:11






iOS is showing the error message. "didFailWithError" comes back with that exact error from the post and code 16.

– MariusVE
Nov 15 '18 at 2:11














And what does your app do when it can't refresh the receipt?

– Paulw11
Nov 15 '18 at 2:12





And what does your app do when it can't refresh the receipt?

– Paulw11
Nov 15 '18 at 2:12













It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

– MariusVE
Nov 15 '18 at 2:13






It shows the error received in "didFailWithError", and it has a "RETRY" button. When the user presses the "RETRY" button, the app tries to refresh the receipt again. They have "RETRY"ed a few times with no luck -- still getting the same exact error. Also: I do check to make sure there's a valid internet connection before calling the receipt refresh function.

– MariusVE
Nov 15 '18 at 2:13





1




1





Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

– Paulw11
Nov 15 '18 at 2:17





Does the user have an option of continuing without refreshing the receipt? Are you sure it is iOS showing the error? It sounds like you are showing the error dialog. If the receipt refresh request fails you should simply move on silently

– Paulw11
Nov 15 '18 at 2:17












1 Answer
1






active

oldest

votes


















0














It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.



I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)



The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!



I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.



In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!



I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311420%2freceipt-refresh-causes-apple-review-to-reject-app-due-to-itunes-store-connection%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.



    I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)



    The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!



    I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.



    In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!



    I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.






    share|improve this answer



























      0














      It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.



      I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)



      The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!



      I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.



      In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!



      I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.






      share|improve this answer

























        0












        0








        0







        It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.



        I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)



        The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!



        I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.



        In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!



        I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.






        share|improve this answer













        It looks like at least in my case, there seems to be a problem with the refresh receipt API itself.



        I have confirmed that initiating a purchase request causes the app to download a receipt from Apple with the credentials of the supplied user (sandbox user in our case.)



        The review team has confirmed that the purchase request works correctly with their sandbox user, however, the refresh receipt DOES NOT work with that exact same user (it causes a code 16, "Cannot connect to iTunes Store")!



        I have also confirmed that a "Restore" request causes the receipt to be downloaded and that it works with the supplied sandbox user.



        In conclusion, both "Purchase" and "Request" operations causes the app to download a receipt from Apple and they work correctly for the sandbox user supplied by the Review Team. However, with the exact same user, the receipt refresh request fails!



        I can still ask for a receipt refresh because it should work correctly for actual App Store downloads but it clearly did not work for app review.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 '18 at 12:17









        MariusVEMariusVE

        5411




        5411





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311420%2freceipt-refresh-causes-apple-review-to-reject-app-due-to-itunes-store-connection%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            政党

            天津地下鉄3号線