iCloud share link opens wrong app on App Store - ios

We recently integrated UICloudSharingController to share cloudkit records on one of our apps, but we noticed while testing that the icloud share link opens the wrong app on App Store if we invite a participant who has not the app installed on his device. We thought it was because we basically duplicated the same coredata/cloudkit implementation for another our app (app store opens the download page for this app), forgetting maybe some cloudkit references of the first app and indeed we noticed a wrong icloud container assignment for the second app, which essentially had two containers, the correct one (its own) and the one of the first app (the wrong one). So, we fixed the problem, every app has his own container now and only his own, and we updated the provisional profiles as well, in order to have the correct icloud containers entitlements. Unfortunately the problem persists and after check everything else (containers, app groups, PersistentStoreDescriptions etc.) we don't have any more ideas.
What else should we check? Thanks in advance for your suggestions.
Some more details of the issue:
If we have the app installed on the device the icloud share link opens the right app.
The same icloud share link works properly on Mac Catalyst (the App Store opens the correct app page if we don't have the app installed). The problem is only on iOS.

Could you check the following:
1. Bundle ID and CloudKit Container ID
Check if the Bundle ID and CloudKit Container IDs fully qualified and match on the original app
The 2nd app should have a different Bundle ID and Container ID from the original app.
How is the CKContainer created, is it using any identifier? If so does identifier correct?
I feel that some how the problem arises because the projects were duplicated and then modified, that is not a good idea as bundle settings, info.plist, entitlements would be reused.
2. CKSharingSupported
In your plist, is CKSharingSupported set to true for the other app?
CKSharingSupported should be turned on only on the app that needs to support sharing
Refer https://developer.apple.com/documentation/bundleresources/information_property_list/cksharingsupported)
3. Create a new project
Try with a simple app and ensure Share works as you would expect
Copy code (not the info.plist or the entitlements) and build on it incrementally instead of doing it all in one shot

Related

How to delete application from iTunesConnect permanently so it can't be restored later?

Is there are way to completely remove an application from iTunesConnect, including even builds. There is two option for deletion:
There is an option (after app is removed from sale), in App Information section, that says: "Remove App".
Now, that doesn't really removes an app. The app can be restored. Also, all builds are still there.
Is there some way, to delete an app for real?
No, it's not 100% possible. You can remove all the metadata and screenshots, but there is currently no way to delete uploaded builds on App Store Connect.
WARNING: If you remove an app, you will lose ownership of the app name. Removed apps can only be restored if the name is not currently in use by another developer account. In addition, the SKU can’t be reused in the same organization and if you’ve uploaded a build, your bundle ID can’t be reused.
Theoretically you can "reserve" the app name with another developer account and prevent the old account from restoring the app, but I would not bet on that as there are ways to get the app name back.

Does testflight change App ID?

I have an app, which uses Apple Universal Links feature. So, this app should be opened, when user clicks on my web site link. But, somehow, this happens. One of the reasons is wrong App ID. Can test flight change it somehow?
UPD: The Apple App ID is a two part string used to identify one or more apps. Specifically, the Apple app ID is your team ID and bundle ID joined with a period, for example: 1A234H7ABC.com.yourdomain.YourApp.
No, the app ID should not change. The bundle ID should never change and neither should the team ID. You should check your device logs when installing the app to see if the AASA file is getting downloaded. This could be an iOS 11.2 issue in which you'll have to delete the app and re-download it.

itunesconnect - reuse app name

I have two developer account. I created app from first developer account with certain name. App is not yet submitted for review, it is in initial development phase.
Now we thought creating app from another developer account will be more appropriate. Problem is that, now it is not allowing me to use the same name. It says "The App Name you entered has already been used". Which is fine, because it is used in another account.
But I went ahead and renamed my app from earlier account. Still it is not allowing me to use original name from second developer account.
1) Does it take some time to put app name back into pool?
2) I don't see the delete option in the first dev account, so that I can try to delete the app.
If renaming the previous app to something completely random does not work, you can try this:
When you create the new app, instead of selecting "English" as primary language, select "UK English" (or anything else, really). The unicity is per language, and local variations are counted as separate languages.
First off, once you register the app name, no matter if in development or release, that App name will from now on be taken. Now to your question, you have two options here.
A) You could transfer the app to your second account
B) You could delete the app (not recommended)
A) If you transfer the app, you basically give the ownership to another account. To do this, simply follow the steps listed by apple here.
B) This option is not recommended as once you remove it in this account you will never be able to reuse the identifier or the App name. If you want to go ahead and delete the app, follow this tutorial again provided by Apple.
Lastly, you can try to simply rename your app. I am not sure if that will work as I have never tried it myself, but nothing speaks against it. Simply open your app in iTunes Connect and then change the display name. This should again offer the old name into the pool of available names. Hope that helps, Julian
Renaming the app actually worked for me:
Go to your iTunes connect account that contains the app you want to 'deprecate'
Select the app, go to App Information
Rename the app in Localizable Information, click save
Now sign into your other iTunes connect account and try to create the app.

How to tell what appid my app is using

I'm stuck in a slightly weird situation. When our app was first created, nobody really knew what they were doing and I'm trying to clean things up a bit.
In the iOS developer center, it seems that there are two App IDs for my app. I think I can delete one of them, because the other one is the one that is actually being used, but I'm not 100% sure.
Here is the App ID that I think is actually being used in our released app:
Here is the "other App ID":
The annoying thing is that the "other App ID" seems to match the bundle ID of the app and xCode seems to be trying to use it as the application-identifier when the app is submitted to the store. I don't want the application identifier to change.
Is it safe to delete the other app id? Can I force xCode to use the correct application identifier? How can I tell which app ID is actually being used by our released app?
Edit:
Why this arose is because after submitting our latest build to the store for testflight, I got this notification:
Dear developer,
We have discovered one or more issues with your recent delivery for
"My Cool App". Your delivery was successful, but you may wish to
correct the following issues in your next delivery:
Potential Loss of Keychain Access - The previous version of software
has an application-identifier value of ['ABCDE.MyCoolApp'] and the new
version of software being submitted has an application-identifier of
['QWERTY.MyCoolApp']. This will result in a loss of keychain access.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
Regards, The App Store team
The fact that the application-identifier is changing, and that it appears to be using the "prefix" as part of this value, suggests that it was using the first app ID, but now it is going to use the second.
Do you have access to login in to the iTunes Connect for that account? That's what you really need to verify the bundle ID (aka app ID) of the released app.
Login at itunesconnect.apple.com, click on apps, click on your specific app, click on the 'more' tab, click on 'about this app' it will show you the bundle ID being used for the released app. Feel free to delete the OTHER app ID out of your account. Not the one in iTunes Connect :)
The bundle ID in your Xcode project can always be modified to match whatever app ID you'd like, as well as you can easily regenerate any necessary provisioning profiles for any app ID. (of course, you should make it match the existing one in iTunesConnect if you want to release an update for that app)
Edit:
It sounds like you've been able to match up the app ID, but not the prefix. The way prefixes are assigned has changed over the years and now they are all team based. You can read this technical note and see if it will help you resolve the warning you encountered.
Developer Link
The primary difference between your 2 App ID is the ID:
the first one has '*' as ID. It means it is a wildcard ID. You can create multiple applications using different bundle identifiers with the same provisioning profile using this ID. But you don't have access to specific capabilities such as Push Notifications, in-app purchase (because multiple apps will share the same profile
the second one is fully qualified and can be used only with the app whose bundle identifier is 'MyCoolApp' and can have access to full capabilities of apps.
Note that your app ID naming convention should be in reverse url format as Apple advices: myCompany.myInternalGroup.myAppId.appFlavor for instance.

iCloud entitlements rejected

I've worked for a while now on my (existing) app to add support iCloud synchronization. In total, I have 3 Versions of the app:
a) regular iPhone version
b) lite (free) iPhone version
c) iPad version
I want to use iCloud to make the core data storage sync between all 3 versions/devices. I've got the implementation, and the development versions I put on my devices worked great.
Yesterday I decided to submit the iPhone versions, but they got rejected:
Invalid Code Signing Entitlements - The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix. The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier.
Specifically, value "[teamid].com.[myself].[somename]" for key "com.apple.developer.ubiquity-container-identifiers" in [my app] is not supported.
I really have no clue about how those identifiers should look like. On this page: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1 they say something about containers of my other apps ... do I have to add 3 containers for the 3 versions of my app? So far I configured under project/targets/summary/entitlements:
[x] iCloud Key-Value Store: com.[myself].[somename]
iCloud Containers: com.[myself].[somename]
for all 3 versions (same identifiers). What do I have to configure exactly, so that all 3 versions will sync their core data storage database through iCloud?
According to iCloud Design Guide: iCloud Fundamentals, all your apps sharing your iCloud container, can do so using a single iCloud container (if that is what you wish). The catch here is that the primary (first) container ID must be the Bundle ID of your current app being developed, or a Bundle ID of any of your previously submitted apps (that share the same Team ID).
I'll bring an example,
Let us assume that your app regular iPhone app (a) has a Bundle ID com.yourteam.iphoneapp and it was the one that you submitted first and is available on the App Store. Then you have to provide that same ID as the primary iCloud container ID for all other versions as well.
Here's a relevant section out of the document mentioned above:
In the Xcode target editor’s Summary tab, you can request access to as
many ubiquity containers as you need for your app. For example, say
you provide a free and paid version of your app. You’d want users, who
upgrade, to retain access to their iCloud documents. Or, perhaps you
provide two apps that interoperate and need access to each other’s
files. In both of these examples, you obtain the needed access by
specifying a common ubiquity container and then requesting access to
it from each app.
Pick one of your iCloud-enabled apps to serve as the primary app for the common ubiquity container. The app you pick can be the current
one you are developing, or another app of yours submitted for
distribution in the App Store and whose entitlements use the same team
ID.
You have probably resolved this issue by now, but the answer is that you just use the same ubiquity container identifier in all apps. You only need one, and it is not dependent on the app name: notice Apple told you to use "[teamid].com.[myself].[somename]" not "[teamid].com.[myself].[appname]". Use "some name" that is consistent between the apps, not the "app name".
You need to create 3 separathe iCloud enabled provisional profiles. Devices that are running the same version of your app can share data on the same iCloud container. But if you wish to have any devices running any one of those three versions of your apps to share data then you need to add those identifiers in the Entitlements section of each version.
There is good tutorial on iCloud from http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1
Edited:
I added an sample picture for your case. Also, the text below is extracted from the tutorial on that website:
Here we use a new method you haven’t seen yet called URLForUbiquityContainerIdentifier. This method allows you to pass in a container identifier (like you set up earlier in the iCloud Containers section) and it will return to you a URL to use to access files in iCloud storage.
You need to call this on startup for each container you want to access to give your app permission to access the URL. If you pass in nil to the method (like we do here), it automatically returns the first iCloud Container set up for the project. Since we only have one container, this makes it nice and easy.

Resources