Open calicoday opened 5 years ago
@astechishin, any thoughts on this ^
might be related to this: https://github.com/amirrajan/rubymotion-templates/pull/10
I wonder if we should generate a warning on the compile if this is missing? Adding a cli command to generate if missing is probably a good idea too (and could be mentioned in warning). What was issue under macOs? Funny window sizes?
Wonder if this might help someone else (sorry if it’s already noted somewhere and I missed it). Not a rubymotion thing but dev for current iOS in general, I believe. Stumbled on the answer by accident, researching a totally unrelated swift problem.
This came up for me when I was merging and rearranging a couple of projects and suddenly my views weren’t displaying the right size, though I couldn’t see anywhere I was setting them wrong. Turns out, if your app doesn’t get built with an
Assets.xcasset
, it may well run mostly fine but the screen size doesn’t get set correctly from the start. So I’d get bounds size width=320.0 height=480.0, instead of width=375.0 height=667.0 on an iPhone 6s or width=375.0 height=812.0 on an iPhone X.motion create
will generate anAssets.xcasset
directory in theresources
directory. You can move it elsewhere (for whatever project management reasons of your own), so long as you add the new location to theRakefile
. For example, if you moveAssets.xcasset
into a subdir ofresources
or a sidedir, theRakefile
needs:or
app.resources_dirs << ['sidedir’]
Obvi, missing
Assets.xcasset
will result in icon problems too but I wasn’t looking at icons. No major error messages but a quiet:(where ‘mvassets’ is the name of the app).
I investigated this under macos 10.13.6, rubymotion 5.14, and sims for iPhone 6s - 12.0 and iPhone X - 12.0.