Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include non-shared schemes in Project.schemes #680

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lebedev
Copy link

@lebedev lebedev commented Apr 30, 2019

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.

@dnkoutso
Copy link
Contributor

Please add a test?

@lebedev lebedev changed the title Fix *.xcscheme paths Include non-shared schemes in Project.schemes Apr 30, 2019
@lebedev
Copy link
Author

lebedev commented Apr 30, 2019

@dnkoutso Done.

@lebedev
Copy link
Author

lebedev commented May 20, 2019

@dnkoutso ping

@segiddins segiddins requested a review from dnkoutso May 24, 2019 23:30
CHANGELOG.md Outdated
@@ -16,6 +16,9 @@
* Generating deterministic UUIDs for a project also updates `TargetAttributes`.
[Samuel Giddins](https://github.com/segiddins)

* Include non-shared schemes in `Project.schemes`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing 2 empty spaces after the period. Also move this up to master section.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean rebase your branch cause I think 1.9.0 has been released.

@gheaeckkseqrz
Copy link

Hi there,

I ran into a problem using Xcodeproj as part of fastlane (fastlane/fastlane#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

@dnkoutso
Copy link
Contributor

dnkoutso commented Jul 8, 2019

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

@dnkoutso
Copy link
Contributor

dnkoutso commented Jul 8, 2019

Then we can merge this.

@dnkoutso
Copy link
Contributor

ping @lebedev

@martin-key
Copy link

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

@dnkoutso
Copy link
Contributor

dnkoutso commented Aug 2, 2019

It will ship with 1.12.1 in a week or two.

@dnkoutso
Copy link
Contributor

@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?

@amorde
Copy link
Member

amorde commented May 16, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants