Solution Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly Go to Build Setting Swift Language Version Choose Swift 3
Solution This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data. info.plist <key>NSContactsUsageDescription</key> <string>$(PRODUCT_NAME) contacts use.</string>
https://developer.apple.com/ Click on Account Click on Certificates, Identifiers & Provisioning Profile For Certificate Go to Certificates > All add iOS Certificate Select Development > iOS App Development Click Continue Go to Keychain Access Application Go to Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority Fill information Require is: […]
import SwiftyJSON let store = CNContactStore() store.requestAccess(for: .contacts, completionHandler: { granted, error in guard granted else { let alert = UIAlertController(title: “Can’t […]
Utility.swift import UIKit import SystemConfiguration class Utility: NSObject { class func isConnectedToNetwork() -> Bool { var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) […]
Create datamodel with SwiftyJSONAccelerator tool Download SwiftyJSONAccelerator Download Generate DataModel Tool – SwiftyJSONAccelerator
ViewController.swift import UIKit class ViewController: UIViewController { var xibView: UIView? override func viewDidLoad() { super.viewDidLoad() print(“usa”) xibView = ViewTemp.instanceFromNibForViewTemp() xibView?.frame = CGRect(x: 0, y: 0, width: 300, height: 500) xibView?.autoresizingMask = […]
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { //1. Setup the CATransform3D structure var rotation = CATransform3D() rotation = CATransform3DMakeRotation((90.0 * .pi) / 180, 0.0, 0.7, 0.4) rotation.m34 = 1.0 / -600 […]
TutorialViewController.swift import UIKit class TutorialViewController: UIViewController { @IBOutlet weak var pageControl: UIPageControl! @IBOutlet weak var containerView: UIView! var tutorialPageViewController: TutorialPageViewController? { didSet { tutorialPageViewController?.tutorialDelegate = self } } […]
ViewController.swift import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var arrayTableViewData = [String]() var tableViewSortBy: UITableView = UITableView() var popover: DXPopover = DXPopover() override func viewDidLoad() { super.viewDidLoad() self.arrayTableViewData.append(“USA1”) self.arrayTableViewData.append(“USA2”) self.arrayTableViewData.append(“USA3”) […]