Rejection: this app has been found to contain features to determine the review status of the app

My app exists since years and while submiting a very small update to fix important bugs, my app has been rejected.


Reason: "We discovered that your app contains hidden features. Specifically, this app has been found to contain features to determine the review status of the app." No additional info 😢


To help developers during tests, in the app we display the version, build number and origin. The origin tells if the app has been installed form TestFlight, Xcode, AdHoc or App Store. This is the code we use to detect the origin:


char *gmu_apl_get_app_dist(void)
{
#ifdef DEBUG
    bool debug = true;
#else
    bool debug = false;
#endif
    NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
    NSString *receiptURLString = [receiptURL path];
    bool testFlight =  ([receiptURLString rangeOfString:@"sandboxReceipt"].location != NSNotFound);
    bool provisioned = [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"];
    int dist = (debug       ? (1 << 0) : 0)
             | (testFlight  ? (1 << 1) : 0)
             | (provisioned ? (1 << 2) : 0);

    char *ret = "?";
    asprintf(&ret, "D%d", dist);
    return ret;
}


Could this be the reason of the rejection?


We also use Segment SDK (Analytics.framework). Maybe something wrong there?

Replies

Yup, that could do it. You no longer need that code in the version that you submit to the app store. You could delete it (or cause it to indicate that the app is from the App Store) and resubmit. Be sure to state in the notes to App Review something like "(w)e have deleted code that was intended to detect when the app was run from Xcode, TestFlight or AdHoc because of concerns that we were detecting use by App Review. That was not our intention."


Do you recall the scandle in which Volkswagen detected that their deisel cars were undergoing emission testing and they altered the engine firing characteristics? Maybe your reviewer at App Review is driving just such a car.

Is there some reason you didn't strip debug-centric code before store distribution?


Is this the only debug code still present in the store version?

Just by asking for explanations in the Resolution Center, Apple has released the app as it is. They didn't give me any explanation. The problem has been solved without making any change and without resubmitting any new build.


Of course, in my request, I also shown the source code above and told that we were not hiding any feature or changing any behavior of the app during the review.


I've a second app having the same issue. This app is very similar to the first one and has been rejected at the same time. Let's see what happen with that one.

That shows that providing. clear (and honest) explanation really helps. probably the first rejection was automatically detected and in the second a human reviewer got it clear.


Don't forget to close the thread on PBK answer.

>Of course, in my request, I also shown the source code above ...


Good approach, good process, thanks for the followup and good luck in the store.

The second app has finally been approved as weel, but...


The code shown in my original post was not a issue at all!


The second app has been rejected because it downloaded a javascript bundle at launch. This has been seen as the ability to change the behavior of the app after the review. This download existed in previous build but didn't cause problems. We had to explain what we were doing and the app has been accepted.


It is not clear why the first app has been rejected because no javascript was downloaded there. But because both app are similar and summited at the same time, the review team has probably put everything on the same basket.


It took 26 days to release a small yet critical update :-)


The mistake we made was to ask clarificaiton for the first app only, thinking the other app had the same problem. We then asked for clarification for the second app while resubmiting a new build (in the message to review team). Apple rejected again without any clarification, ignoring our question. We finally asked again in the resolution center and got few words mentioning the javascript bundle. We would have appreciated to have these few words since the beginning.