I tried to submit my app to AppStore but got rejected with motivation:
Your app uses or references the following non-public APIs:
UIScrollViewDelayedTouchesBeganGestureRecognizer, UIScrollViewPanGestureRecognizer
The only place where I can find this strings is in MHVideoPhotoGallery pod. There it using like:
if ([otherGestureRecognizer isKindOfClass:NSClassFromString(#"UIScrollViewDelayedTouchesBeganGestureRecognizer")]|| [otherGestureRecognizer isKindOfClass:NSClassFromString(#"UIScrollViewPanGestureRecognizer")] ) {
return YES;
}
I created an issue for this (https://github.com/mariohahn/MHVideoPhotoGallery/issues/156), but don't get response. But this is popular pod project, if Apple rejected apps because of it - would not it be widely known? What can I do with this situation?
Related
I have the following issue when I upload my React Native app to the app store
The app references non-public selectors in Payload/AppGeolocNative.app/AppGeolocNative: getAuthorizationStatus:, isPassthrough, newSocketQueueForConnectionFromAddress:onSocket:, onSuccess:, relativeSize, removeValuesForKeys:completion:, socket:didAcceptNewSocket:, socket:didConnectToHost:port:, socket:didConnectToUrl:, socket:didReadData:withTag:, socket:didReadPartialDataOfLength:tag:, socket:didReceiveTrust:completionHandler:, socket:didWriteDataWithTag:, socket:didWritePartialDataOfLength:tag:, socket:shouldTimeoutReadWithTag:elapsed:bytesDone:, socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:, socketDidCloseReadStream:, socketDidDisconnect:withError:, socketDidSecure:, spanArray, spanArray_Count, strikeThrough, underline
I do not really understand what is the issue, everything is working ok, this is just a warning
I had the same problem and I got an email from Apple and it was telling me the reason for the error. The problem was some information I needed to add to the info.plist file. In my case it was the NSPhotoLibraryUsageDescription.
Check if you have any email from apple which telling you what is missing.
I have an app in private which need to scan all applications and schemes and get it by using private API LSApplicationWorkspace defaultWorkspace with others functional method, such as privateURLSchemes allInstalledApplications. This app works good and I can get all I need from the private API before iOS 11, but in this version I only got some warning and an empty array. It seems Apple limits private API that developer can't use in private in iOS 11.
So my question is what alternative ways can achieve my need in iOS 11?
UPDATE: This method does not work on iOS 12 - entitlement required
There is a way to find if a specific application is installed, its not a list of all apps like allInstalledApplications returned but its useful to query for a specific bundle id
Here is an example, the method receives bundle id and return true if it's installed on the device:
- (BOOL)checkIfAppInstalled: (NSString*)bundleID {
dlopen("/System/Library/PrivateFrameworks/MobileContainerManager.framework/MobileContainerManager",RTLD_NOW);
Class MBAppManager = NSClassFromString(#"MCMAppDataContainer");
NSError * error ;
id contentApp = [MBAppManager performSelector:#selector(containerWithIdentifier:error:) withObject:bundleID withObject:error];
return contentApp != nil;
}
Private API is just that—private API. Using it is completely unsupported, and as such, you cannot rely on a private API continuing to work in future versions of the OS.
In addition, I would be highly surprised if an app that used private API were able to get into the App Store, since it's one of the things Apple's reviewers scan for.
In enterprise you can use Apple Mobile Device Management (MDM) Protocol ManagedApplicationList commands to get the status of managed applications
From this post. From the comment of #ovo under the original question, it seems works.
Using MobileContainerManager.framework it's possible to check if an app is installed by using bundle id.
//If the device is iOS11
if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
NSBundle *container = [NSBundle bundleWithPath:#"/System/Library/PrivateFrameworks/MobileContainerManager.framework"];
if ([container load]) {
Class appContainer = NSClassFromString(#"MCMAppContainer");
id test = [appContainer performSelector:#selector(containerWithIdentifier:error:) withObject:bundleId withObject:nil];
NSLog(#"%#",test);
if (test) {
return YES;
} else {
return NO;
}
}
return NO;
} else {
//Usual way
}
i got same Apple Reject.
Apple Says
Your app uses or references the following non-public APIs:
LSApplicationWorkspace
The use of non-public APIs is not permitted on the App Store because
it can lead to a poor user experience should these APIs change.
Continuing to use or conceal non-public APIs in future submissions of
this app may result in the termination of your Apple Developer
account, as well as removal of all associated apps from the App Store.
Solutions
To find out which library or code is causing this problem use the below code snipped.
1-) Open the terminal in macbook (cmd+ space) and than write terminal
2-) change the project directory with the below code
cd /Users/emreg/Documents/{your project url}
3-) To search appropriate word
grep -r LSApplicationWorkspace .
grep -r allApplications .
in my case, Blesh SDK has included LSApplicationWorkspace and allApplications keyword which is not permitted by Apple. When i upteded SDK, my problem is solved.
i hope, this answer will help someone.
if ( NSClassFromString(#"ASIdentifierManager"))
{
limitAdTracking = !ASIdentifierManager.sharedManager.advertisingTrackingEnabled;
idfa = [ASIdentifierManager.sharedManager.advertisingIdentifier UUIDString];
userDict[#"limit_ad_tracking"] = #(limitAdTracking);
}
I have SDK. This sdk uses in different apps. But sometimes My SDK doesn`t get idfa. It can happen in one version of application (one time I get, one time - nope). What can happen?
If your App was not linked against AdSupport.framework, then NSClassFromString(#"ASIdentifierManager") will return nil and you'll never get the IDFA.
Is it possible you added/removed AdSupport.framework between the versions that exhibit different behavior?
when validating my app, I get an error saying
"Improper Advertising Identifier Usage. Your app contains the Advertising Identifier [IDFA] API but you have not respecting the Limit Ad Tracking setting in iOS."
I have check "Yes" on the Prepare for Upload page for Advertising Identifier.I am using revmob ads and flurry analytics in my app(COCOS2D-X project).How to fix this issue, I have tried a lot but not succeed.I have use below code into appdelegate but no luck.
- (NSString *)identifierForAdvertising
{
if([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled])
{
NSUUID *IDFA = [[ASIdentifierManager sharedManager] advertisingIdentifier];
return [IDFA UUIDString];
}
return nil;
}
this IDFA issue was still happening for me today. I tracked it down to the GoogleAnalytics pod, so I just updated the pod to the latist version by specifying pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.7' in the podfile which fixed the issue for me. the version was previously unspecified but was using 3.0.3.
Around April 26th Apple changed their IDFA scanning procedures. Not only do you have to check the appropriate checkboxes after you click on the "prepare for upload", but your code (or any other third party library that you have must use IDFA by using the class directly.
Someone suggested to do this:
"you can do that by replacing direct refs to ASIdentifierManager with NSClassFromString(#"ASIdentifierManager")"
DO NOT load this class using this approach! New scanning procedure will look specifically for this and if it is found instead of direct references - Apple seems to assume that there is some strange usage of the tracking identifier. I can't say I disagree with that decision.
It may not be easy to find exactly which library is at fault. Latest AdMob SDK for example is using the class directly and is NOT the source of a problem.
One way you can find out which library is the source of the problem is to remove AdSupport.Framework from your project and see which libraries fail to link. Those libraries are NOT the problem. See if you have other advertising libraries that do not require you to include AdSupport.Framework - those are most likely the culprit.
It sounds a bit counter intuitive, but the direct referencing is not the problem, dynamic (weak) loading of that class is.
Hope this helps someone - we were pulling our hair out until we found what was the source of the issue.
Looks like Apple has reverted the changes now. All apps are going through just as usual again :)
Today, I tried to submit an update to my app to the store using Xcode 5 and it gave the the warning The app references non-public selectors in Payload/.app/: setCenterPoint: setDetailType.
I'm using BaiduMap Sdk v2.1.0 library and I'm not useing private Api.What could be the problem? How can I fix it? The app is ganna be reject ? Thanks!