Xcodeproj icon indicating copy to clipboard operation
Xcodeproj copied to clipboard

Include non-shared schemes in Project.schemes

Open lebedev opened this issue 5 years ago • 11 comments

Hi!

~I've discovered that getting schemes for modern projects fails if scheme name differs from project name due to wrong paths. E.g. I have a .xcscheme file located at ./Pods.xcodeproj/xcuserdata/USERNAME.xcuserdatad/xcschemes/Firebase.xcscheme, where USERNAME is a username of my user. However, current Xcodeproj looks for .xcscheme files only at project_path/xcshareddata/xcschemes/*.xcscheme.~

~To fix that I've added ** there. This change should support both old and new paths.~

I've discovered that getting schemes for a project doesn't consider non-shared schemes.

To fix that I've added ** there. This change should support both shared and non-shared schemes.

lebedev avatar Apr 30 '19 13:04 lebedev

Please add a test?

dnkoutso avatar Apr 30 '19 14:04 dnkoutso

@dnkoutso Done.

lebedev avatar Apr 30 '19 15:04 lebedev

@dnkoutso ping

lebedev avatar May 20 '19 22:05 lebedev

Hi there,

I ran into a problem using Xcodeproj as part of fastlane (https://github.com/fastlane/fastlane/issues/14988).

When running schemes on a project that was generated with CMake and never opened with Xcode GUI (like in the context of a CI server), the method Xcodeproj::Project.schemes(path) doesn't actually returns the availables schemes as the files have not been created.

Maybe a better way would be to parse the output of xcodebuild -list ?

wilmot_p@Pierres-MacBook-Air ➜  proj.ios_mac git:(master) ✗ tree COCOS.xcodeproj
COCOS.xcodeproj
└── project.pbxproj

0 directories, 1 file
wilmot_p@Pierres-MacBook-Air ➜  proj.ios_mac git:(master) ✗ xcodexcodebuild -list
Information about project "COCOS":
    Targets:
        COCOS-mobile
        COCOS-desktop

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Debug" is used.

    Schemes:
        COCOS-desktop
        COCOS-mobile
        libcocos2d iOS
        libcocos2d Mac
        libcocos2d tvOS

gheaeckkseqrz avatar Jul 07 '19 19:07 gheaeckkseqrz

The CHANGELOG needs to be fixed and the branch to be rebased.

dnkoutso avatar Jul 08 '19 17:07 dnkoutso

Then we can merge this.

dnkoutso avatar Jul 08 '19 17:07 dnkoutso

ping @lebedev

dnkoutso avatar Jul 23 '19 20:07 dnkoutso

@dnkoutso do we have an estimate when can we expect this ?

martin-key avatar Jul 30 '19 14:07 martin-key

It will ship with 1.12.1 in a week or two.

dnkoutso avatar Aug 02 '19 15:08 dnkoutso

@lebedev if you'd like this change to land can you please rebase your branch against 1-12-stable and update this PR to point against 1-12-stable?

dnkoutso avatar Aug 21 '19 14:08 dnkoutso

@lebedev I rebased your branch & moved the changelog to the right place

amorde avatar May 16 '20 06:05 amorde