Post

Replies

Boosts

Views

Activity

Comment on UIActivityViewController warning/errors
The call works(for now) and I can airdrop etc. to another device, but warning are persistent. import UIKit class ShareFile_ViewController: UIViewController {     @IBAction func share(_ sender: Any) {         shareFile()     }     override func viewDidLoad() {             super.viewDidLoad()         }     func shareFile() {         let url = Bundle.main.url(forResource: "Skiing", withExtension: "gpx")         let activityViewController = UIActivityViewController(activityItems: [url as Any], applicationActivities: nil)        activityViewController.completionWithItemsHandler = {(activityType: UIActivity.ActivityType?, completed: Bool, returnedItems: [Any]?, error: Error?) in                if !completed {                    print("not completed")                    return                }                    print("completed")            }           present(activityViewController, animated: true) //{() -> Void in }        } } If I try to share a string it returns the same warning. let items = ["This app is my favorite"]  let ac = UIActivityViewController(activityItems: items, applicationActivities: nil)  present(ac, animated: true) Researching on Internet has some calling it a bug, but I'm not sure if it is. Thanks Also, how do I format these posts when pasted from Xcode to look presentable?
Feb ’22
Comment on unzipping files with swift
The files I am downloading are single file .zip. But haven't had any luck using the compression framework trying all types of compression_algorithm. I have found an aftermarket library to unzip for now, which unzips my downloads as a single file. These are us gov maps. They do come in zipped folders with many files, but I am parsing the folder on their site and downloading only the maps. This works good except they download as .zip and the user needs to select them to have ios unzip. I would rather be able to skip this step. Compression reports Fatal error: Error occurred during decoding: The operation couldn’t be completed. (Compression.FilterError error 1.). I haven't been able to find what error 1 is yet. Thanks
Nov ’21