Top "Swift3" questions

Use this tag only for questions directly related to changes in version 3 of Apple's Swift programming language.

Detect if the application in background or foreground in swift

is there any way to know the state of my application if it is in background mode or in foreground . …

ios iphone swift swift3 lifecycle
Getting local notifications to show while app is in foreground Swift 3

Apparently this is now possible with ios10 : optional func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: (UNNotificationPresentationOptions) -> …

ios swift swift3 uilocalnotification unusernotificationcenter
Check internet connection (iOS 10)

For iOS 9 I was using Reachability public class to check wether the device is connected to the internet or not. …

swift3 ios10 internet-connection
Command Line Tool - Error - xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

I am getting this error while building the SwiftJSON framework to the Some Xcode project through Carthage Dependency Manager. Sivaramaiahs-Mac-mini:…

command-line installation swift3 gzip carthage
How to get first four letters from string in Swift 3?

I am trying to do IFSCCode validation in swift, but the problem I'm facing is I am not able to …

swift3
Hide the status bar in ios 9

How do you hide the status bar in ios 9? This is now deprecated: [UIApplication sharedApplication] setStatusBarHidden:YES];

ios objective-c swift swift3 statusbar
Sending an email from swift 3

I am trying to set up an app with send email option. I have this code: import Foundation import MessageUI …

ios swift iphone swift3 messageui
Updating closures to Swift 3 - @escaping

I've updated my code to Xcode 8.0 beta 6 but I got stuck with what seems to be about the new non …

xcode escaping closures swift3
Difficulties converting to Swift 3

After converting from Swift 2 to Swift 3 (even after converting edit-> convert -> to current swift syntax) I am …

swift swift3 xcode8 ios10
Add Local Notification in iOS 10 - Swift 3

So I been trying to add a notification to the new UNUserNotificationCenter, but I don't seem to get it. My …

swift swift3 uilocalnotification ios10 unusernotificationcenter