iOS Development

ios – SideMenuSwift ViewControllers are nil after cloning mission from a repo

Spread the love

I have to get an iOS app working in xcode on my machine from a web-based repo. Simply to notice, I’ve virtually 0 expertise with iOS growth so I may be going about a few of these steps fallacious. My first steps had been cloning the repo, working pod set up after which opening the project_name.xcworkspace file. The app is utilizing about 20 or so pods, and one in every of them known as SideMenuSwift. Once I construct and cargo the mission, the construct will get hung up on this error:

SideMenuSwift/SideMenuController.swift:172: Deadly error: [SideMenuSwift] `menuViewController` or `contentViewController` shouldn't be nil.

Going by way of the code, this error happens within the controller of the SideMenuSwift pod file, proper right here:

open override func viewDidLoad(){
    // stuff
    if isContentOrMenuNotInitialized{
        fatalError("[SideMenuSwift] `menuViewController` or `contentViewController` shouldn't be nil.") // <- error
    // extra stuff

There are two different errors that happen as a result of menuViewController and contentViewController are nil, and so they happen within the FeedbackViewController and HomepageViewController recordsdata in the identical manor.

override func viewDidLoad() {
    tremendous.viewDidLoad() // <- error
    // stuff

I’ve entry to the laptop computer that the app was created on and I’m able to view the file construction of each initiatives facet by facet and the one distinction, is that some folders on the developer’s laptop computer comprise a DS_STORE file. I do not assume that this ought to be an issue however I’m not certain. The truth that the code is identical in each areas makes me assume that this may be one thing greater than a problem with this package deal, it might need been how I cloned and setup the app.

What I’ve tried:

  1. made certain that I’ve the identical model of all of the pod recordsdata, cocoapods, swift and xcode because the developer’s laptop computer.

  2. made certain that I’m on the identical department and on the identical commit because the working model on the developer’s laptop computer

  3. checked the .gitignore and made certain that every one the recordsdata in my listing are the identical as within the developer’s listing.

  4. adopted the docs, added the operate beneath to initialize the ViewControllers in my SceneDelegate.swift file, and located the suitable view controllers for menuViewController and contentViewController

    import UIKit
    import SideMenuSwift
    class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        var window: UIWindow?
        @objc func applicationDidFinishLaunching(_ software: UIApplication) {
                let contentViewController = HomePageViewController()
                let menuViewController = FeedbackViewController()
                window = UIWindow(body: UIScreen.major.bounds)
                window?.rootViewController = SideMenuController(contentViewController: contentViewController,
                menuViewController: menuViewController)
                return true
        // Different stuff
  5. loaded an older commit in xcode

  6. constructed the app for iPhone 14, iPhone 15 and iPad (tenth technology)

Leave a Reply

Your email address will not be published. Required fields are marked *