Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    How to run RAG projects for better data analytics results

    October 13, 2025

    MacBook Air deal: Save 10% Apple’s slim M4 notebook

    October 13, 2025

    Part 1 – Energy as the Ultimate Bottleneck

    October 13, 2025
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»Custom working directory in Xcode
    iOS Development

    Custom working directory in Xcode

    big tee tech hubBy big tee tech hubMarch 17, 2025013 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    Custom working directory in Xcode
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    Learn how to set a custom working directory in Xcode to solve one of the most common beginner issue when using Vapor.

    What is a custom working directory?

    When you try to build and run your Vapor application using Xcode you might face the issue that there are some missing files, resources or Leaf templates. Don’t worry this is a very common rookie mistake, but what causes this problem exactly? 🤔

    Vapor is using a place called working directory to set the current environment, locate common resources and publicly available files. This working directory usually contains a Resources folder where you can put your Leaf templates and a Public folder which is used by the FileMiddleware. The server is also trying to search for possible dotenv files to configure environmental variables.

    If you run your backend application without explicitly setting a custom working directory, you should see a warning message in Xcode’s console. If you are using Feather CMS, the app will crash without a custom working directory set, because it is required to provide a working environment. 🙃

    Custom working directory in Xcode

    If you don’t specify this custom work dir, Xcode will try to look for the resources under a random, but uniquely created place somewhere under the DerivedData directory.

    This is the internal build folder for the IDE, it usually creates lots of other “garbage” files into the ~/Library/Developer/Xcode/DerivedData directory. In 99% of the cases you can safely delete its contents if you want to perform a 100% clean build. 👍

    How to set a custom working directory?

    First of all, open your project in Xcode by double clicking the Package.swift manifest file.

    WARN: Do NOT use the swift package generate-xcodeproj command to generate a project file!!! This is a deprecated Swift Package Manager command, and it’s going to be removed soon.

    ✅ I repeat: always open SPM projects through the Package.swift file.

    Target

    Wait until the IDE loads the required Swift packages. After the dependencies are loaded, click on the target next to the stop button. The executable target is marked with a little terminal-like icon. 💡

    Edit scheme

    Select the “Edit Scheme…” option from the available menu items, this should open a new modal window on top of Xcode.

    Custom working directory

    Make sure that the Run configuration is selected on the left side of the pane. Click on the “Options” tab, and then look for the “Working directory” settings. Check the “Use custom working directory:” toggle, this will enable the input field underneath, then finally click on the little folder icon on the top right side (of the input field) and look for your desired directory using the interface. 🔍

    Press the “Choose” button when you are ready. You should see the path of your choice written inside the text field. Make sure that you’ve selected the right location. Now you can click the “Close” button on the bottom right corner, then you can try to start your server by clicking the run button (play icon or you can press the CMD+R shortcut to run the app). ▶️

    If you did everything right, your Vapor server application should use the custom working directory, you can confirm this by checking the logs in Xcode. The previously mentioned warning should disappear and your backend should be able to load all the necessary resources without further issues. I hope this little guide will help you to avoid this common mistake when using Vapor. 🙏



    Source link

    Custom directory working Xcode
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    ios – Apple mapkit route function dose not works in China

    October 12, 2025

    swift – Does UIDevice.current.identifierForVendor change after iCloud backup and restore on another iOS device?

    October 11, 2025

    uitabbarcontroller – How to add custom UIView to floating UITabBarItem in iOS 26 Liquid Glass UITabBar

    October 10, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    How to run RAG projects for better data analytics results

    October 13, 2025

    MacBook Air deal: Save 10% Apple’s slim M4 notebook

    October 13, 2025

    Part 1 – Energy as the Ultimate Bottleneck

    October 13, 2025

    From Static Products to Dynamic Systems

    October 13, 2025
    Advertisement
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    How to run RAG projects for better data analytics results

    October 13, 2025

    MacBook Air deal: Save 10% Apple’s slim M4 notebook

    October 13, 2025

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2025 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.