Questions tagged [swift4.1]

Use this tag only for questions directly related to changes in version 4.1 of Apple's Swift programming language. Use the tag [swift] for more general language questions, or the tags [ios], [cocoa], [apple-watch] etc. for questions about developing on Apple platforms.

Swift 4.1 contains updates to the core language, including more support for generics, new build options, as well as minor enhancements to Swift Package Manager and Foundation. There was also significant progress made in stabilizing the ABI.

Swift 4 is the fourth version of the Swift language developed by Apple that was released in 2017. The language is open source and available on Github (see ).

The development of Swift 4 and its goals can be viewed on the Swift Programming Language Evolution repository on GitHub

229 questions
1
vote
1 answer

RxSwift how to have two Observables be bound for completion together?

I have two Observables and I want them both to terminate with completion event when either of them is completed. They both branch from the same sequence, but have different termination condition: .filter.take(1) .distinctUntilChanged.take(2) How…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
1
vote
2 answers

Import framework vs module

Was wondering: if I'm using only CLLocationManager is there any significant win/pro for: import CoreLocation.CLLocationManager over: import CoreLocation ?
raistlin
  • 4,298
  • 5
  • 32
  • 46
1
vote
2 answers

Fetch request not working in Swift 4.1

I have a predicate that is a Bool set to false (mostly). It stopped working correctly in Swift 4.1 when I upgraded yesterday. The predicate is: requestData.predicate = NSPredicate(format: "delete == %@", false as CVarArg); How do I check if this…
cdub
  • 24,555
  • 57
  • 174
  • 303
1
vote
1 answer

How to add tiles layer on map using MapBox in Swift (iOS mobile app)

I want to set WMS tiles layer on the map using MapBox in my iPhone app. Note: I am able to add tiles layer at Google Map using provided methods at https://developers.google.com/maps/documentation/ios-sdk/tiles. Now I am trying to add WMS tiles layer…
Asif Raza
  • 836
  • 12
  • 29
1
vote
1 answer

swift 4 xcode Version 9.4.1 -dyld: Library not loaded: @rpath/libswiftCore.dylib euror

I am not able to install app on any device... iOS iPhones and iPad. Simulator is working fine. this is the only error I get. I tried everything given on internet.
1
vote
1 answer

Swift 4.1 Encodable/Decodable Nested Array AND Dictionary

Need more help with json, any suggestions on how to lay this out? Should players_loop be added in where I put it, etc... been going in circles for awhile. struct: struct LMSRequest: Decodable { let id : Int let method : String …
Scott Kramer
  • 1,711
  • 3
  • 24
  • 37
1
vote
4 answers

Extracting data from dictionary in swift 4

I am using this api and want to print the api data on table view import UIKit import Alamofire class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! …
viper
  • 141
  • 1
  • 3
  • 16
1
vote
1 answer

Swift 4.1 Codable/Decodable Nested Array

Need some help with more complicated json, with the newest swift4.1 encoder/decoder: struct: struct LMSRequest: Decodable { let id : Int? let method : String? let params : [String]? enum CodingKeys: String, CodingKey { case id = "id" case…
Scott Kramer
  • 1,711
  • 3
  • 24
  • 37
1
vote
3 answers

Swift - Custom cell width and height for textlabel and detailTextLabel

I wanna manage the long text in textlabel and detailtextlabel for the cells in UITableview because if the textlabel has a long text the detailedtextlabel truncate with "..." and viceversa. Here's the problem: So I wanna know if there's a way to…
Daniel Campos
  • 55
  • 1
  • 14
1
vote
0 answers

Swift command line linking fails with "duplicate symbols" error

I am referencing some C projects in my Package.swift. Recently I have added a project that references other C projects in its own Package.swift file, and while those C projects are different from my referenced projects, they contain same-name object…
Tyress
  • 3,573
  • 2
  • 22
  • 45
1
vote
1 answer

Xcode does not autocompletes any of the Alamofire method

After integrating Alamofire through CocoaPods and importing into my viewconroller.swift, I try to write a method. But Xcode 9.4 does not autocompletes any method.
DevilAyan
  • 31
  • 5
1
vote
0 answers

What is matter with ".addingPercentEncoding" in Swift 4.1?

I just want to make URL with string, and some words contain special character which URL could not parse it ? I use .addingPercentEncoding to encode them, but it give different result. When the string not contain the character such as "é", it will…
A.C
  • 191
  • 1
  • 2
  • 10
1
vote
1 answer

get Data from alamofire (responseString)

I am retrieving the data with this code Alamofire.request(urlString, method: .post, parameters: parameters,encoding: JSONEncoding.default, headers: headers) .responseString() { response in switch response.result { …
Kaveh Naseri
  • 1,102
  • 2
  • 15
  • 24
1
vote
1 answer

CryptoSwift: unresolved identifier 'GCM'

xcode version: 9.3.1 (9E145) Swift version: 4.1 I have just downloaded the latest master copy and installed CryptoSwift using CocoaPods. Using the example given on the README: do { // In combined mode, the authentication tag is directly appended…
1
vote
1 answer

How can I add Multiple Markers on google map using json and swift 4.1?

Multiple marker doesn't show on google map using swift 4.1 i am connect JSON and result show on console but how can I connect with latitude and longitude with Google maps. let jsonUrl = URL(string:…
Rehan Meo
  • 61
  • 2
  • 9