![]() Let ac = UIActivityViewController(activityItems: items, applicationActivities: )Īc. Can you check the dimensons of these files are correct: Icon-762x.png is 152x152 Icon-76.png is 76x76 Icon-72.png is 72x72 Icon.png is 57x57. If you wanted to use your view controller, first make it conform to UIActivityItemSource, like this: class ViewController: UIViewController, UIActivityItemSource This might be whatever view controller triggered the sharing, but ideally it would be a separate object. To fix this you need to make an object that conforms to the UIActivityItemSource protocol. If you start sharing some text and your users selects to share that using the Mail app, you’ll notice your text gets put into the body of the message with nothing in the subject. Give it the value “We need to write photos” then press return. So, open your project’s ist file, select any item, click +, then choose the key name “Privacy - Photo Library Additions Usage Description”. To fix this problem we need to add a text string describing our intent. As a result, if users try to tap that options your app will crash. That might seem fine, but writing to the photo library is a restricted operation. However, the default share sheet for images will offer users the chance to save the image to their photo library. You can share images as well, and the code is identical to other media: let items = You can combine items together just by extending the array: let items: = Sharing images ![]() For example, If you select Twitter, both of those will work great, but if you select Facebook only the URL will be shared because Facebook doesn’t allow you to pre-enter text for users. The end result varies depending on which share service the user selects. Apple also mandates retina images at 2x and 3x resolution while Android requires support for 4x (xxxhdpi), 3x (xxhdpi), 2x. For instance, iOS requires over 25 app icons, ranging in size from 16x16 to 1024x1024. Let ac = UIActivityViewController(activityItems: items, applicationActivities: nil)Īnd you share URLs like this: let items = Use this Hotpot service to generate icons and images for iOS, macOS, Android, Chrome, Windows, and other platforms. For example, you share text like this: let items = Let’s start with the basics: UIActivityViewController is the easiest way to let users share content like text and URLs. Sponsor Hacking with Swift and reach the world's largest Swift community! Sharing basic content With RevenueCat Paywalls you can customize native, remotely configurable paywall templates and optimize them with Experiments. SPONSORED Build, deploy, and test paywalls to find what helps your app convert the most subscribers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |