I am getting an error while uploading to app-store using Xcode :
itunes store operation failed the app references non-public selectors in payload: setResult; taskWithResult
With reference to iOS app – Non-Public API usage- app references non-public selectors: cancelButtonClicked, setResult:
I found :
PatienPortal_ios_build_new jenkins$ grep -Rnis ‘etResult:’ *
Binary file build/Physician Portal.xcarchive/Products/Applications/Physician Portal.app/Physician Portal matches
Binary file node_modules/cordova-plugin-facebook/src/ios/Bolts.framework/Bolts matches
node_modules/cordova-plugin-facebook/src/ios/Bolts.framework/Headers/BFTaskCompletionSource.h:37:- (void)setResult:(id)result;
node_modules/cordova-plugin-facebook/src/ios/Bolts.framework/Headers/BFTaskCompletionSource.h:63:- (BOOL)trySetResult:(id)result;
Binary file node_modules/cordova-plugin-facebook/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit matches
Binary file platforms/ios/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Physician Portal/IntermediateBuildFilesPath/Physician Portal.build/Release-iphoneos/Physician Portal.build/Objects-normal/arm64/Physician Portal matches
Binary file platforms/ios/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Physician Portal/IntermediateBuildFilesPath/Physician Portal.build/Release-iphoneos/Physician Portal.build/Objects-normal/armv7/Physician Portal matches
Binary file platforms/ios/Physician Portal/Plugins/cordova-plugin-facebook/FBSDKCoreKit.framework/FBSDKCoreKit matches
Binary file plugins/cordova-plugin-facebook/src/ios/Bolts.framework/Bolts matches
plugins/cordova-plugin-facebook/src/ios/Bolts.framework/Headers/BFTaskCompletionSource.h:37:- (void)setResult:(id)result;
plugins/cordova-plugin-facebook/src/ios/Bolts.framework/Headers/BFTaskCompletionSource.h:63:- (BOOL)trySetResult:(id)result;
Binary file plugins/cordova-plugin-facebook/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit matches
This means that issue is due to Facebook Plugin!
Furthermore, I added my bundle id to .plist reference https://developers.facebook.com :
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fbxxxxxx</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>xxxxx</string>
<key>FacebookDisplayName</key>
<string>PC360-PatientPortal</string>
Still, I am getting same error! So Please help me out, I am stuck badly, what to do next?
Note: I am using Xcode 9 and building Cordova project using Jenkins.
2
Answers
Got the Following reply from Apple team :
Hello Ashish,
Thank you for taking the time to reach out to us today about the error you are experiencing while attempting to upload your new build to iTunes Connect. My name is Maria, and I will be delighted to point you in the right direction.
After reviewing our system, it seems that the error in your previous builds is being caused by the failure to provide a usage description within Xcode. Starting with iOS 10, purpose strings are required for access to any protected class of data from within your app, including usage of those protected data classes by any third-party library your app uses. If you’re receiving a message about a missing purpose string for a data class that you don’t recognize, consult with your third-party library vendors about their usage of that protected data class.
For more detailed information, consult the following resources:
App Programming Guide for iOS: Supporting User Privacy https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ExpectedAppBehaviors/ExpectedAppBehaviors.html#//apple_ref/doc/uid/TP40007072-CH3-SW6
Information Property List Key Reference: Cocoa Keys https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
WWDC 2016: Engineering Privacy for Your Users (usage description keys discussed at 29:14) https://developer.apple.com/videos/play/wwdc2016/709/?time=1754
If the issue persists, please submit your request to Apple Developer Technical Support at:
https://developer.apple.com/support/technical/
For your reference, your case number is 100405033091.
Best regards,
Maria Apple Inc.
You have to contact Apple on resolution center and tell them that you are not using any private API, then explain that the calls to setResult and taskWithResult are calls to the Facebook Bolts SDK, not to private APIs.
You can try to send them the link of the bug report opened on Facebook SDK site.
That usually work, but if it doesn’t work you will have to remove the plugin adding that SDK and try with another plugin that doesn’t use Bolts.
Another issue where people complains about apps being rejected because of this