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

I am trying to Handling user authentication state changes and assign root view controller not working?

I am trying to Handling user authentication state changes in Appdelegate.swift and assign the root view controller but it isn't work Note: already print the user Any help please NotificationCenter.default.addObserver(forName:…
0
votes
3 answers

How to create extension for a generic structure that will be available only for Optional generic parameters in Swift 4.1?

I have the following structure in my iOS application: struct MyStruct { var property1: T var property2: T init(property1: T, property2: T) { self.property1 = property1 self.property2 = property2 } …
Roman Podymov
  • 4,168
  • 4
  • 30
  • 57
0
votes
0 answers

I'm getting some of these prints in my console while running my application from Xcode 9.4 in my iPhone 7,8 with iOS 10,11

the 'GoogleMaps' pods are all updated so where is this bug still shows the Error is : CoreData: Failed to load optimized model at path…
ronit
  • 37
  • 12
0
votes
1 answer

Getting Error: Missing com.apple.developer.healthkit entilement

I have created an ios app that uses healthkit functionality to get health-related data to my ios app. Well, my app works well in the simulator and also on iPhone device. But when I create an IPA file of ios app, run on iPhone device, it shows error…
0
votes
2 answers

Private variables value is resting in CustomView in ios swift

I am trying to create a customView using xib below is the code import UIKit class CustomView: UIView { @IBOutlet var CustomView: UIView! private var _isSelecteda:Bool! var isSelecteda: Bool { get { return _isSelecteda } set…
vinbhai4u
  • 1,329
  • 3
  • 19
  • 36
0
votes
1 answer

How to create an instance variable that is shared across multiple operations

I'm making a UITableView which display image created from processed data. This processing task is too heavy, I decide to declare an array type instance variable of UITableView class and create an operation per one processing task. Because Every…
snark
  • 11
  • 4
0
votes
2 answers

How to navigate through button programmatically

I have created a table view cell in story board and i created a cocoa touch class for it.In that it will have one button, so here i want to navigate to another view controller on clicking on the button programmatically. This my code @IBOutlet weak…
0
votes
1 answer

How can I define an array to accept ordered pairs in a struct?

import Foundation struct locus { var x: Int var y: Int } let aerodrome: [locus] = [(1,1), (2,2)] produces error "Cannot convert value of type '(Int, Int)' to expected element type 'locus'" I love that the compiler accepts…
EarthDemon
  • 13
  • 6
0
votes
1 answer

UIDocumentPickerViewController allows selecting a file the first time the app is run, but not subsequently

My app, when run, creates a json document (using a UIDocument subclass) in its document directory. And then, when opening up the UIDocumentPickerViewController to select a file, if the app has written a new file, the behaviour is as…
0
votes
0 answers

NSAlert keyboard event propagation

I wrote an app using Xcode 9.4 and Swift 4.1 for Mac OS X High Sierra. It has a custom NSView and a custom NSViewController. The custom NSView class has override functions defined for handling keyboard events (keyUp and keyDown). (It also has an…
user2132980
  • 195
  • 2
  • 10
0
votes
1 answer

Build error in FBSDKLoginButton.m file after updating FacebookLogin Cocoapods

I just updated my FacebookCore and FacebookLogin Cocoapods, am using XCode 9.4.1, and Swift 4.1, and I'm now getting a build error in my FBSDKLoginButton.m file. I tried updating and installing all pods again, without any dependency issues. But I…
0
votes
1 answer

Search filter is not updating in collection view.When i type a value A its Assets showing after another value is typed in search

//When i click a letter for example A ,its data is coming from server but not filling in collection view.When i click letter S ,A value assets are filling in collection view.AS value is showing when ever i remove A from AS value. // @objc var…
0
votes
1 answer

Best way to fire a function when current time reaches a specific time

Hey I want to change my Application's mode from Day to Night when the device's clock hits 6 pm and change it again when clocks hits 6 am. Right now I am using Timer every second to check the time and fire my functions. But I feel it's not the best…
0
votes
1 answer

after adding certificate to xcode project

dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /var/containers/Bundle/Application/E38072A3-CFE2-4E44-86F8-D7C817114210/ZeusTheme.app/ZeusTheme Reason: no suitable image found. Did find: …
sudheerrrr
  • 11
  • 4
0
votes
1 answer

How do I append values to a dictionary from another viewcontroller in a macos application?

I am recently working on an application which contains data stored in a dictionary. This data is then stored in a table which the user can view. This is how the data is stored: Bill(Date: "4/28/18", Item: "something", Amount: 43.67) I want to append…