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}
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.
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. ...
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.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With