16

I recently updated my Xcode to 10. As a default, "New Build System" was enabled. When I build my project, I have noticed that my changes won't work on Simulator. When I try to debug this code, Xcode displays the correct changed source code, but the code executed is old.

When I change back to "legacy" build system, everything works fine.

Anybody with similar experience?

Thanks

This might be an issue with Cocoapods. Because I did unlocked podfile and try to edit some codes.

Göktuğ Aral
  • 1,409
  • 1
  • 13
  • 28
  • 2
    I have the exact same issue. Changes in Development Pods are not picked up in a new build unless I clean everything. fwiw There is related discussion here (no solution though at time of writing): https://groups.google.com/forum/#!topic/cocoapods/UyxOT5_GFfI – de. Sep 27 '18 at 11:07
  • 1
    I have the same issue, this is not only limited to change for pods, when I comment/uncomment one line in my code, the change won't reflect in the new build unless you do a Command+Shift+K. When I switched to 'Legacy Build System' in 'Workspace Settings', it does not have this issue at all. My environment is Xcode Version 10.0 (10A255), macOS MOjave Version 10.14(18A391) – infinity_coding7 Oct 03 '18 at 15:18
  • same issue, except the change which is not being picked up is in a non-pod subproject. actually: compile-breaking changes are picked up just fine: there's a compilation failure. but non-breaking changes are ignored. lol! – orion elenzil Oct 04 '18 at 19:23
  • 1
    The bug is present for so long now and still no solution :/ – fluidsonic Oct 12 '18 at 13:38
  • 1
    still getting this in xcode 10.1 – orion elenzil Jan 10 '19 at 00:03

2 Answers2

1

In Xcode 10 new build system is made as default. You will face the problem with your project after updating Xcode 10. Apple was aware of these issues and they mentioned this in Xcode 10 release notes.

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10

  • When performing xcodebuild clean on a project that uses a customized build location outside the derived data directory, and that has older build products produced prior to Xcode 10, Xcode might report an error indicating that it won't delete directories not created by the new build system. (40427159)

    Workaround: Delete the build folder manually.


For reference, here's the full Known Issues section; the clean failure is last:

Known Issues:

  • Incremental builds may fail to codesign properly for non-source related changes to your project, such as resource file modifications, which can result in the app failing to launch. (41254808)

    Workaround: Change a source file within the same target to trigger the codesign process, or perform a clean build.

  • After installing a Swift toolchain, Xcode won't immediately detect the toolchain. (31360319)

    Workaround: Close and reopen the workspace.

  • The new build system doesn't support On Demand Resources (ODR). If your project uses ODR, the legacy build system can be reenabled in File > Workspace/Project Settings. (31508570)

  • When build settings are defined in an xcconfig file that inherit values using $(inherited) or $(), the Build Settings editor shows the last assigned value for the setting instead of the properly composed value. (28572636)

  • Targets which have multiple asset catalogs that aren't in the same build phase may produce an error regarding a "duplicate output file". (39810274)

    Workaround: Ensure that all asset catalogs are processed by the same build phase in the target.

  • The new "Build with Timing Summary" command doesn't show timings for some tasks run within the build system during the build. (39801746)

  • Custom build system plugins—including the Intel ICC compiler—are not yet supported. (32795438, 33286594)

    Workaround: If required, switch to using the legacy build system in the File > Project/Workspace Settings sheet.

  • Targets with Copy Headers build phases ordered after Compile Sources build phases may fail to build and emit a diagnostic regarding build cycles. (39880168)

    Workaround: Arrange any Copy Headers build phases before Compile Sources build phases.

  • When performing xcodebuild clean on a project that uses a customized build location outside the derived data directory, and that has older build products produced prior to Xcode 10, Xcode might report an error indicating that it won't delete directories not created by the new build system. (40427159)

    Workaround: Delete the build folder manually.

Marc
  • 324
  • 1
  • 9
Manikandan
  • 1,195
  • 8
  • 26
0

You need to do some more extra steps to finally make it to compile successfully. (These extra steps were required even on Xcode 9.)

Xcode: File -> Workspace Settings -> Build System: Legacy Build System

Xcode: Product -> Clean

Rotate to compile thru different emulator types, such as "iPhone 8", "iPhone 8 Plus", etc. (They might fail or might not.)

Follow This step u hope you will resolve issue after follow this step

Vishal Parmar
  • 615
  • 4
  • 31