Posts

Showing posts from July, 2021

xcode error multiple commands produce core data

Image
 Solution: If you started with coredata and created models after that if run the app it shows an error like below. "xcode error multiple commands produce core data of your coredataClass"  Then you need to configure the coredata as like below image. Select your entity and click the last option in the right side menu as like above and click module default it selected class definition.You have to change it to manual/none. After that delete your coredata classes you created and create it again.It will solve your problem.

Alertbox function for common utils iOS swift || Alertbox custom function in common

 Solution: You can use the below function to show alert as a single function you can call wherever you want. Also must to be implement the extension of the application.      func showAlert(msg: NSString ,controller: UIViewController ) {         if let topController = UIApplication . topViewController () {             if ! (topController is UIAlertController ) {                 let alert = UIAlertController (title: "Apptitle"   as String , message: msg as String , preferredStyle: . alert )                 alert. addAction ( UIAlertAction (title: "OK" , style: . default , handler: nil ))                 topController. present (alert, animated: true , completion: nil )             }         }     } Use the extension of the applica...