openbakery / gradle-xcodePlugin

gradle plugin for building Xcode Projects for iOS, watchOS, macOS or tvOS
Apache License 2.0
455 stars 127 forks source link

xcodeBuild failes to create simulator build #436

Open aditisaini91 opened 4 years ago

aditisaini91 commented 4 years ago

Build fails with following log :

:xcodebuild FAILED

FAILURE: Build failed with an exception.

Build.gradle looks like :

xcodebuild { type = 'iOS' simulator = true arch = ['i386' ] additionalParameters = ['PRODUCT_NAME=' + m.productName ]

        signing {
            identity = m.signingIdentity
            certificateURI = m.signingCertificateURI
            certificatePassword = m.signingPassword
            mobileProvisionURI = m.signingProvisionProfileURI
        }
    }

Thanks in advance.

renep commented 4 years ago

Try to remove the arch parameter.

aditisaini91 commented 4 years ago

I tried removing arch parameter. I still get the same issue. But when specifically provide destination = ['iPad Pro (11-inch)', 'iPhone 8' ], the build is successful. Though I want the build to be able to run on any simulator. I have tried with gradle version 3.0, and 5.0. About a year ago this used to work fine. Is there anything else I should try.?

thank you

renep commented 4 years ago

On reason could be that you have in your destination iPad Pro (11-inch) but with the latest Xcode there is now iPad Pro (11-inch) (1st generation) and iPad Pro (11-inch) (2st generation) The latest version of this plugin should fix this issue and should take the first simulator where the prefix matches.

aditisaini91 commented 4 years ago

You misunderstood me.

My build works now only when I provide destination = ['iPad Pro (11-inch)', 'iPhone 8' ]. Without this it gives the above mentioned error.

Xcode version 11.5