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

dstSubfolderSpec format error while running Cocoapods on auto-generated Xcode project #475

Open
aledalgrande opened this issue Mar 30, 2017 · 0 comments

Comments

@aledalgrande
Copy link

Xcodeproj complains:

RuntimeError - [Xcodeproj] Type checking error: got Integer for attribute: Attribute dstSubfolderSpec (type: simple, classes: [String], owner class: PBXCopyFilesBuildPhase)

but as you can see from a quick search, the parameter can be either Integer or String: https://github.com/search?l=XML&q=dstSubfolderSpec&type=Code&utf8=%E2%9C%93

facebook-github-bot pushed a commit to facebook/buck that referenced this issue Jan 14, 2020
Summary:
Buck currently outputs an XML for `project.pbxproj` where `runOnlyForDeploymentPostprocessing` and `dstSubfolderSpec` are treated as `integer`.

```
			<key>runOnlyForDeploymentPostprocessing</key>
			<integer>1</integer>
			<key>dstSubfolderSpec</key>
			<integer>16</integer>
```

When trying to open the `.xcodeproj` file with [xcodeproj](https://github.com/CocoaPods/Xcodeproj) we're getting:

> [Xcodeproj] Type checking error: got `Fixnum` for attribute: Attribute `dstSubfolderSpec` (type: `simple`, classes: `[String]`, owner class: `PBXCopyFilesBuildPhase`)

This [seems to be a bug](CocoaPods/Xcodeproj#475) in xcodeproj itself.

To work around this, I'm forcing these 2 keys to have Strings as values instead of Int. After doing this, `xcodeproj` can succesfully open our project.

This was all already done in our [fork of buck here](airbnb#8)

 ---

I'm also including here donholly commit in their fork that adds the same workaround for the same issue in PBXContainerItemProxy Clubroom@8fa5ae5
Pull Request resolved: #2257

Test Plan: Imported from GitHub, without a Test Plan: line.

Reviewed By: williamtwilson, v-jizhang

Pulled By: v-jizhang

shipit-source-id: 90ec5e0dab4922d70b5b01013a548384aa0d0f3b
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

No branches or pull requests

1 participant