Post

Replies

Boosts

Views

Activity

Reply to XCode 14 compile errors immediately disappear or do not appear at all
Here, one more sample project can be reproduced, so please check this as well. https://github.com/gatherheart/XcodeIndexingError With this project, Xcode 14 build errors immediately disappear or do not appear at all. To reproduce the issue, please follow the steps below (based on the sample project "XcodeIndexingError"): Xcode version should be 14 or later. Add any xcframework to your project (e.g. SimpleFramework). Import the xcframework from another file (ImportFramework.swift). Switch the current build scheme to a configuration other than "Debug". Select a real device as the build target, not a simulator. Clean the build. Check that the framework from step 1 is not copied to the DerivedData > Index.noindex > Build > Products > iphoneos directory (sometimes it is copied to iphonesimulator instead). With all the previous steps satisfied, open the BuildError.swift file in Xcode and build the project. The build error appears briefly and then disappears within 5 seconds, making it difficult to identify and investigate the problem. This is the issue that needs to be addressed. Step 7 of the reproduction steps seems to be the critical part, where the framework interface specification that should be copied to iphoneos is being copied to the simulator path. But if I set the simulator as the build target, they are copied to the simulator path every time, so the problem is only on the iphoneos side. After repeated cleanup, it is copied to iphoneos (correctly right path?) on rare occasions and there is no more problem. What if I copy the interface file of the framework that was not copied from the simulator path to iphoneos? The error message is displayed normally again and does not disappear. I think this is related to the cause of the problem. Plz check this issue, and I hope this helps. Thank you.
Feb ’23
Reply to XCode 14 compile errors immediately disappear or do not appear at all
In my case, local frameworks were the problem. The product build does work, but the Xcode index builder couldn't find them. Here is the sample code. The problems were reproduced with Xcode 14.1 and 14.2. You can find the same problem with the project in the start directory. And the problem was solved with the project in the final directory by specifying the search path of the build settings. (FRAMEWORK_SEARCH_PATHS, LIBRARY_SEARCH_PATHS, and SWIFT_INCLUDE_PATHS were set) https://github.com/gatherheart/IndexingError I reported this problem via FA also. could u plz check the FA threads? (FB11997524, FB11982383)
Feb ’23