Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The application is not permitted to access iTunes Store accounts with UIActivityViewController

I am trying to share my app URL with UIActivityViewController and here is my code:

let items = [URL(string: "https://itunes.apple.com/de/app/idxxxxxxxxx")!]
let ac = UIActivityViewController(activityItems: items, applicationActivities: nil)
present(ac, animated: true)

App URL is working fine on browser. But crashing on iPhone.

Here is the log I am getting in console:

ACAccountStore: [66A6F31E] Failed to save an account. account = | error = Error Domain=com.apple.accounts Code=7 "The application is not permitted to access iTunes Store accounts" UserInfo={NSLocalizedDescription=The application is not permitted to access iTunes Store accounts}

[accounts] ACAccountStore: Failed to create the local account. error = Error Domain=com.apple.accounts Code=7 "The application is not permitted to access iTunes Store accounts" UserInfo={NSLocalizedDescription=The application is not permitted to access iTunes Store accounts}

like image 892
Dharmesh Kheni Avatar asked May 13 '20 18:05

Dharmesh Kheni


People also ask

Why can't I connect to the iTunes Store on Apple TV?

On your Apple TV: Go to Settings > General > Date and Time. If the date and time are incorrect, update them or turn on the option to set date and time automatically. If you tried all of the above steps and you still can’t connect, contact Apple Support. Use the steps above if you see one of these error messages: "Cannot connect to the iTunes Store.

How to set up and view an iTunes account on PC?

Set up and view an iTunes Store account on PC 1 Sign in to the iTunes Store. When you have an Apple ID, you can sign in to the iTunes Store to buy music and video, view or change your account ... 2 Change your account information. You can change your Apple ID name, password, or billing information at any time. ... 3 View your purchase history. ...

What does “Apple ID has not been used in the iTunes Store” mean?

You may have come across the notification “Apple ID has not been used in the iTunes Store”. If your device is new and this is the first time you have used it to access iTunes or the App Store to download something, then the notifications will appear. Normally, you won't see this again after you've purchased or downloaded something for free.

What is Apple's policy on information about products not manufactured by Apple?

Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products.


1 Answers

I was getting the same errors, casting it to any and adding a title solved mine. Check the code for more clarification

let item: [Any]  = ["This app is my favorite",URL(string: "https://itunes.apple.com/de/app/idxxxxxxxxx")!]
let ac = UIActivityViewController(activityItems: items, applicationActivities: nil)
present(ac, animated: true)
like image 82
Charnpreet Avatar answered Oct 23 '22 16:10

Charnpreet