App rejected due to missing info.plist key - ios

My app is getting rejected due to a missing info.plist key.
Missing Info.plist key - This app attempts to access privacy-sensitive
data without a usage description. The app's Info.plist must contain an
NSPhotoLibraryUsageDescription key with a string value explaining to
the user how the app uses this data.
I know how to "fix" it. It's just as simple as it sounds, just add NSPhotoLibraryUsageDescription to my info.plist with a description of what it's used for.
The problem is that I'm not using anything that should trigger this requirement. I do not want to add this description without knowing what it's for.
The only thing I can think of that could cause this problem right now is that one of the external frameworks I'm using via CocoaPods has something to do with it.
This is my podfile:
def myPods
pod 'HockeySDK', '4.1.2'
pod 'ReactiveCocoa', '2.4.7'
pod 'TTTAttributedLabel', '2.0.0'
pod 'GoogleMaps', '2.1.0'
pod 'GoogleAnalytics', '3.17.0'
end
target 'MainApp' do
myPods
end
target 'BetaApp' do
myPods
pod 'Instabug', '7.0.5'
end
I know for a fact that Instabug requires this key (along with the key for Microphone usage), but I'm not always including Instabug, as you can see.
Let's say I have two targets; MainApp and BetaApp. They each have its own info.plist. In BetaApp's info.plist, I have included the keys required. In MainApp I have not included them, because Instabug is not used in MainApp.
When I now try to upload the MainApp to AppStore I get this rejection.
I have also tried removing the Instabug-pod completely (even though it's just present in the BetaApp), and it still happens in MainApp.
I have never had this rejection in MainApp before (it's not a new app, just an update).
I think I have updated GoogleMaps since last release, and maybe some of the others as well, but I have no idea how to find out why Apple thinks I have to implement NSPhotoLibraryUsageDescription.
Is there a way to find out what part of my app is triggering this requirement?
I assume that if I implement the keys, they will never actually be triggered, and the user would never be prompted to allow access to the photos library (because I have no code that attempts to access the user's photos library), but I'd like to know why this is happening, and I'm reluctant to add it before I know..

I'd suggest you to follow instructions found in this answer
I understand that this might sound dumb to add NSPhotoLibraryUsageDescription key for no reason, however binary validation on the Apple's side is the process you don't have control over so it's simpler just to add this key.
As for the background reason, I believe, Apple validator looks for UIImagePickerController usage in binary, not only AssetsLibrary or Photos framework linkage. So if you'd like to get your app submitted & approved, you have either sanitize around this, or simply add required key.
If you think, you don't use it, take a look at ReactiveCocoa/UI/UIImagePickerController+RACSignalSupport.m, so, unless you are not ready to have a custom ReactiveCocoa or avoid it's usage, you'll have to deal with NSPhotoLibraryUsageDescription

Related

Where should I add GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED?

I'm reading Firebase release notes and it seems that after version 6.29.0 they've adapted to the new iOS 14 tracking requirements and they offer a way to not automatically initialize SKAdNetwork:
[SKAdNetwork registerAppForAdNetworkAttribution] is now automatically called on first open by default. To opt-out of this default behavior, add the key GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED with Boolean value NO to your app’s Info.plist file.
I want to trigger SKAdNetwork myself, but it's unclear to me if by app's Info.plist they mean:
Option 1: The Info.plist created when you do Xcode, File, New, Project (the one that contains URLTypes, App Schemes, ...)
Option 2: GoogleService-Info.plist
I think they mean option 1, but I'm not totally sure as everything in Firebase is usually configured by option 2.
It's Option 1.
The GoogleService-Info.plist is supposed to be unused unmodified from the Firebase console download and is backend configuration information.
The app's Info.plist is for app specific configurations.

The app's Info.plist file should contain a NSBluetoothAlwaysUsageDescription key while the key is in the plist file

First of all, I would like to state that I already looked at Stack Overflow post here and adding either the one mentioned by either iCoder & Deepak didn't solve the problem for me.
I'm using React-Native to develop my apps including this React-Native-Permissions package I found. Their documentation states that I should add all the permission their package enables e.g. Location, Camera and all the others mentioned there. After I did this I was able to upload my application to the store and submit it for review.
Today I got to the office and I saw there was some feedback from Apple available. So after I completed the feedback I wanted to re-upload to the store again (increasing the build number as I'm supposed to do).
And now I keep getting the message in the title mentioned above while I have it present in my info.plist like such
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
EDIT:
I hope to clarify things below in order to find an answer to the problem I'm facing. The error given in the title occurs directly after uploading to the store (So I'm guessing the actual error is picked up the automatic checks done by the system).
The answer below won't help me to fix the problem since the more descriptive string wont be checked by the automatic system check. And I've successfully used this string for other elements in the info.plist. Next to this I found evidence that people successfully submit their app to the app store using this tactic. As shown by the comment of Gradner following this link React Native Permission issue 266
If you are not using Bluetooth,
just add this to your Info.plist file:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes the react-native-permissions library, which references this permission in its code.</string>
Apple deprecated NSBluetoothPeripheralUsageDescription property in favor of NSBluetoothAlwaysUsageDescription.
See details here:
link to Apple docs
If you are using bluetooth,
just add this to your Info.plist file:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Our app uses bluetooth to find, connect and transfer data between different devices</string>
Someone posted an answer that helped me, but then deleted it! To paraphrase the answer:
Adding the privacy keys to the plist without knowing what is triggering the error from Apple is not the best way to solve this.
In my case, when I did a grep search I found that there is some reference to CoreBluetooth.framework inside my project.pbxproj. I removed the reference and the build and TestFlight upload succeeded!
To search use the following command:
grep -r -a CoreBluetooth.framework ProjectFolder
I got the root cause
We have below two default options in plist to enter the bluetooth usage.
1.Privacy - Bluetooth Peripheral Usage Description
2.Privacy - Bluetooth Always Usage Description
But Xcode save this option in the source code like the below
1.NSBluetoothPeripheralUsageDescription instead of Privacy - Bluetooth Peripheral Usage Description
2.Privacy - Bluetooth Always Usage Description instead of Privacy - Bluetooth Always Usage Description
So now the point is
NSBluetoothPeripheralUsageDescription is deprecated and its expecting the key "NSBluetoothAlwaysUsageDescription"
Here is the solution, open the plist file as source code in Xcode and
copy-paste the below key-value pair
Key: NSBluetoothAlwaysUsageDescription Value: This application
requires bluetooth in order to bla bla bla.
I can't figure out why the first time it wasn't working but when I got into the office today I saw the comment posted by Sumeet.Jain that suggested I should replace the
NSBluetoothPeripheralUsageDescription key with the NSBluetoothAlwaysUsageDescription key
This would actually result in an error that would say missing NSBluetoothPeripheralUsageDescription as we might expect it to. So then I re-added the NSBluetoothPeripheralUsageDescription to my info.plist and now I was finally able to upload my app to the store. Thanks for everyone that helped me.
p.s. The only thing I can think of I did differently compared to yesterday is that I now added the key using Xcode instead of just editing the info.plist file in my editor I use for react-native. Hopefully this helps others as it helped me
Well, I fixed this issues.
if your app is using bluetooth so you must add this into info.plist.
NSBluetoothAlwaysUsageDescription
Our app uses bluetooth to ...do something...
if your app doesn't need bluetooth but it's prompted with unexpectedly.
then:
open Xcode :
go to remove CoreBluetooth.framework:
-> yourproject -> frameworks -> CoreBluetooth.framework
-> yourproject -> Build Phases -> Type Search to find "Bluetooth" (remove all related "Bluetooth")
It's works for me!
Hope will help you.
I was able to successfully remove the Bluetooth permission alert when the app opens. In my case the problem was with the library "react-native-connectivity-status". I downgraded the library from version "1.5.2" to "1.5.1".
Here are the steps:
Change
"react-native-connectivity-status": "^1.5.1",
To
"react-native-connectivity-status": "1.5.1",
Then ran following commands:
rm -rf node_modules/
rm package-lock.json
npm i
cd ios/
rm -rf Pods/
pod install
For deployment targets earlier than iOS 13, add both NSBluetoothAlwaysUsageDescription and NSBluetoothPeripheralUsageDescription to your app’s Information Property List file
String depends upon you if you are using Bluetooth or not.
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes some library, which references this permission in its code.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Our app does not request this permission or utilize this functionality but it is included in our info.plist since our app utilizes some library, which references this permission in its code.</string>

Watch OS keychain sharing

Is it possible to access the shared keychain in WatchOS 4+?
I've set the exact same Keychain Sharing > Keychain Group of the iOS app (which syncs perfectly with a MacOS app), but all it finds is an empty object.
I'm using this library (https://github.com/kishikawakatsumi/KeychainAccess) which works really well on iOS and MacOS, but not on WatchOS.
I shared the Target Membership of the classes involved to the Watch Extension (and I think it works, otherwise it would throw an error that was able to get the method or so), added the pod to watchOS like this
use_modular_headers!
def shared_pods
pod 'KeychainAccess'
end
target 'Watch Extension' do
platform :watchos, '4.0'
shared_pods
end
My question is: am I missing some configurations? It looks like it is able to access the local keychain, but cannot sync with the shared one.
Thanks
I was attempting to do the same thing, and it's a great pod to use to make the keychain easy to work with. However the part that needs to work is the iCloud Synchronizing for it move the data like you are thinking.
According to the current Apple Docs, in the notes under the Storing Data Securely in the Keychain
NOTE
The kSecAttrSynchronizable key is not available in watchOS.
Without that, the WatchOS can not get the keychain data you have stored over on the iOS side. So you're doing the pods right, and it's a good pod, but WatchOS doesn't want us doing that.
TLDR; - You can't do it at this time.

Unable to upload build in iTunes when using Google Plus through Pods [duplicate]

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

Unexpected CFBundleExecutable key

After spending some time googling, something tells me that the issue is new.
We had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppStore.
We use pods, lots of tracking and monitoring, like GA and Instabug.
Now we decided to submit a version of the app built on Xcode 7 on iOS 9 to TestFlight.
We disabled bitcode, since many pods, like Flurry and other prebuilt libraries does not include it.
The build was successful, after the submission to iTunesConnect we get this:
We had same for GoogleAppIndexing library (in pods too), but we removed it, just to make it work. Now - Instabug. It is going too far, so I am trying to understand what is going on in iOS 9 and what are the changes that made a fully working project to start throwing such errors.
Any thoughts and ideas are welcomed! Please share your experience, and if I missed something, I will gladly share my steps.
I encountered the same problem today with the same exact error message when trying to submit our app (using Xcode 7 beta 5) but instead of the instabug.bundle bit, it was for me TencentOpenApi_IOS_Bundle.bundle.
I solved the problem by finding the named bundle in the project then - just as the error message suggests - edited the Info.plist that is in the bundle by removing the CFBundleExecutable key. The CFBundlePackageType key was already set to BNDL so I didn't touch it.
After these changes I did Product > Clean and then had no problem submitting the app to the App store.
Encountered this with AviarySDK on Xcode 7 GM, while submitting to the App Store.
First I'd check to see whether you're on the latest version of your library - the vendor may have fixed this already. If you are still facing this problem however, as Sleiman describes you need to remove the CFBundleExecutable key from the plist file for the offending library.
Cmd + Shift + O and type "Info.plist", you can then find the appropriate file:
Once editing the plist, you may be seeing descriptive names (instead of the CFBundleExecutable and other keys. I couldn't edit this file in an external editor, so I had to switch to view raw keys/values by right-clicking on the list:
You can now see the CFBundleExecutable key (which has a description of "Executable file") which you can delete.
For AviarySDK I did this twice, once for each Info.plist seen in the above image, and was then able to successfully submit.
I solve this problem as follows:
We have to remove all the "Executable files" of the following packages:
GooglePlus.bundle
GPPCommonSharedResources.bundle
GPPShareboxSharedResources.bundle
Be sure that "Bundle type code" is equal BNDL
Important: Do not edit anything in the info.plist the main project.
Attached screens as they should be his "info.plist" listed above each package.
Here's what worked for me
Apple-Shift-F, search for CFBundleExecutable
Click each one except "PODS" or your main target
Delete it (delete key)
If the build is submitted through Less than(<) Xcode 7.0 then it will be submitted and also
I have solved it by following way for Xcode 7:
Searched for info.plist in the projects Project Navigator as like following image:
Now opened these info.plist files one by one and deleted the BundleExecutable key EXCEPT the target's info.plist
Now cleaned the project and achieved and It is submitted with No issue.
I had the same issue in Google Maps Library i removed CFBundleExecutable key inside GMSCoreResources.bundle (Info.plist) which is SDK's info.plist clean project and upload to appstore.
Happy Programming.
Just check your Build Settings => Enable Bitcode, and set it NO
In my case I just Drag and Drop The SDK In folder include info.plist file which is not in use. That's create the issue for me. So find the unused info.plist file and delete it from the Source code.
One additional note: sometimes if you have additional targets there will be target properties that may also include the key (in the "Info" section), so make sure to check those and remove it from there also. I discovered this with one of the bundles I was trying to include. I deleted the info from the plist, but kept getting the error.
If you're seeing this error from a library installed via CocoaPods, try a pod update <OFFENDING POD NAME>
That solved the problem for me.
I just added word "BNDL" to appropriate place in plist "Bundle creator OS Type code".

Resources