Can't run build on iOS with dmengine (SOLVED)

I’m trying to run a game on iOS device (iPhone 5s) and can’t do that. I’ve followed the instructions (created provisioning profile, signed iOS app and downloaded it from the Dashboard). When I start dmengine on the device, I see welcome screen, I can see my device in the list of targets in Defold, the game builds but when it’s time to run it on the device, device screen goes black and after several seconds it crashes. Here’s what I get in the Defold console:

INFO:ENGINE: Defold Engine 1.2.110 (de8a2ae)
INFO:ENGINE: Loading data from: http://192.168.1.40:8080/build/default
INFO:ENGINE: Initialised sound device 'default'
ERROR:DLIB: No connectivity host set, required on iOS.
DEBUG:SCRIPT: Nothing to send

If I bundle the app and upload .ipa file with XCode, the game works fine. BTW, the game uses native extension (DefUnityAds).

Plain dmengine build does not support extensions, since it was built without any of them.

As I understood from reading other topics on the forum, when I use “Sign iOS app…” it bundles extensions in the app. Am I wrong?

I don’t know about “Sign iOS app”, maybe not. “Bundle” does build an app with extensions.

No it does not bundle extensions. It’s a vanilla dmengine at the moment.

Workaround: any debug dmengine can be used for remote work as long as the versions match so build an ipa, upload it and then use that to launch from.

Thanks for the answer! That means I can’t quickly run and debug my game if I use native extensions. Ok, I will try to temporarily disable them because I need quick debug cycle (I’m fixing game UI issues on iOS).

I wonder if it’s possible to include native extensions to dmengine (I’m totally fine with re-signing and re-uploading dmengine every time I add a native extension) so we can quickly test our games on the devices? Bundling after every little change is a big waste of time.

@sicher I’m not sure if I correctly understood the workaround you suggest: does that mean that I can upload .ipa and then use Cmd+B to run the game with all updates in the code from Defold Editor?

@megus.sugem: Yes, you can upload an ipa, start the game and then connect to the engine from the editor and run, hot reload etc.

6 Likes

Wow! That’s exactly what I need, thank you! I’ll try it tonight.

I think it should be mentioned in the documentation :slight_smile:

2 Likes

It is mentioned, but probably not in the right place. :slight_smile: Where would you look for that info? The iOS manual?

1 Like

@sicher Yes, I believe that iOS manual is the right place. That was my first place to go when I tried to run the app :slight_smile:

“Sign iOS app” should also build extensions and upload the resulting binary to the dashboard if I remember correctly. Are you using Editor 1 or 2?

2 Likes

@sven I’m using Editor 1.

Well, first of all, I’ll try to run another project on a device which doesn’t use Native Extensions. Then I’ll try to disable DefUnityAds in this project and see if it works. I’ll post the results here. Maybe it’s not Defold but the extension-related problem.

@AGulev Have you experienced similar problems?

Yes, I know this issue. The Unity Ads have no a deactivate method and I didn’t find how to solve this problem.

1 Like

Okay, I’ve tried to run another game which doesn’t use DefUnityAds and everything worked totally fine.
So, it seems it’s the problem with DefUnityAds or, as Alexey said, it’s a problem with Unity Ads.

Problem solved, thank everyone!

3 Likes

I opened an issue in my personal tracker and will try to fix it.

3 Likes

@AGulev Thank you! Though, as I said, it works fine if I install an IPA (but I will test more, of course). I experience problem only when I try to run from the editor (tried with both signed dmengine and IPA).

2 Likes

BTW, I’ve finally managed to run the game directly from the Editor 1 and even with DefUnityAds working fine on iOS. I don’t know what happened, it just started to work.

2 Likes

Not correct!

“Sign iOS app” supports native extensions!

3 Likes