Giter Club home page Giter Club logo

Comments (4)

janpio avatar janpio commented on April 28, 2024

Hmm, I am pretty sure this was required before. Maybe recent Xcode updates or something like that? Any idea?

from fastlane-plugin-cordova_screenshots.

andrey3diq avatar andrey3diq commented on April 28, 2024

I have the same issue.
First in XCode 11.0, then upgraded to 11.3. Build failed in both versions.
Interesting is that it's running fine when I start recording. But recording doesn't work, It's not adding any commands to the test.
When I run the test manually from XCode, it's trying to rebuild and then displaying this error:

Multiple commands produce '.../Info.plist':
1) Target 'test_schema' (project 'White Noise') has copy command from '.../Info.plist' to '.../Info.plist'
2) Target 'test_schema' (project 'White Noise') has process command with output '.../Info.plist'

If I delete the Info.plist from the list of compiled files I've got another error:

.../Plugins/cordova-admob-plus/AMSPlugin-Bridging-Header.h:2:9: error: 'GoogleMobileAds/GoogleMobileAds.h' file not found
#import <GoogleMobileAds/GoogleMobileAds.h>
        ^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '.../Build/Intermediates.noindex/PrecompiledHeaders/Bridging-Header-swift_2GL6M2402HZSA-clang_1V56BLNWUN2R4.pch' for bridging header '.../Bridging-Header.h'

The same error appear if I switch the build system to "Legacy build system".

Another issue, the swift version 3.0 is set for some reason after retrofit_cordova_screenshots_ios command. It would be great to switch to 5.0. Because now I should fix it manually in XCode.

from fastlane-plugin-cordova_screenshots.

brownoxford avatar brownoxford commented on April 28, 2024

Hmm, I am pretty sure this was required before. Maybe recent Xcode updates or something like that? Any idea?

This stackoverflow post contained a number of possible problems that could be causing the issue, but this one seemed like the best fit:

To elaborate a bit: This error is happening because Xcode 10's new build system is better at catching project configuration issues. Issues like these can sometimes cause subtle problems with your build, so it's good to fix them

I'm currently running Xcode Version 11.3 (11C29), and when I manually run fastlane run retrofit_cordova_screenshots_ios using v0.2.0 of the plugin I can see that the Info.plist file is accounted for in both Build Phases -> Compile Sources and Build Settings -> Packaging

I haven't yet found anything that indicated when Xcode might have started to include use both of these in the output, but it looks like newer versions of Xcode are noticing the misconfiguration and reporting it by failing the build.

My patch removes the Info.plist file from Build Phases -> Compile Sources and the build then works for me.

from fastlane-plugin-cordova_screenshots.

brownoxford avatar brownoxford commented on April 28, 2024

@andrey3diq, I think there may be a couple of things here that are causing you trouble. First, can you elaborate on what you mean here by "recording doesn't work"?

Interesting is that it's running fine when I start recording. But recording doesn't work, It's not adding any commands to the test.

It sounds like you are trying to generate a test through Xcode by recording your actions, but I don't believe that you can do that with apps that use web views (Cordova, Ionic, etc.). You have to write your UI tests manually and reference your UI elements using the accessibility labels ("aria-label" attributes in the HTML), for example:

<!-- view.html -->
<button aria-label="btn-login">Login</button>
// ui-snapshots.swift
app.webViews.buttons["btn-login"].tap()

Next, how are you removing Info.plist from the list of compiled files? If you do this through Xcode by removing Info.plist from Build Phases -> Compile Sources, it should work, but keep in mind that it will simply be added back the next time you run the retrofit_cordova_screenshots_ios lane. If you are not doing so already, have a look at the change I made for PR #26. Edit your own local version of the plugin to match and try this again to see if that resolves things for you.

The error you are reporting with cordova-admob-plus does not appear to be related to the issue of screenshots. Can you try to re-add the platform to your project and compile without running any fastlane-plugin-cordova_screenshots lanes to confirm?

If I delete the Info.plist from the list of compiled files I've got another error:

.../Plugins/cordova-admob-plus/AMSPlugin-Bridging-Header.h:2:9: error: 'GoogleMobileAds/GoogleMobileAds.h' file not found
#import <GoogleMobileAds/GoogleMobileAds.h>
        ^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '.../Build/Intermediates.noindex/PrecompiledHeaders/Bridging-Header-swift_2GL6M2402HZSA-clang_1V56BLNWUN2R4.pch' for bridging header '.../Bridging-Header.h'

Lastly, the swift version issue is addressed by PR #24, which is currently pending release.

Another issue, the swift version 3.0 is set for some reason after retrofit_cordova_screenshots_ios command. It would be great to switch to 5.0. Because now I should fix it manually in XCode.

from fastlane-plugin-cordova_screenshots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.