When you use gyro with this command line : gyro -m .../Models/DataModel.xcdatamodeld, it fails with error :
! Unable to find contents of xcdatamodel
/Users/steven_watremez/workspace/tools/gyro/lib/gyro/log.rb:42:in `fail!': Unable to find contents of xcdatamodel (RuntimeError)
from /Users/steven_watremez/workspace/tools/gyro/lib/gyro/parser/xcdatamodel/xcdatamodel.rb:38:in `initialize'
from bin/gyro:123:in `new'
from bin/gyro:123:in `<main>'
This is because gyro expects an .xcdatamodel (to look at the contents XML file inside it) and not an .xcdatamodeld. But the error is not very friendly.
A solution to avoid this error would be to raise a specific error like : please target an xcdatamodel inside your xcdatamodeld
💡 In addition for user that use an xcdatamodel which happens to be inside an xcdatamodeld bundle, gyro could raise a warning like: you use an xcdatamodeld, please be sure you target the correct version of your xcdatamodel. Actual version using by gyro is : MyDataModel-V2.xcdatamodel so that people don't forget about updating the command line when they create a new datamodel version
When you use gyro with this command line :
gyro -m .../Models/DataModel.xcdatamodeld
, it fails with error :This is because
gyro
expects an.xcdatamodel
(to look at thecontents
XML file inside it) and not an.xcdatamodeld
. But the error is not very friendly.A solution to avoid this error would be to raise a specific error like :
please target an xcdatamodel inside your xcdatamodeld
💡 In addition for user that use an
xcdatamodel
which happens to be inside anxcdatamodeld
bundle, gyro could raise a warning like:you use an xcdatamodeld, please be sure you target the correct version of your xcdatamodel. Actual version using by gyro is : MyDataModel-V2.xcdatamodel
so that people don't forget about updating the command line when they create a new datamodel version