I am creating an App in which I have to declare some constant as global. in Obj C I could use pch file but I don't know how to define in Swift? For Example
in Obj C .pch file if I declare
then it works through out application.
All you need to do is create a Constants.swift
(or what ever you want to name it) file and then add what ever constants you need into it.
let myVariable = "Some Value"
let myOtherVariable = "Something Else"
They will then be available throughout your application.