Updated application with a new explicit application identifier, in-app purchase. SKProductsRequest returns an empty product list

Background:

The current version for selling my application uses the wildcard application identifier, and the package identifier is simple and does not comply with the com.companyname.appname (it's just "appname"). The identifier of the application that he uses is simply of the form “bundleseed. *”, As a result, I assume “bundleseed.appname” when signing with the provisioning profile. (Why? Because this application exists from the early 2.x days before Apple recommended explicit application identifiers, and before Xcode introduced the com.companyname agreement.)

I am adding an application to the In-App that requires an Explicit Application Identifier. I followed the instructions in Technical Q & A QA1680 Update with a wildcard application identifier with an explicit application identifier . As a result, I received a new explicit application identifier of the form "newbundleseed.appname", and the new provisioning profile used to sign the application indicates this. The package identifier in info.plist remains the same "appname".

Problem:

When I deploy a new application from Xcode on top of the old version, it works fine. The application instance of the old version is replaced by the new application, and all the new functions are in place. However, when an application submits SKProductsRequest, it leads to empty product lists. If I deploy the new application as a new installation (without copying the old version), then everything works as expected - SKProductsRequest leads to a complete list of my available products.

I also noticed that the updated build carries over some aspects of the old version, which is strange to me. In particular, the old version of the application had default.png, which the new application does not yet have as part of the assembly, but the updated application displays the old default.png at boot time. As if the updated application is a merger of the old and the new.

My main problem is that buying an In-App will work for my update users. Am I something wrong with the Explicit Application Identifier, or is it just a problem that I use the In App Purchase sandbox? In which case, can I be sure that it will work when it is released?

Also, any understanding of why / how the new application does not seem to completely replace the old application package?

The only thing I can think of is that instead of creating a new package seed (as described in QA1680), I had to use the old package seed when creating a new application identifier. that is, the old application identifier is "oldbundleseed. *" and my new new one is "newbundleseed.appname", and perhaps it should be "oldbundleseed.appname". But I cannot do this, because the provisioning portal will not allow me to create an application identifier that differs only in the package seed. If this is my problem, what should I do? Connect with Apple?

TL / DR: An existing application updated with a new explicit IAP support application identifier works fine, except that SKProductRequests results in empty product lists when the application has been updated compared to a clean install where they result in a list of populated products.

+3
source share
2 answers

How do you do the update? If you build and run, you will run into this problem when the application is not completely rewritten. Xcode makes some “optimization” solution and copies only those files that are really modified, and this will ruin things.

Create an adhoc distribution and download it to a device with an older version of the application. Check if this adhoc assembly is correct.

+3
source

Is the query being executed: didFailWithError: delegation method? It is part of the SKRequestDelegate protocol, which corresponds to the SKProductsRequestDelegate protocol.

I must agree that StoreKit is not properly documented. In my experience, if iOS sees the same application with different applications, it behaves as if they are two different applications, and do not rewrite (or partially rewrite) the application with the same header. However, if your development device is hacked: launch the application (in its problem state), ssh into your device, launch launchctl list and see how your application’s iOS ID is in the resulting list.

0
source

Source: https://habr.com/ru/post/1447596/


All Articles