Go Back

Xcode 10 – 5 Issues Every iOS Developers Need To Explore

xcode 10 issues
Posted by
Technostacks
Dec 31 2018

The newly released Xcode build the system with Xcode 9 by Apple is in the preview mode. The advanced features were not active during that time. The activated Xcode 10 features by default have some issues in the iOS projects since Apple is aware of these, they have separately issued new build system. They have also mentioned possible solutions to tackle those issues.

We are here to highlight the top 5 issues iOS developers might face and they might not be covered in the recent release notes, e.g. Xcode 10 system requirements and the system behaviour of new build with third-party tools.

Xcode 10 Features: The Newly Build System

You can now activate new build settings from Xcode Files-> Project/Workspace Settings with this toggling between legacy and new build system becomes easy. Additionally, if you are building an iOS project right from the command line using the Xcode build then it is required to pass additional parameter such as UseModernBuildSystem=YES.
The latest build system is called as the xcbuild. The new build system elevates the overall swift build by running the targets and its build phases side by side. Once it is activated you will face both its benefits and issues in regard to the new build system in your project. Here we will try to identify the issue and get solutions immediately.

  1. The Info.Plist

    When an iOS project is built using the new build system you will face several issues regarding the info.plist files. Here are the few things you need to keep in mind regarding New Build System and info-plist files.

    • Make sure there is no duplicate plist file in the copy bundle resources in the build phase of any target. Otherwise you will not be able to create an app with the new build system. Additionally, the files copied multiple times will hamper the functioning.
    • The new build system functions on various precedence of running info-plist step within the clean and incremental builds. In the clean build, you will find that the info.plist steps after processing assets, whereas the incremental build runs before signing.
    • If there only info.plist value and does not have the Xcode reference folders then you will face an Xcode build system failure.
  2. The CocoaPods

    CocoaPods bring some issues for the iOS projects.

    • With CocoaPods development pods will not be updated unless a clean build is performed. The embedded pods are not executed successfully.
    • Some of the Cocoapods build phase script doesn’t run reliably as you may see disbursement in its behaviour and you might not be able to archive the app.

    Hence, this makes it clear that cocoapods and the new build system don’t get along well together.

  3. Running the Script Phase

    The new build system is full of flaws with the Run Script Phase started giving false results. But this too comes with a good reason.
    The new Xcode 10 features have a lot of improvement in the Run Script Phase. However, it requires you to help build processes with the help of feeding files for the run script phase. You will have to specify the input files to the run script phase, this is important to determine whether the script needs to be run or not.
    If Xcode build system runs parallel commands then the input for the run script phase will not be generated, this fails the build system as it gets confused. However, providing the input files to run scripts is advisable as when the inputs grow in number it gives a way to specify all the input files in the .xcfilelist format. Hence it is recommended to add the files to avoid running this phase for all the other incremental builds whenever it is not required.

  4. Clean Build Folder Action

    With the new build system, a clean build folder has been introduced. This introduction eliminates all the derived data of the iOS application causing the cleaner builds right from scratch. This step means if you are using cocoapods all the frameworks will be rebuilt from the scratch and you will face a delay in developing an iOS project. There may be Xcode indexing issues as well.
    The new build system by Apple is introduced to improve the performance, reliability, and stability of the Swift build. This system is designed to capture the configuration errors early in the application development phase. In Xcode 10 mascos version so you don’t have a choice and you will have to update the build process to adapt to the new build system. This scenario demands a lot of configuration enhancements in the app.

  5. XCCONFIG Files

    There are a number of iOS developers might be using .xcconfig files to keep the Xcode build settings at one place for the appropriate goals. There are some queries that conditional variable assignment in the xcconfig files might not work as wanted, because of the build failures. To ensure your xcconfig files, Apple suggested running following command.

    defaults write com.apple.dt.XCBuild EnableCompatibilityWarningsForXCBuildTransition -bool YES

    If this command displays any errors or warnings, we must have to solve it to get stable builds.

Moving Forward

The recent Xcode 10 release date was September 17, 2018. Let us know have you tried the Xcode code dark mode yet or migrated to the new build system? If yes, what are your experiences? If you wish to share your views or get an issue resolved, get in touch with us without any hesitation.

X