METAL is now broken with iOS 15.3.1 and build 3664

Try removing all the plugins first and then if it works it is one of the plugins. If it is one of the plugins, I would start with the monetization plugins. I don’t have access to half the plugins on your list or I would try to reproduce it.

I agree with @troylyndon, it would be great if the default were not Metal, since, as @agramonte pointed out, there seems to be no advantage to using it, and, if you have an installed user base of people on iOS 9, there is a substantial downside if you accidentally ship a build that is made with Metal.

As it stands, I have a preflight checklist that includes making sure the target SDK is not set to Metal. (That, and I check every final build on an old iPad running iOS9 before I ship.)

Ok figured it is out. The error is this:

ERROR: A shader failed to compile. To see errors, add the following to the top of your main.lua:
	display.setDefault( 'isShaderCompilerVerbose', true )

And it is caused by this plugin:

["plugin.admobIron"] = {
         publisherId = "tech.scotth",
         supportedPlatforms =
         {
             android = { url="https://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=admob&type=Android" },
             iphone = { url="http://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=admob&type=iOS" },
         },

Just remove that plugin and the error goes away for the Metal build.

Tested on the following devices:
iPhone XR 15.3.1 (fails with ironadmob)
iPhone 7 14.5.1 (fails with ironadmob)

1 Like

@Scott_Harrison are you able to fix this?

I also just tried with the facebookIron and had the same issue. The issue goes away if I remove both facebookIron and admobIron. Please note that I don’t have access to plugin.ironsource so you might have to remove that one also if you want to build for Metal.

This time I only tested on:
iPhone 7 14.5.1

1 Like

Here is the thread when @Markus_Ranner first discovered the issue. I was not able to fix it for appodeal mostly because I can’t see the real error and I would have to go through the source code to figure it out and I don’t build with Metal because of this issue. As a note adding that value to the top of the main.lua file changes nothing.

1 Like

Looking into it

Should be fixed now, please rebuild

still a black screen - here is my more complete list of plugins.

    ["plugin.facebook.v4a"] = { publisherId = "com.coronalabs", },
    
    ["plugin.notifications.v2"] = { publisherId = "com.coronalabs" },

    ["plugin.gamecenter"]={publisherId="tech.scotth"},  

    ["plugin.appleSignIn"]={publisherId="tech.scotth"},
        
    ["plugin.google.iap.billing"] = { publisherId = "com.coronalabs", supportedPlatforms = { ["android"] = true } },

    ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" },
    
    ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true } },

    ["plugin.googleSignIn"] = { publisherId = "tech.scotth",marketplaceId = "oljr9d" },

    ["plugin.firebaseAuth"] =	{ publisherId="tech.scotth",marketplaceId = "oljr9d" },
    
    ['plugin.att'] = { publisherId = 'com.solar2d',supportedPlatforms = { ["iphone"] = true, ["android"] = false } },
    
    ["plugin.ironSource"] = {publisherId = "tech.scotth",marketplaceId = "oljr9d"},
    
    ["plugin.facebookIron"] = {
        publisherId = "tech.scotth",
        supportedPlatforms =
        {
            android = { url="https://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=facebook&type=Android" },
            iphone = { url="https://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=facebook&type=iOS" },
        }
    },
    
    ["plugin.admobIron"] = {
        publisherId = "tech.scotth",
        supportedPlatforms =
        {
            android = { url="https://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=admob&type=Android" },
            iphone = { url="http://solar2dmarketplace.com/getShared?subFolder=ironsource&sharedName=admob&type=iOS" },
        },
    },

btw, I’m also trying to track down why my Google Sign-in stopped working But having said this, I don’t want to distract from the primary purpose of this Topic, which is that Metal is now broken.

I am going to DM you my sample project but I cannot get a crash with your build.settings using metal on my iPhone running 15.3.1

Just an update for anyone following this…

The problem is real. We’ve discovered it is caused by the “admobiron” plugin. Oddly, it works fine on Scott’s iPhone 12 mini, but not on my iPhone 13 Pro. We’re both running iOS 15.3.1.

I can reproduce it on many devices and many plugins all the way back to 14.1.

1 Like

Another update - we found the problem is a plugin conflict. I’m not sure solving this can be done quickly, but I hope it can.

Using the ironSource demo from Scott, adding the googleSignIn OR firebaseAuth plugins INDIVIDUALLY, will NOT cause the black screen problem with the METAL build.

However, using BOTH googleSignIn AND firebaseAuth plugins TOGETHER, this WILL cause the black screen problem with the METAL build.

So, googleSignIn and firebaseAuth plugins included together in a project causing the problem were SYMPTOMS of the real problem.

When I remove the “admobiron” plugin, my METAL build works fine. Hopefully, this will be fixed soon. Until then, everyone should BEWARE of including the “admobiron” plugin in their builds.

Did you try the facebookIron plugin alone? For me this also causes the problem on some devices.

Adrian

The key is that admobiron is conflicting with others, perhaps the facebookiron too - Give it a shot - I’m on deadline at the moment.

so after working with Scott today, it is apparent that admobIron just, somehow, breaks Metal as reported. The difficulty we have now is that Scott does not have an iPhone 13 or iPad Pro such that he can create the build on his system. But he was able to try my build and could actually see the black screen of Metal. I will update this as progress is made, until then, I don’t recommend ANYONE try creating a build with the admobIron plugin with a Metal build, or you will be disappointed.

1 Like

Update and Question: Apparently, @Scott_Harrison can build to Metal without any difficulties. And last night, my co-developer created a build of my latest version of a game with Metal, using build 3661, without the black screen.

The point here is that both Scott and my co-developer cannot create a new build using Metal that shows the black screen. I have attempted to use build 3661, to see if that will help, but I can’t do this because I have already upgraded to MacOS 12.2.1.

So, why can my co-developer create a build using the identical code of our game using Metal WITHOUT this black screen? This tells me the problem is NOT the code. It must be either something in a recent Solar2D build newer than 3661, or, more likely, this is specific to my own computer.

In summary, a Metal build WORKS when a build is created by my co-developer running Solar v3661, MacOS 11.6 and Xcode 13.0 on a Mac Mini 2018.

I am running Solar v3665, MacOS 12.2.1 and Xcode 13.2.1 on a new 16" MacBook Pro (M1 Pro), which results in a Metal build NOT working, showing the black screen.

Does anyone know if the Solar2D build process uses code within Xcode to create a build?
In other words, should I experiment with older versions of Xcode to find an earlier version that might allow Metal to build okay on my system without the blank screen?

Yes, it uses Xcode to create a build. There is no other option.