Questions tagged [swift5]

Use this tag only for questions directly related to changes in version 5 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 5 is a version of the Swift language developed by Apple and was released March 26th, 2019 with Xcode 10.2. The language is open source and available on GitHub (see ).

Swift 5 follows and .

Swift 5 Release Notes for Xcode 10.2.

3158 questions
0
votes
0 answers

ios project shows errors after installing SkeletonView package

As soon as I add SkeletonView package with package Manager, xcode started showing these crazy errors. I installed 1.9.0 version of SkeletonView (selected exact version on package manager) what should I do now?
Manu
  • 29
  • 1
  • 9
0
votes
1 answer

screen freezes if using modalPresentationStyle = .overCurrentContext swift 5

I am presenting a navigation controller with modalPresentationStyle as overCurrentContext. After dismissing controller screen freezes. I am presenting a FirstViewController with NAvigationController. let firstVC =…
Asif Raza
  • 836
  • 12
  • 29
0
votes
1 answer

Cannot convert value of type 'Type' to expected argument type '(Type) throws -> Bool'

I have an issue while using filter method to compare two arrays. I don't get the same issue when I perform the same filter pattern in Playground. What's wrong with my code? More details: Get users from URL and before saving I try to compare current…
chAOS
  • 11
  • 5
0
votes
0 answers

Core data unimplemented SQL generation

I am using Xcode 13.4.1 and Swift 5. I have a searchBar delegate in which I am trying to search for the string inside the searchBar from a core data entity called Item. I am getting the following error: [error] error: SQLCore dispatchRequest:…
Ghazalah
  • 233
  • 2
  • 14
0
votes
0 answers

How to check a string is a decimal or not in Swift

I have tried code below. My expectation is isDecimal("56.0") should return true. And isDecimal("56") should return false, also isDecimal(".") should return false but the function is returning true always. Please anyone help in this issue. func…
adil Raza
  • 1
  • 1
0
votes
1 answer

How to unlock Orientation Lock SwiftUI

Environment: SwiftUI with Swift 5.5, Xcode 13 For my app, I need it to lock into certain orientations and then to unlock from that orientation. For a while it was working fine following ideas from this Stack Overflow answer. Currently though, once I…
trevash
  • 39
  • 6
0
votes
1 answer

How to change primary audio output of AVAudioSession in swift

I am facing an issue with the audio output device in swift. In my app, connected to Bluetooth audio device. It has a voice call feature using agora. When a call is completed the output audio device is changed to the phone speaker, but Bluetooth is…
0
votes
1 answer

Keyboard (numpad) toolbar working but not showing

I tried to add a toolbar for my UITextFiled, the keyboard is set to numpad. It is working but the button is not showing. I created an extension for my UITextfield extension UITextField { /// Adding a done button on the keyboard func…
SadDeveloper
  • 107
  • 7
0
votes
1 answer

How to check CAShapeLayer is visible on screen or not - Swift?

I want to check if CAShapeLayer is visible on screen or not. Does anybody now how to do?
shraddha11
  • 783
  • 4
  • 17
0
votes
1 answer

Your Podfile requires that the plugin `cocoapods-keys` be installed in mac M1 chip

I'm getting an error while trying to install the pods. I'm using a Mac with M1 chip and BigSir OS. xCode 13.2.1. Ruby 2.6.3p62 Brew 3.5.5 [!] Your Podfile requires that the plugin cocoapods-keys be installed. Please install it and try…
KZoNE
  • 1,249
  • 1
  • 16
  • 27
0
votes
0 answers

error: no such module 'Solana' in build archive section ( GitHub CICD )

I am using Solana Swift Package Dependency in my project and created the custom classes to use the features, imported the Solana module in those classes. But while running the CICD work flow ( GitHub actions ) in the build archive option getting the…
Nikunj5294
  • 391
  • 3
  • 14
0
votes
1 answer

SDKs vs APIs - which is safer to implement related to data protection and how can I implement an SDK in the 'safest' way possible?

If I want to use a third party SDK or API in my iOS Application - and I want to avoid giving the companies that distribute and offer these SDKs & APIs 'too' much data, if you will, what is the best way to approach integrating their technology - an…
0
votes
1 answer

When @ in String show list of users like Facebook - Swift

I am trying to fetch a list of users in a TableView, when my string contains "@". Only problem is, it keeps on observing users once the @ is in the text and doesn't stop, even when I have already selected a user and added that name to the text.. any…
JuFa512
  • 119
  • 7
0
votes
0 answers

Swift5 and CoreData: Sorting fetchRequest by related Entity-Attributes

Even if I run the risk of asking a question twice and I'm too blind to see: How can I sort a FetchRequest by an Attribute of an related Entity. In my special case, I've got three tables: Client <-> ClientToContacts <-> Contacts. In a List View I…
mihema
  • 158
  • 1
  • 10
0
votes
2 answers

How to use instance of API from Main View in Container View?

If i create an instance of mapView in MainView, how can i use that instance in Container View? class MainView: UIViewController { var mapView = MapView() } class ContainerView: UIViewController { …
The Tissot
  • 80
  • 1
  • 9