iOS Deployment Workflow

Hi All,

I’m currently giving Defold a test run (awesome engine by the way!) and porting over a simply Unity app (a soundboard) to try out the engine and deployment workflow. I’m no Unity expert but I have the app I’m porting live and on the iOS app sotre and am trying to understand how to make the Defold go-live process as easy as possible as well.

I’ve got a Defold project started using the ‘Mobile’ template and can see placeholder for all my icons and splash images which will need to have the correct icons and splash images in.

When its time to release with my Unity workflow I have a single 1024x1024 default icon set in the iOS player and then Unity looks like it produces all variants for me. Is this something I do manually with Defold across all the icons placeholders provided?

On a similar note I’ve not gone as far to adjust the splash screens with Unity but assume they probably have something to help there as well and again looks like a manual task with Defold and setting up all the variants?

Bear in mind a lot of the time I’ll probably have a single icon I want to use and if possible a single splash screen so I guess just having a way to generate them all that slots into my workflow would be ideal. We are talking nice and simple casual games for the most part. I use Affinity Designer for art at the moment and could probably set that up to do something to export to everything to help but wonder if there is a smarter solution folks are using?

Also for in-app screenshots I use an asset with Unity that captures them at several resolutions I set (using a set key combo at runtime in the Unity editor) which I then just upload into my iTunes Connect app submission.

I see a Defold Asset for capturing screenshots but I can’t see a simple way to change the window size at runtime to emulate the devices the app might end up on. I’ve found another Defold asset called DefOS to help with the window size but its starting to feel clunky to do it that way, is there a more simple approach folks are using that can automate this?

Please bear in mind I’m still quite new to Defold and Unity in fact so go gentle :slight_smile:

Thanks for any help!

Pete

4 Likes

There’s no built in icon generator, but there are many tools available for that. Here’s one: http://appiconmaker.co

Alternatively you can quite easily whip up a script using Imagemagick or similar tool to automate the process.

Check out this thread: Positive Aspects - Tool for resizing any window to any aspect ratio or resolution

4 Likes

Yes, you need to provide the icons and launch images in all the required sizes (see game.project).

There are online tools that given a 1024x1024 icon spits out icons in all the sizes you need. Example: http://appiconmaker.co/

There’s likely the same kind of tool for the launch images.

No, no simple approach yet, but I can totally see this as a new extension/lib that leverages DefOS and Defold-Screenshot to do this work. I’ll make a note of it and see if I have time to create it.

Welcome to the forum! We all start as beginners, and here we’re very kind to everyone.

2 Likes

@sicher @britzl Many thanks for your reply’s and time guys, appreciated. Exceptionally friendly and helpful community :slight_smile:

4 Likes

I spent some time this morning and got something going: https://github.com/britzl/screenshooter

Needs a bit of tidying up and some instructions but it works.

5 Likes

@britzl Just downloaded what you’ve put together and it works perfectly, great time saver and super useful, many thanks.

3 Likes

It unable to take screenshots with height larger then screen height minus window title and menu bar.
2048x2732, on 1920x1200 screen for example, becomes 2048x1155, 1536x2048 becomes 1536x1155, etc. The only correct resolution I got is 640x1136.
What the point of this tool?

Yes, a little closer inspection and I see the same results i.e. the cropping. Just had a quick browse of the images previously, apologies.

Might be caused from the set window sizing simply cropping things as it can’t make the window larger etc. Maybe there’s a way to render things to a ‘virtual display’ or something and screen grab from that.

Puzzled to how how people are taking their screenshots currently for store deployments unless you own devices that suit each screenshot size and grab them ‘on device’.

I believe it should be technically possible to create a higher resolution render target buffer, render to it and then read its data and write to file.

Thanks @sicher Probably a little above my understanding of Defold right now, I was trying to find a simple solution I can use to hit the ground running.

I can only assume everybody else seems to have physical devices for the required resolutions and is snapshotting things on the device. Either that or faking a screenshot with some design magic.

I noticed this myself. On OSX the window height gets limited by the OS. I haven’t had time to see if that can be sorted somehow.

The idea is that it should resize the window to all the resolutions needed for app store submissions and automatically take screenshots. I’ve spent maybe 90 minutes on it so far, based on the question asked here in this post. It is not finished and not announced as a tool for people to use (yet).

Yeah, that would work. But it would mean more work for the developer and I’d like to prevent this.

Its the same on Windows. Suppose it makes sense for the OS to restrict the window size which only leaves redirecting the rendering to an off screen texture or similar and grabbing the contents of that and saving etc.

Heres what I use with Unity…

https://assetstore.unity.com/packages/tools/utilities/mobile-store-screenshot-109338

Looking into the sourcecode of that asset they change the editor window size and it doesn’t have the same restrictions. Suppose that is a benefit of that kind of setup.

Having it work seamlessly is a big deal for these kinds of things IMO. Especially as not all of us have a wide selection of devices needed to take actual screenshots on device for a store submission. Appreciate the time you’ve taken to look at this but I’m thinking given the turn key based nature of Defold it would be nice for this to be present in the editor and packaging?

When I work in Unity I have a workflow setup so when I’m finished developing I submit a build to Unity Cloud Build services using production credentials (certificate, provisioning profile etc), single click.
Create my screenshots, single click. I get a link eventually which I download and use Application Loader to submit to iTunes Connect. Upload the created screenshots, fill out the blurb and submit. Really frictionless to be honest.

Granted I pay for Unity Cloud Build and have paid a few £££ for the screenshot asset but I don’t mind if it saves a significant chunk of time. Whilst waiting for Unity Cloud build I’m free to continue deving etc so it doesn’t get in the way, builds take about 30 mins in the cloud so I do most of my testing in the editor. I thought testing like that would cause problems but because my projects are fairly simple the editor representation so far has been identical so I have confidence to do it that way and then once a day submit a build and spot check on device.

Again, be really interested to hear how other use Defold, are people constantly using their devices for testing or do they prefer to do as much on PC/Mac first? If you have a really complex game I understand the value of constant testing on-device but for simple stuff is it really needed? What I’d really like to know more about are production workflows for iOS deployment (or mobile in general if not iOS).

Thanks again all :slight_smile: :slight_smile:

I’m curious, is that really a requirement from Apple that you should specify screenshots for every device? I cannot imagine Apple thinking indie devs have all devices available.

Also, as a complement to any extension, I’d just just like to mention two other ways to take a screenshot:

  • In XCode -> Devices: Press the “Take Screenshot” button and the file will end up on your Desktop (example)

  • When holding the phone, press Home + Power(doc)

(For Android users, you can take screenshots with Android Studio as well)

3 Likes

Not for every device but they want at a minimum a screenshot of a 5.5" iPhone (1242 x 2208) and a 12.9" iPad (2048 x 2732) which is what causes the issues if you’ve not got the devices to grab them :slight_smile: For reference…

https://help.apple.com/app-store-connect/#/devd274dd925

For myself I have my iPhoneSE (which means I can’t get an on device screenshot for the iPhone requirement from Apple) and my iPad. I don’t like huge phones and having one just to get a screenshot feels a little glamorous :slight_smile:

For general app dev I can however only assume it is normal for dev’s to have 1 physical device in the ‘family’ of devices for everything Apple requires screenshots for at that time? Seems an excessive requirement for Indies though as you say.

As I mentioned I’m coming from Unity to try Defold and I’m able to work around it there via an asset which is really handy, esp if Apple change things up, I can instantly still react and so on.

Also, the problem gets worse if I ever decide to deploy to Android, no idea what the requirements are there but having a device to test with on Android seems resonable but again a bunch of devices doesn’t seem reasonable for an indie dev, or is that the norm?

Thanks for this also, I didn’t know about the Xcode feature for grabbing a screenshot off a device. Also when you mentioned XCode I thought maybe I could simulate a device I don’t have but from what I understand Defold isn’t currently able to run in the iOS Simulator (Unity doesn’t either being fair).

I understand the reasons and they make sense, just a shame in this instance.

3 Likes

We’re having an exploration/hack day here at the office and @sven is actually looking into it today!

4 Likes

That’s awesome. Thank you for taking some time to see what can be done. I know it seems silly but little things like this become pain points in the long run.

I had another idea, what about deploying to HTML5, would a WebGL/Canvas element be limited to the physical screen size, thet grab from that? Will have a look but wanted to throw it out there.

As an aside I wanted to say I like Defold a lot, biggest selling points for me are the 2D focus, visual editor, turn key build process and lightweight nature of it, esp opening up FB Instant games, areas Unity can’t compete right now.

An even more then that you guys, your super responsive and helpful!

Thanks again.

4 Likes

Ok, had a little go with HTML5 but took a more simple approach…

I deployed to HTML5 in Chrome. I then opened up the dev tools and hit the ‘device toolbar’ button.
Now I added a device at the size screenshot I wanted and made sure my game runs in ‘full screen’. Now, right click and save the image when you want a screenshot. Images come out sized properly etc.

Obviously this is a lot more manual work but it works, how did you guys get on at running Defold in the simulator? Maybe I just need to accept the fact to dev on iOS you need to have a iPhone and iPad revisions Apple want you to deploy for.

Cheers!

1 Like