CocoaPods / CocoaPods/Xcodeproj

recreate_user_schemes produces invalid schemes for Xcode 6.3

Open
#264 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
2.4k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

This was observed using a cmake generated xcodeproj which was then used to generate schemes using the following script:

```
#!/usr/bin/env ruby
require 'xcodeproj'
xcproj = Xcodeproj::Project.open("build/xcode-ios/project.xcodeproj")
xcproj.recreate_user_schemes
xcproj.save
```

After running the script and then opening Xcode, Xcode created a new set of schemes. Running xcodebuild from the command line referencing the Xcodeproj schemes fails reporting an unknown scheme error.

Fixing this bug would enable using cmake to generate an xcode project from the command line and then building and packaging the app without having to open xcode. Opening xcode is necessary now to generate the scheme files (http://www.cmake.org/Bug/view.php?id=15441). We wanted to use Xcodeproj to avoid this in our continuous builder.

The changes between the xcode generated schemes and the Xcodeproj generated schemes seem to be
1) `LastUpgradeVersion` is now 0630
2) The `LaunchAction` section now has a MacroExpansion section.

```




```

3) The container path in `ReferencedContainer` is now prefixed with one more level of directory (i.e. build/xcode-ios/project.xcodeproj vs xcode-ios/project.xcodeproj)
4) xschememanagement.plist now has orderHint:

```
ALL_BUILD.xcscheme

isShown

orderHint
3

```

5) xschememanagement.plist now has keys referring to the scheme file:

```
myscheme.xcscheme
```

6) xschememanagement.plist now fills in the SuppressBuildableAutocreation section

```
SuppressBuildableAutocreation

004378C5206542DBBF7A4310

primary


```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.