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
0 answers

How to download multiple videos at a time?

I want to download multiple videos at a time but in my case upto 3 videos downloaded properly but after that its override previous one. I am using urlSession downloadTask for running in background and save into document directory. Is there any…
iHarshad
  • 143
  • 11
1
vote
1 answer

Vapor Build Getting Failed

Iam Currently New to Vapor Swift Server side initially i have Two Queries 1) Problem Vapor build is getting Failed Error: Build failed. 2) Question While Running i getting localhost:8080/Hello this url works fine in Safari browser When comes…
batMan007
  • 551
  • 1
  • 10
  • 24
1
vote
1 answer

Using variable as lower bound for arc4random - explicit type/strideable?

) I have updated a "Workout Object" to have both a minimum and maximum number of reps. When I've been hardcoding the lower bound in a playground, I've been using : let numberOfExercises = Int(arc4random_uniform(4) + 3) When I try to use…
nc14
  • 539
  • 1
  • 8
  • 26
1
vote
1 answer

Local Realm migration not working Swift

I don't know if I'm missing something here. I got a crash after running my app without a migration block after updating a property (same problem as here Realm Migration not working) But now when I run the app, it must run the migration because it no…
nc14
  • 539
  • 1
  • 8
  • 26
1
vote
1 answer

Custom Window info on google map using swift 4.1

i am write this method for custom window info on google map in ios swift 4.1 but the window dosn't show on google map and i am also set delegates but no results func mapView(_mapView: GMSMapView, markerInfoWindow marker: GMSMarker)…
Rehan Meo
  • 61
  • 2
  • 9
1
vote
1 answer

Non-ASCII characters are not allowed outside of literals and identifiers issue in swift header file

I have added swift custom uiview class file to objective c project , Inside the view there is a textview delegate is available , So when I have added I am getting the ASCII error After SWIFT_EXTENSION I tried to replace the character inside "module…
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47
1
vote
0 answers

Calling Swift 4 generic method produce error

Given the following method to a Dictionary like class (Lets say the Table class) where the key and value are both data type that conforms to the protocol Value. Number types, String, Bool, and etc are extended to conform to the Value protocol. open…
weyhan
  • 703
  • 4
  • 15
1
vote
0 answers

Swift 4 AVcapturesession not calling captureOutput Delegate

So im trying to create class that handles a video output stream for my app and the delegate method "captureoutput" is never getting called. I set up my input devices and configured the outputs but I cannot get the delegate with the output info to…
1
vote
2 answers

How to make a customisable navigation bar title? Swift 4

I have a textfield on my firstViewController and what I want to happen is: once the user entered a text and goes to the SecondViewController it will become the navigation bar title. I'm new at programming and I was hoping someone could help me.
user9606399
1
vote
2 answers

Recursively change some keys in a Dictionary in Swift

I have a dictionary var dictionary: Any = ["det" : ["val" : "some","result" : ["key1" : "val1","key2" : "val2"],"key3" :["val1", "val2"]]] and a mapping function below func getMappedKey(_ key: String) -> String? { var mapping: Dictionary = [ …
Jayant Jaiswal
  • 171
  • 1
  • 8
1
vote
1 answer

Cannot convert value of type '(Either) -> Void' to expected argument type '(Either<[_]>) -> Void'

I am trying to use Codable with protocols to handle an API request and response. The API I am querying responds with an array of items under the key "results": { results: ["id": "1", "id": "2"] } I am therefore looking to construct a nested Codable…
Brian Marsh
  • 577
  • 2
  • 6
  • 19
1
vote
1 answer

How to make Twilio remote Video view "TVIVideoView" full screen in iOS

I am using Twilio for Video calling and its working fine but the only issue is unable to set the full screen for remote video.Below code is a way to create remote video setup by Twilio in their QuickStart Project. Xcode Version: 9.3 Swift Version:…
Asad Jamil
  • 198
  • 9
1
vote
0 answers

App terminated when trying to add child value from a variable in Firebase. Swift 4.0

Terminating app due to uncaught exception 'InvalidPathValidation', reason: '(child:) Must be a non-empty string and not contain '.' '#' '$' '[' or ']'' String was empty at first but when i press next the value from form 1 is automatically…
EpicNav
  • 11
  • 2
1
vote
2 answers

How to extract specific array in Swift 4

I want to get array value by it's key. I set the array with below code inside looping . let que = Question(questionText: "\(questionWord)", options: quizAnsArr, correctAns: correctArrIndex, wrongAns: -1, isAnswered: false) quizsArray +=…
Kawazoe Kazuke
  • 175
  • 6
  • 20
1
vote
1 answer

How I can migrate from `MGLConstantStyleValue` to `NSExpression`

I'm trying to migrate from mapbox-sdk-3.7 to mapbox-sdk-4.0. I can't understand how to convert this syntax with MGLConstantStyleValue to NSExpression. let layer = style.layer(withIdentifier: "milestones") as? MGLSymbolStyleLayer let styledValues:…
Serge Maslyakov
  • 1,410
  • 1
  • 17
  • 23