Cannot build for IOS

updated openfl, lime and I am also using starling 1.8.3. Latest versions now seem to allow it to compile on Xcode, but when the app launches I hear the game’s intro sounds but no graphics are showing. All I see is a white screen.

By the way I also set back iphonesim-toolchain.xml and iphon-toolchain.xml to it’s original state. I removed the hardcoded iphone9.0.

Does the Starling demo or another OpenFL or Lime sample work for you?

The starling demo does not compile at all. OpenFL demos seem to be ok. The issue seems to be Starling, I am also on a mac. Using Openfl 4.5.2 Starling 1.8.3. Neko and html5 work fine but I have flash target throws errors and does not compile for starling demo.

This is all I am getting when I run the app on iOS:

Does not look like I am able to compile anything for iOS with the openfl 4.5.2 / Lime 3.5.2 /Starling 1.8.3

I am unable to run neko either. I had made a change to openfl 4.4.1 to be able to compile on my mac because I was not able to run anything using starling.

I am able to run on neko and html5 using openfl 4.4.1 and lime 3.4.2 with the modificatiion to AGALConverter.hx to make it run on my mac. The latest 4.5.2 and lime 3.5.2 does not work for html5 only neko. I do not get errors on 4.5.2 when I compile to ios but all I see is that fuscia screen, I can hear sounds but nothing renders. Not able to comile using 4.4.1 I get a clang error and the cannot find iphonesimulator1 (which should say 8.4 not 1).

So all samples work, but not your Starling application?

Does the Starling sample demo work?

No not all samples work. HTML5 target not working only neko seems to be working for me. Everything else does not.

The pirate pig demo compiles but does not run. It simply displays a black screen. My game compiles but only shows the fuscia screen and I can hear the intro music and game menu music but no graphics.

PiratePig works here

I am still unable to compile to iOS on my mac. What is your set up? I must have something not set up correctly on my mac.

Piratepig on my Mac.

I am getting this error on Xcode:

Error lime_gl_get_program_info_log does not have signature oo

It sounds like something is not properly built.

If you’re working from the source, try running the following:

openfl rebuild tools
openfl rebuild mac -clean
openfl rebuild ios -clean

Then try this for your PiratePig project:

cd path/to/PiratePig
openfl update ios -clean -xcode

That should clear out the old Xcode project, and copy the native binaries and such again, then open Xcode for you. Then you can try and build again

1 Like

Awesome! this allowed me to build and successfully run Piratepig, but I am still stuck with this on my project:

This is with starling. I tried running the starling demo but that has been stuck compiling for a while now (about 2 hours)

Great!

Did you try the same clean step with the Starling sample, or your project? Does it appear to be making progress on your build, or is it hanging for some reason?

I followed the same steps for starling but the starling demo just hangs. My project compiles but only displays the screen I posted. I wrote a simple app that just displays a starling sprite but it also generates the same color screen:

Project XML:

<?xml version="1.0" encoding="utf-8"?>
<project>
	
	<meta title="Mat" package="com.sample.mat" version="1.0.0" company="Company Name" />
	<app main="Startup" path="Export" file="Mat" swf-version="12.0" />
	
	<source path="Source" />
	
	<haxelib name="openfl" />
	<haxelib name="starling" />
	<config:ios deployment="10.2" />
	
	<assets path="Assets" rename="assets" />

	<window width="1024" height="600" orientation="landscape" fps="60" background="0x000000" resizable="false" borderless="false" vsync="false" fullscreen="false" antialiasing="4" if='neko'	/>
	<window width="1024" height="600" orientation="landscape" fps="60" background="0x000000" resizable="false" borderless="false" vsync="false" fullscreen="false" antialiasing="4" if='html5'	/>
	<window width="1024" height="600" orientation="landscape" fps="60" background="0x000000" resizable="false" borderless="false" vsync="false" fullscreen="false" antialiasing="4" if='mac'	/>
	<window width="1024" height="600" orientation="landscape" fps="60" background="0x000000" resizable="false" borderless="false" vsync="false" fullscreen="false" antialiasing="4" if='ios'/>
	
</project>

My Game.hx file and class looks like this:

package;


import starling.core.Starling;
import starling.display.Sprite;
import openfl.Assets;
import starling.display.Stage;
import openfl.display.BitmapData;
import starling.display.Image;
import starling.textures.Texture;
import starling.textures.TextureAtlas;
import starling.utils.AssetManager;



import flash.system.Capabilities;
import openfl.media.Sound;
import starling.events.*;


class Game extends Sprite {
	public var obj:Image;
	public var objSpr:Sprite;
	public static var assets:AssetManager = new AssetManager();
	
	public function new () {
		
		super ();
		
		load();

		obj = new Image(Game.assets.getTexture("avatar_0000"));
		
		objSpr = new Sprite();
        objSpr.addChild(obj);

		addChild(objSpr);
		
		
	}

	public function load(){
		var avatarsTexture:Texture = Texture.fromBitmapData(Assets.getBitmapData("assets/avatars.png"), false);
            var avatarsXml:Xml = Xml.parse(Assets.getText("assets/avatars.xml")).firstElement();

            Game.assets.addTexture("avatars", avatarsTexture);
            Game.assets.addTextureAtlas("avatars", new TextureAtlas(avatarsTexture, avatarsXml)); 
	}
	
	
}

Which results in this:

This is what the xcode console is outputting:

    2016-12-28 16:26:20.848364 Mat[30951:608093] [aqme] 255: AQDefaultDevice (1): skipping input stream 0 0 0x0
    Starling.hx:460: [Starling] Initialization complete.
    Starling.hx:461: [Starling] Display Driver: OpenGL Vendor=Apple Inc. Version=OpenGL ES 2.0 APPLE-13.0.7 Renderer=Apple Software Renderer GLSL=<unknown>
AssetManager.hx:1191: [AssetManager] Adding texture 'avatars'
AssetManager.hx:1191: [AssetManager] Adding texture atlas 'avatars'
    2016-12-28 16:26:22.857597 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:24.866057 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:26.874297 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:28.883069 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:30.891942 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:32.900005 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:34.908391 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:36.917377 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:38.924794 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:40.933661 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:42.941717 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:44.950731 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:46.958963 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:48.967887 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:50.975667 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:52.985146 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:54.992912 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0
    2016-12-28 16:26:57.001840 Mat[30951:608093] [aqme] 255: AQDefaultDevice (173): skipping input stream 0 0 0x0

At first I was thinking that perhaps I was not waiting for the assets to load before rendering the sprite. But that was not the case.

I put in a small delay and it displays a black screen as I expected. As soon as starling is started the screen turns fuschia. I made sure to load the assets before adding starling and staring. I also had a delay on the sprite but that did not make a difference. The problem is definitely with starling and very likely with openFL’s stage3D/openGL on iOS. I would go the swf to Air route but I cannot create the swf. It generates a bunch of errors for me. I downloaded the latest version of Xcode but being I cannot make an swf leads me to believe the problem is elsewhere.

Very frustrated and stuck at the moment wondering if I should even continue writing my game. I have burned a lot of hours just trying to get starling to work on iOS which is my main target. Any help is greatly appreciated on this.

I don’t normally test on the iOS simulator, PiratePig is working properly, but I am seeing a white screen with the Starling demo. I’ll take a look.

It worked on the device, last I checked, but let me see what’s going on with the sim

Yes Pirate Pig works perfect. I have yet to test Away3D, does it wokr on iOS ok? I am mainly interested in the pseudo 3D effects that starling provides with stage3D. If I have to rewrite with Away3D so be it but I just want it to work.