Getting ERROR ITMS-90164 when trying to upload Watch App to AppStore - swift

I am learning to develop an Apple WatchOS App (stand alone watch app), this is my first ever app, I have written the code to access the HealthKit functionality (Read and Write, I am also able to run the app on my physical device and no errors in console when reading or writing to HealthKit).
I have created an Identifier in the Apple Developer Website and enabled HealthKit
In my app I have also enabled the HealthKit Capabilities
In my Info.plist I have added the following 2 permissions
Privacy - Health Share Usage Description
Privacy - Health Update Usage Description
However I am getting the following error when trying to publish the app to AppStore.
Please can someone guide me and tell me what I could be doing wrong here.
My Error
App Store Connect Operation Error
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.healthkit.access' in 'Payload/app name.app/Watch/app name WatchKit App.app/PlugIns/app name WatchKit Extension.appex/app name WatchKit Extension'."
I have tried to run Product->Clean etc however no luck
Thank you

Related

Inapppurchase invalid product id - iPhone StoreKit

I'm building an iPhone app and having a really hard time testing my support for in-app purchase using StoreKit.
Specifically, I am unable to retrieve a product ID using SKProductRequest, and so I can't get far enough to even try to attempt the purchase.
Here's what I have done so far:
- Created an App in iTunes Connect
- Created an App ID will a valid Bundle ID in the Provisioning Portal, and configured it to Enable In-App Purchase (I see a green ball for this App ID)
- Created a Provisioning Profile using the App ID above for my iPhone 3GS that I use for development (iPhone is updated with the latest current firmware) and imported it into XCode
- Set the Bundle ID for my application in Info.plist to match the Bundle ID (full Bundle ID, like "com.company.myapp")
- Created an In-App purchase associated with my iPhone app above, set its ProductID to "com.company.app.feature", set the type as Consumable and marked it as "Cleared for sale". The current status is "Pending Developer Approval"
- Updated my code to use the ProductID of the in-app purchase created above when requesting Product Information using SKProductRequest
- Signed out of my iTunes Store account on my phone, and enabled In-App Purchases on the device
- Built a Debug build of my app targeted for my phone with the Provisioning Profile above
- Deployed my app on my device using XCode and tried to run the StoreKit code with the USB cable attached.
When I issue a request for the product from the store, the productsRequest:didReceiveResponse: delegate is invoked, but the productID I request shows up as invalid.
Next, I also tried to upload a binary for my app and see if that made a difference, but it didn't. The current status of my binary is "Developer Rejected", if it matters.
It has been well over 24 hours since I created the app/in-app purchase
Thinking that it might have something to do with my device, I reset an iPod touch to factory settings updated with the latest firmware. I created a provisioning profile for the iPod touch and deployed the app to it using XCode. That didn't help either - I see the same "invalidProduct" problem.
Any suggestions of what I should do next?
Here you have many possible causes of Invalid Product ID

Provisioning profile issue, I just can't run my application on device

I'm getting this message when I try to run on my device:
A valid provisioning profile matching the application's Identifier 'my app bundle ' could not be found
I am able to run the app on iPhone Simulator without problem.
I was able to connect to the device before, I don't know what is going on...
I already deleted everything and tried again, even with a new App ID created on the portal but it didn't work either.
I just don't know what to do to run the app on my device?
A valid provisioning profile matching the application's Identifier 'my app bundle ' could not be found
Please ensure that the identifer is consistent with the App ID you created for the provisioning profiles on developer portal.
For example, if you created App ID "A1B2C3D4E5.com.yourdomain.*" and assigned it to your provisioning profile, your app must have a bundle identifer like "com.yourdomain.someapp" so that it can be correctly signed.
Also I don't think space character is allowed in the identifier. See Information Property List Key Reference:
The bundle ID string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.
You may refer to:
"Creating and Configuring App IDs" in iOS Team Administration Guide.
Bundle Identifier and Provisioning Profile
Running an app on simulator doesn't require code signing and hence no provisioning profile. As it was working earlier and you've tried deleting and reinstalling everything, see whether your code signing certificate has been revoked or expired.

invalid binary error in iTunes connect

I am trying to upload my app on appstore. Whenever I submit the app successfully,it shows Invalid binary in iTunes connect.
I tried various ways suggested to avoid this error in the other posts.
like I checked all icon images.
I created entire app again.
Revoked and recreated certificates and provisioning profiles.
Still its giving me same error. it does not give any error while building app or while submitting app. only after submitting it shows invalid binary. can any one help me in this?
does creating new id at iTunes connect will work? but i do not want to change the name of the app. whenever i try to delete app from iTunes connect it gives me warning that this app name can not be used in future for any application.
Finally it worked!
I revoked all certificates, and created new. then Recreated new app id and provisioning. created new app id in iTunes store and uploaded application. and now it is showing me Waiting for Review status.
If you have several distribution certificates, check whether you are selecting the same distribution certificate when submitting the app and the certification which you have used to build the application. This might cause to your problem.
The same happened to me, no errors in the validation nor submission and no resolution center.
But later i have found that they have sent an email to the account owner's email, and registered developer
The email I received from Apple had clear language in it corresponding to the change I needed to make. I was submitting a build with an Apple Watch app written in Swift. I had to target 7.0 because I was using Swift. I made this change and the binary was accepted and approved within hours.

Upload IPhone app to device instead of other app

So I'm not that familiar with the process of Provisioning profiles and certificates.
Currently I have one app I'm developing that I can upload to my device.
Now, for testing reasons, I want to write a very simple app and to upload it to my device as well. The thing is, is that I don't want to configure another app in iTunes connect and provisioning profiles, so I thought maybe it's possible just to change the bundle identifier of the second app to be the same as the first.
However, in XCode I get the following error :
"Code Sign error: The identity 'iPhone Developer' doesn't match any identity in any profile"
Any way to make this happen?
If you set the bundle identifier of the 2nd app to be the same as the 1st, the 2nd app will replace the 1st one on your phone.
If you want the ability to have both apps installed at the same time, you need a new app id.
But you don't want to create a new app id for each test project.
The idea is to recreate the Team provisioning profile available for the Company developer program (I guess you subscribed to the individual developer program).
Create a new app id with bundle identifier set to *
Create the provisioning profile associated to this app id
Download and install this generic provisioning profile
With this wildcard profile, you will be able to install any test application.
Please request a certificate to apple through your paid developer account, generate a provisioning profile and install this in mac as well as in your device. then choose your provisioning profile and build and run your app through this provision.then it will install in device. There are details in developer.apple.com regarding to this. If you feels confusion please mail me sandeep.kniit#gmail.com. i will reply you asap.

Can I change the Bundle Identifier in my app after it's been approved?

I've got my app approved a while ago and used the * provisioning profile so I created somehting like:
com.mydomain.MyApp
but now I have the necessity of adding push notifications and I can't due I am using the * provisioning profile and it needs to have its own app ID and profile.
How should I proceed in order to achieve an app update without breaking anything
The bundle identifier for an app must always remain the same between updates, but the AppID can actually be different. So all you need to do is create a new AppID that used the same bundle identifier as the original app instead of a wild card.
Apps that use a wildcard still need a normal bundle identifier. The wildcard AppID lets you use any bundle identifier you like, but it still needs one.
There used to be an Apple article about this:
but it is no longer available online However, an archive is available.
You can't change the CFBundleIdentifier of a released app if you want to release updates for it, the App Store will automatically reject it when you upload. So...
I needed to enable iAds on an app previously developed with a wildcard App ID. Here's what I did:
I have a wildcard App ID of <AlphaNumeric>.* which my app currently uses, and my app has a CFBundleIdentifier of com.companyname.mygame.
Created a new App ID of <AlphaNumeric>.com.companyname.mygame.
Created new development and distribution provisioning profiles that include the new App ID.
Download the new provisioning profiles to Xcode and my devices.
I was then able to compile the App with the new non-wildcard distribution profile, which meant on upload I could enable iAds (or Push for you). The CFBundleIdentifier didn't change so the new compilation appears as an update to the existing app.
I can confirm this process worked without issue.
Under Frequently Asked Questions in the document entitled "Technical Note TN2259," which is "Adding In-App Purchase to your iOS and Mac Applications," there's this bit
Question: My iOS application is currently signed with a Provisioning Profile
that uses a wildcard App ID. How do I enable my App ID to support
In-App Purchase?
Answer: Read the Creating and Configuring App IDs section of
the iOS Team Administration Guide to learn how you can enable your App
ID to support In-App Purchase.
The link points here, and there's a section called, "Updating Your App to Include APNS, iCloud, In-App Purchase, or Game Center Requires an Explicit App ID"
That said, I don't know (yet) at what point the app takes on the new App ID. Is it when you upload for review, before that, or when it has been approved? I am working on this problem now, so I might be able to add to this answer soon.
Edit: The explicit app id only affects the piece of software you are testing and has, essentially, nothing to do with iTunes Connect whatsoever. This means that if you are testing in-app purchases, the piece of software that's running (your app) has to have a provision profile based on a cert that is app specific. What happens in iTunes Connect is totally irrelevant.