Black Screen on iOS (Construct 3 project)


#1
  • Cocoon Version:
    latest

  • Basic description of the problem:
    After Cocoon loading screen, see only black screen on iOS

  • Device info:
    iPhone 7, iOS 11.2.5

  • Steps will reproduce the problem:

  1. Upload project
  2. Compile for iOS
  3. Run on iPhone
  • Expected result:
    Hello World screen

  • Error log

  • Testcase:
    Hello World app from Construct 3: https://goo.gl/TnwbEU

  • Other information:
    Any other information that you feel is relevant

  • Webview engine(s):
    Tried all of them

  • Used plugins (if relevant):
    None

  • Framework/game engine (if relevant):
    Construct 3


#2

have you tried to run it in the cocoon developer app? There you can access the error log.

I do not have construct 3 yet, but when, I’ll finish my guide for it. So far, you find some information here.

Thanks!

Regards
Andy


#3

The error that I get in the log from the cocoon developer app:

JavaScript Exception (Line: 10889 Tag: ‘timer’): TypeError: undefined is not an object (evaluating ‘window[“cordova”][“file”][“applicationDirectory”]’)


#4

Can you send a list of your used plugins / behaviors in your construct 2 project?
This seems to be a problem of an unsupported addon.

Regards
Andy


#5

I do not have any add ons. This error occurs with a completely new/blank Construct 3 project.


#6

Ok. Thanks for the update. Last time I used C3 it was in beta and the game worked with cocoon. Maybe an update has changed that. I do not own a C3 license at the moment, so I only can guess.

  • Have you checked “minify script” at the export options?
  • For what platform have you epxorted your project, cordova?

Best
Andy


#7

I posted this issue with the Construct 3 developers as well.

Here’s what they said:

“looking at the error message it looks like it’s not including cordova-plugin-file, which is required for the runtime to work. It’s always specified in config.xml so maybe Cocoon isn’t reading that file.”


[SOLVED] Cordova-plugin-file not installed
#8

That’s easy to try, just open your project at cocoon, go to settings and select Plugins. Then go to “Core” and install the “File” plugin.

Regards
Andy


#9

I have installed the plugin as you mentioned, and I am now getting a new error, “Error fetching data.js”. Any ideas?


#10

Now that’s the same issue I’m facing at the moment, but with Construct 2.
This only seems to happen with “WebView+”, “Canvas+” is working fine.

For this, I do not have a solution at the moment. @Blue_Sialia any idea what this can cause?
It’s working fine in Canvas+ and at the cocoon version 2.1.0

Regards
Andy


#11

@Blue_Sialia

Im getting this same issue guys. With Webview+ building for iOS I get error message “Error fetching data.js” on my test device.
This is if I compile with Webview+ (no certificate selected) > use Xcode to sign my project > test on my device.


#12

The c2runtime.js file has the following entries:

var self = this;
	if (this.isWKWebView)
	{
		this.fetchLocalFileViaCordovaAsText("data.js", function (str)
		{
			self.loadProject(JSON.parse(str));
		}, function (err)
		{
			alert("Error fetching data.js");
		});
		return;
	}
	var xhr;

Thats the only instance I can see of that error in the runtime? Does that give any indication of whats causing this error (“Error fetching data.js”) ?
Is this indicating its something to do with WKWebView?


#13

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.