Reputation: 1044
When I try to create simulator build, it will show this error:
Admins-Mac-mini:~ admin$ ditto -ck --sequesterRsrc --keepParent `ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1` /Users/admin/Documents/Projects/bam.zip
**ditto: Can't archive multiple sources**
**Usage: ditto [ <options> ] src [ ... src ] dst**
Admins-Mac-mini:~ admin$
How can I resolve it?
Upvotes: 7
Views: 2120
Reputation: 13600
Solution 1:
if you directory name has space(s) then command will not work. don't forget to add escape character before space. I have note-down whole command which has destination directory name(untitled folder) with space character.
ditto -ck --sequesterRsrc --keepParent `ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1` /Users/imediaimac/Desktop/untitled\ folder/test.zip
given command works properly without any problem.
Solution 2:
For more details visit Facebook official documentation here.
Upvotes: 14
Reputation: 379
This has solved same issue. Remove whitespace/space from .app name
ditto -ck --sequesterRsrc --keepParent ls -1 -d -t /Users/company/Desktop/Build/appname.app | head -n 1
/Users/company/Desktop/Build/appname.zip
Upvotes: 0