nsurl

    -2热度

    1回答

    如何保存照片?在迅速 哪种方式更好? @IBAction func savePhoto(_ sender: Any) { let imageData = UIImagePNGRepresentation(myImg.image!) let compresedImage = UIImage(data: imageData!) UIImageWriteToSaved

    0热度

    1回答

    开始时,我们有它获取对的Mac 10.6 SDK构建的遗留应用程序。我们正在使用的NSURLMutableRequest和NSURLConnection进行网络通话。使用Wireshark,我注意到在10.9 - 10.11.2上所有这些调用都是在TLSv1上进行的。在10.11.6起(也10.13测试版)这些获得由上TLSv1.2工作。 我更改了代码以强制TLSv1.2使用CFURLReques

    1热度

    3回答

    嗨,下面的代码可以从网络服务器上下载图片。该请求是HTTP如此不安全。 DispatchQueue.global(qos: .userInitiated).async { var productImage = Utilities.GetEmptyImageBottle() if (entry.ImageName != nil || entry.ImageUrl != nil

    0热度

    2回答

    我有以下URL file:///Users/ivancantarino/Library/Developer/CoreSimulator/Devices/CCE2FCA5-05F0-4BB7-9A25-CBC168398A62/data/Containers/Data/Application/E48179F9-84FB-4CB3-B993-1E33FCFB5083/Library/Caches/Cl

    0热度

    1回答

    我使用NSURL会话来获取特定网站的HTML代码。下面的代码对于iOS(在ViewController.swift中)工作得很好,但在watchOS(在InterfaceController.swift中)总是失败。代码总是打印else语句:print(“apple watch:error with loading nsurlsession”)。 有人可以解释我(为什么它失败了)我怎么能改变这个?

    -1热度

    1回答

    当我将字符串转换为NSURL时,我得到了一些东西。 我的代码编号... NSString *urlString = [[NSString alloc]initWithFormat:@"http://host name/index.php?id=%@&mob=%@&name=%@&mail=%@&m=23", self.deviceId, self.pnumber, self.name, self.

    1热度

    1回答

    我是Swift新手, 我想从服务器响应中获取纬度和longitde的值。 我该如何获得价值? 这里是我的代码: WebServiceHelper.sharedInstance.makeWebServiceCall(urlAddress: "http://jsonplaceholder.typicode.com/users/1", requestMethod: "GET", params: ["Ke

    1热度

    3回答

    我有URL在AppDelegate方法。 func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { } 网址看起来www.wesite.com/shareplace.html?placeid=123 我的问题是如何将

    0热度

    2回答

    我在将NSString转换为NSUrl时出现了一个奇怪的问题。其实我有一个方法,它将NSString作为参数,然后将其转换为NSUrl,然后使用该URL来下载文件。 当我通过传递url作为字符串通过我的代码调用此方法时,下面一行返回nil。 NSURL *url = [NSURL URLWithString:urlString]; 但是,当我硬编码相同的方法中的字符串,然后我的字符串转换为NS

    0热度

    3回答

    我有一个macOS应用程序。我需要删除任何NSURL的方案和www部分。这是我想出了: // For testing purposes. NSString *blogID = @"https://www.testing1234.tumblr.com"; // Create the corrected link string. NSString *correctLink; // Conv