iosswiftswrevealviewcontroller

In my IOS Project, when i try to remove Bridging Header file cause error?


To setup a SideMenu in my iOS project, I'm Using SWRevealViewController without pods and this create a bridging header file

SWRevealViewController.h
SWRevealViewController.m
MyProjectName-Bridging-Header.h

Now I want to remove these three files and add my custom SideMenu, but this cause a big problem I trying some solutions which I found in stackoverflow and another websites like
1. go to Target > Build Settings > Swift Compiler - General > Objective-c Bridging Header and remove its value. but this case a lot of errors.
2. retrive just this file 'MyProjectName-Bridging-Header.h' but this again cause a lot of errors.
the project does not work successfully without the three file. although i don't use these three file in any part of my project.
when I delete the three files + clean the Objective-c Bridging Header I get this error.
enter image description here


Edit: I note that after I do the deletion step the 'import UIKit' disappears from most files in the project.


Solution

  • I solve the problem by the following steps
    1- Delete these two files which caused in creating bridge file

    SWRevealViewController.h
    SWRevealViewController.m
    

    2- remove #import "SWRevealViewController.h" from Bridging file
    and add #import <UIKit/UIKit.h>

    enter image description here


    and this solve the problem for me.