Home > Back-end >  iOS getting stuck at multiple commands found
iOS getting stuck at multiple commands found

Time:01-25

I am new to iOS programming and many times I get stuck at this error:

Multiple commands produce '/Users/**/Library/Developer/Xcode/DerivedData/**-abmytreyrhipzhhcspsondoytpxp/Build/Intermediates.noindex/**.build/Debug-iphoneos/**.build/Objects-normal/arm64/Models.stringsdata'

I have checked copy bundle resources no such duplicate entity found. Is there any way I can figure out which string data is duplicate and where ?

CodePudding user response:

If the error is stating that there is duplicate entities referring to same name I guess, Then to resolve them please try to search the entity name and rename it. May be some depended library is creating same file or depending on same 3rd Library.

For example you added X and Y dependancy in your pod or SPM, It may occur that it create same name file or depended on the same 3rd Library name Z.

You can also check same name files on hereenter image description here

CodePudding user response:

SO there was a swift file named: Models.swift this file has two structs like this

Models.swift  

struct AB{

}
struct bC{

}

I came from koltin background so I thought we can declare a file and keep all structs at top level, but I guess this is not possible in swift, we have to keep file name and class name same, and one file can contain only one class at top level. Please correct me if i am wrong.

  • Related