WatchKit NSAppTransportSecurity error - ios

I get this error when I run my project:
I have read a lot of questions but these don't helped me to solved my issue. In fact, I have set the value of App Transport Security Settings to YES (like in my screenshot) in both of my iOS app and watchOS extension.
Any idea? Thanks!

It seems to be disallowed for the "watchkitapp"-target itself. You are still able to add the ATS-Key to the Info.plist of the "watchkitapp-extension"-Target.
You should be able to define a exception-domain like this:

Related

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>

ERROR ITMS-90056: "This bundle is invalid. The Info.plist file is missing the required key: CFBundleVersion." [duplicate]

So this is a weird one — I get the following errors when trying to submit my archive to the App Store:
ERROR ITMS-90049: "This bundle is invalid. The bundle identifier contains disallowed characters. [See the section of the Application Programming Guide entitled The APplication Bundle.]"
ERROR ITMS-90049 "This bundle is invalid. The bundle identifier contains disallowed characters
ERROR ITMS-90056: "This bundle is invalid. The Info.plist file is missing the required key: CFBundleVersion."
From my plist:
<key>CFBundleIdentifier</key>
<string>com.myApp.app</string>
…
<key>CFBundleVersion</key>
<string>3.1.5</string>
…
<key>CFBundleShortVersionString</key>
<string>3.1.4</string>
Running xCode 7.0.1
Update XCode to 7.1, it is posted yesterday.
Use the newest XCode to submit will be OK.
==================================================
As muyexi said, I delete TencentOpen SDK info.plist,then submit success.
Check if the third-party's has plist file.Apple may mixed the third-party Sdk plist with the local plist file. Delete the third-party's plist file then upload success.
I solve this by following this link, add Bundle identifier which is missing in info.plist of TencentOpen SDK.
If you are using cocoapods, make sure you do a
pod update
That will update all your pod files and solved this issue for me!
I'd like to expand an answer given by #silvon and link more keywords to this question.
Apparently, iTunes Connect backend now validates every single bundle shipped with your app. If a bundle contains Info.plist file, it must have CFBundleVersion and CFBundleShortVersionString keys.
So, if you are using any 3rd party frameworks (specifically, with Cocoapods), make sure that Info.plist in each framework bundle (if exists) contain these keys.
For all of you using CocoaPods, simply try to
pod update
In my case, it was a third party library loaded via cocoapods, but the update did the trick. BTW, none of the libraries had new versions, the update seems to repair some bad things too.
iTunes Connect is currently experiencing major issues. I can't post any citations as I'm unaware of an iTunes Connect support status page, but I spent a while on the phone with them earlier today for a similar issue.
There seems to be some Issues from Apples's Side, I am experiencing the same issues, I would suggest to wait for some time before making any major changes.
This seems to be happening a lot lately, after some time, It starts working again .
I did the same step as Silvon mention.
Removed all third party lib's info.plist (pods as well) with xcode 6.4. Works for me.
Similar to the answer with top rate , but you need to check every SDKs in the project . in my case, it's cocoapod has info.plist. I deleted it and everything works. Xcode 7.1 still has this problem.

ERROR ITMS-90057 "Missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString." [duplicate]

So this is a weird one — I get the following errors when trying to submit my archive to the App Store:
ERROR ITMS-90049: "This bundle is invalid. The bundle identifier contains disallowed characters. [See the section of the Application Programming Guide entitled The APplication Bundle.]"
ERROR ITMS-90049 "This bundle is invalid. The bundle identifier contains disallowed characters
ERROR ITMS-90056: "This bundle is invalid. The Info.plist file is missing the required key: CFBundleVersion."
From my plist:
<key>CFBundleIdentifier</key>
<string>com.myApp.app</string>
…
<key>CFBundleVersion</key>
<string>3.1.5</string>
…
<key>CFBundleShortVersionString</key>
<string>3.1.4</string>
Running xCode 7.0.1
Update XCode to 7.1, it is posted yesterday.
Use the newest XCode to submit will be OK.
==================================================
As muyexi said, I delete TencentOpen SDK info.plist,then submit success.
Check if the third-party's has plist file.Apple may mixed the third-party Sdk plist with the local plist file. Delete the third-party's plist file then upload success.
I solve this by following this link, add Bundle identifier which is missing in info.plist of TencentOpen SDK.
If you are using cocoapods, make sure you do a
pod update
That will update all your pod files and solved this issue for me!
I'd like to expand an answer given by #silvon and link more keywords to this question.
Apparently, iTunes Connect backend now validates every single bundle shipped with your app. If a bundle contains Info.plist file, it must have CFBundleVersion and CFBundleShortVersionString keys.
So, if you are using any 3rd party frameworks (specifically, with Cocoapods), make sure that Info.plist in each framework bundle (if exists) contain these keys.
For all of you using CocoaPods, simply try to
pod update
In my case, it was a third party library loaded via cocoapods, but the update did the trick. BTW, none of the libraries had new versions, the update seems to repair some bad things too.
iTunes Connect is currently experiencing major issues. I can't post any citations as I'm unaware of an iTunes Connect support status page, but I spent a while on the phone with them earlier today for a similar issue.
There seems to be some Issues from Apples's Side, I am experiencing the same issues, I would suggest to wait for some time before making any major changes.
This seems to be happening a lot lately, after some time, It starts working again .
I did the same step as Silvon mention.
Removed all third party lib's info.plist (pods as well) with xcode 6.4. Works for me.
Similar to the answer with top rate , but you need to check every SDKs in the project . in my case, it's cocoapod has info.plist. I deleted it and everything works. Xcode 7.1 still has this problem.

Various ITMS errors when trying to submit archive to App Store

So this is a weird one — I get the following errors when trying to submit my archive to the App Store:
ERROR ITMS-90049: "This bundle is invalid. The bundle identifier contains disallowed characters. [See the section of the Application Programming Guide entitled The APplication Bundle.]"
ERROR ITMS-90049 "This bundle is invalid. The bundle identifier contains disallowed characters
ERROR ITMS-90056: "This bundle is invalid. The Info.plist file is missing the required key: CFBundleVersion."
From my plist:
<key>CFBundleIdentifier</key>
<string>com.myApp.app</string>
…
<key>CFBundleVersion</key>
<string>3.1.5</string>
…
<key>CFBundleShortVersionString</key>
<string>3.1.4</string>
Running xCode 7.0.1
Update XCode to 7.1, it is posted yesterday.
Use the newest XCode to submit will be OK.
==================================================
As muyexi said, I delete TencentOpen SDK info.plist,then submit success.
Check if the third-party's has plist file.Apple may mixed the third-party Sdk plist with the local plist file. Delete the third-party's plist file then upload success.
I solve this by following this link, add Bundle identifier which is missing in info.plist of TencentOpen SDK.
If you are using cocoapods, make sure you do a
pod update
That will update all your pod files and solved this issue for me!
I'd like to expand an answer given by #silvon and link more keywords to this question.
Apparently, iTunes Connect backend now validates every single bundle shipped with your app. If a bundle contains Info.plist file, it must have CFBundleVersion and CFBundleShortVersionString keys.
So, if you are using any 3rd party frameworks (specifically, with Cocoapods), make sure that Info.plist in each framework bundle (if exists) contain these keys.
For all of you using CocoaPods, simply try to
pod update
In my case, it was a third party library loaded via cocoapods, but the update did the trick. BTW, none of the libraries had new versions, the update seems to repair some bad things too.
iTunes Connect is currently experiencing major issues. I can't post any citations as I'm unaware of an iTunes Connect support status page, but I spent a while on the phone with them earlier today for a similar issue.
There seems to be some Issues from Apples's Side, I am experiencing the same issues, I would suggest to wait for some time before making any major changes.
This seems to be happening a lot lately, after some time, It starts working again .
I did the same step as Silvon mention.
Removed all third party lib's info.plist (pods as well) with xcode 6.4. Works for me.
Similar to the answer with top rate , but you need to check every SDKs in the project . in my case, it's cocoapod has info.plist. I deleted it and everything works. Xcode 7.1 still has this problem.

WatchKit App won't compile: "error: WatchKit Extension doesn't contain any WatchKit apps"

There are several posts on this issue but none of the proposed solutions work in my case. I am trying to integrate the WatchKit into a simple, sample app (I've tried a couple now) by following the instructions provided by Apple. When I compile I get the following error message:
"error: WatchKit Extension doesn't contain any WatchKit apps. Verify
that the value of WKWatchKitApp in your WatchKit App's Info.plist is
set to YES."
I have successfully compiled and run the Apple Watch "Catalog" example so I know things are working from an iPhone to Watch perspective. It seems like something is not right when I try to integrate with an existing app.
I have seen the posts here on this topic (e.g. WatchKit app wont run on simulator) but none of the fixes work in my case; the bundle IDs all appear to be correct. Note I am trying to compile and run on an iPhone 6 not on the simulator.
Any suggestions?
This error occurred for me when I changed the bundle id of my main iOS App.
This is what I did in the project explorer
Under WatchApp --> plist
WKCompanionAppBundleIdentifier ==> Give the id of the iOS App (com.xxxx.appname)
Under WatchApp Extension --> plist
NSExtension-->NSExtensionAttributes-->WKAppBundleIdentifier ==> Give the id of your watchkit app (eg: com.xxxx.appname.watchkitapp)
this fixed the error for me.
I ran into this problem on XCode Version 10.2 (10E125), i realizes when i changed WatchkitApp Bundle identifier one key in watchkitapp extension did not changed and stayed as old bundle identifier.
the path to plist: /Users/.../YourXcodeProjectFolder/Project/YourWatchkitExtensionFolder/info.plist
the problem occurd here:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.applecode.water.watchkit</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
</dict>
the key WKAppBundleIdentifier was made the problem, so i changed it by my self.
I noticed this on Xcode version 8.2.1. Here is how I fixed it.
Go to "WatchKit App" -> Build Settings -> Packaging -> Product Name
Change it so any string different from current string. Agreed that it is a bizarre solution as called in the link below.
Source: https://blogofpuneet.wordpress.com/2015/05/02/xcode-build-error-watchkit-extension-doesnt-contain-any-watchkit-apps-verify-that-the-value-of-wkwatchkitapp-in-your-watchkit-apps-info-plist-is-set-to-yes/
Main reasons to this error,
1 Incorrect watch app bundle id in watchkit extension plist file.
Missing dependancy of watchapp.app in watchkit extension target.
Apple document with catalag example may help
https://developer.apple.com/library/ios/technotes/tn2410/_index.html
Below settings worked for me
In Main App Info.plist
Bundle identifier:com.domain.WatchKit-table
In Watchkit App Info.plist
WKCompanionAppBundleIdentifier:com.domain.WatchKit-table
Bundle identifier:com.domain.WatchKit-table.watchkitapp
WatchKit Extension Info.plist
NSExtension>NSExtensionAttributes>WKAppBundleIdentifier:com.domain.WatchKit-table.watchkitapp
Bundle identifier:com.domain.WatchKit-table.watchkitapp.watchkitextension
Note: my bundle id has * as the third component.
WatchKit-table is my project name
I noticed this with xcode 10.0 after changing the build number.
Cleaning the build folder, closing xcode, and re-opening worked for me.
In my case I had problem with building of the extension library. In fact it was not built and I had two errors:
1. From linker about absense of the extension library.
2. From Xcode about "missing" NSExtensionPointIdentifier key.
Fix of linking error also fixed this message.
I'm using Xamarin and Visual Studio (on the PC). I had this issue, but none of the fixes above worked. Much like the XCode fix, however, restarting Visual Studio turned out to be the answer. /sigh

Resources