tuist / xcodeproj Goto Github PK
View Code? Open in Web Editor NEW๐ Read, update and write your Xcode projects
Home Page: https://xcodeproj.tuist.io
License: MIT License
๐ Read, update and write your Xcode projects
Home Page: https://xcodeproj.tuist.io
License: MIT License
Change PBXGroup.children from a Set to an Array so that order is preserved
Sorry for disturbing.
This project looks like it has great potential and I'm really trying to integrate it into one of my own swift command line tools, but the lack of examples/documentation makes it extremely difficult to use and understand. The README shows how to read and write, but it lacks the most important feature of all in my opinion, modifying components of the project.
Is there any plans to add more examples in the future?
Thanks! ๐
XCConfigurationList.buildConfigurations
should be an array.
Fix it!
#43 Greatly clarified how to create a new group and add it to an already existing group. However, I am now very uncertain on how to add actual source code files (that are already created) to a group. Is PBXFileElement
the object I should be using or is there something else? Any help would be appreciated!
Thanks! ๐
Is it possible to create a new PBXGroup
and append it to the Xcode project?
I've tried this:
let project = try! XcodeProj(path: "MyProject.xcodeproj")
let pbxproj = project.pbxproj
let group = PBXGroup(reference: "CustomPBXGroup", children: [], sourceTree: sourceTree)
pbxproj.objects.groups.append(group)
but groups
is read only property.
Is there a way to do this?
Add a document that drives people through the basics of the project:
Hey,
sorry if this is the wrong place to ask, but I can't find anything anywhere else.
Is there an option to get the fully qualified name of the sourcefiles? In project.pbxproj.objects I can only find the direct filename.
Thanks
Remove UUID
typealias and use String
instead.
After using it around xcodeproj
, I noticed that there's no big advantage on using the typealias instead of String
. The purpose of this issue is removing the typealias from the project.
UUID
with `String.I tried to parse one of my projects.
Simple initialization:
let project = try XcodeProj(path: "ProjectName.xcodeproj")
Related to the error: [UnboxError] An error occurred while unboxing path "fileRef": The key "fileRef" is missing.
As I understand, the problem is here:
0AEBC6F01F2F0F28000441DB /* VideoPickerPageInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPickerPageInteractor.swift; sourceTree = "<group>"; };
Update mapping of PBXFileReference
project to handle this case.
We're not currently unit testing the writes of different models. The only test that we have is an integration test that ensures that the project can be read and written to disk. That test doesn't check individually if all the objects that have been written have the right format. This leads to inconsistencies in the read and the written format of the project objects.
By adding unit tests to the writes we could validate the format and prevent inconsistencies between the input/output projects.
Think about the strategy that we can take to unit test the objects writes.
This would write the workspace, pbxproj, and shared data
Provide information that helps with understanding your issue. For example your use case that the project doesn't cover, what you were doing when you found the bug... You can also provide the version of the library that you were using, how you integrated it with your project, the platform version...
Describe here your issue, a bug you found, an idea that you had, something that you think can be improved...
Attach your own proposal (if you have it). We'll discuss in on the issue to find the best one that fits into the library.
After the project has been migrated to Swift 4 we can remove the Unbox dependency and use the language encoding/decoding feature.
Use the language encoding/decoding feature instead of Unbox.
The current version of xcodeproj doesn't seem to work as a dependency in other Swift PM projects. The current package is only compatible with Xcode 9, but using the swift CI tools from Xcode 9 and referencing xcodeproj as a dependency leads to the error
The product dependency 'xcodepro' was not found
I haven't been able to work out the problem. The branch https://github.com/carambalabs/xcodeproj/tree/feature/single_target tries to solve it by exposing only a single target, but that didn't seem to help.
Some developers might build a macOS app that leverages xcodeproj. To make the integration easy, you could support Carthage from xcodeproj. Compared to CocoaPods Carthage provides more control for developers and less version screw ups.
Support Carthage (dynamic framework necessary)
Create xcodeproj as a framework to support Carthage
There's some duplication in the way comments are generated for ProjectElement
s. Some of them implement their own private function that generates the comment, finding other elements in the PBXProj
model. Here is an example of that kind of functions.
Extract these methods, as we already did, and update the models to use these methods instead.
PBXProj
model extension.All the models in xcodeproj are defined as structs. Although immutability has some advantages like thread safety it makes it forces us to come up with it forces us to extend the interfaces with methods to provide mutated copies of the models with the changes.
You can read more from this issue #43 (comment) that @Daltron reported.
Move the project models to classes and clean up the interfaces removing the methods that are not necessary anymore.
Some developers might build a macOS app that leverages xcodeproj. To make the integration easy, we could support CocoaPods from xcodeproj.
Support CocoaPods.
Support CocoaPods and include the deployment to CocoaPods in the release process
Since everything is a Struct, should we make all the properties mutable?
adding(object:)
, or removing(object:)
functions in PBXProj)Thoughts @pepibumur?
I tried to parse my project that contains multiple projects for downloadable IAPs
Simple initialization:
let project = try XcodeProj(path: "ProjectName.xcodeproj")
PBXReferenceProxy
section:
/* Begin PBXReferenceProxy section */
2E12F4BE1F6665C800E994A6 /* iap2 */ = {
isa = PBXReferenceProxy;
fileType = folder;
path = iap2;
remoteRef = 2E12F4BD1F6665C800E994A6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E2578961F6281A20080638D /* unlock.all */ = {
isa = PBXReferenceProxy;
fileType = folder;
path = unlock.all;
remoteRef = 2E2578951F6281A20080638D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E2A42AF1F613B6000330926 /* iap */ = {
isa = PBXReferenceProxy;
fileType = folder;
path = iap;
remoteRef = 2E2A42AE1F613B6000330926 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Related to the error: The element PBXReferenceProxy is not supported
I know that it's a rare case, but anyway ๐คทโโ๏ธ
Content that is written to a pbxproj is invalid if certain properties contains spaces or are empty:
For example
name = My cool name;
should be escaped to
name = "My cool name";
Implement the PBXProjWriter
that allows writing the project to disk.
I released Carting for adding and updating Carthage script. There are a few scripts using in almost every project, for example, Fabric, Carthage and SwiftLint. What do you think about adding of default scripts for your framework? And maybe I can help you with it.
It would also be nice to:
Hey !
First, thanks for your work!
I'm building a project that uses your library to get all the files within a given Xcode project. It works well for getting the information on iOS/macOS projects but it crashed when I try it on Frameworks (e.g. Alamofire).
I'm on macOS 10.12.6 and I'm using the version 0.0.9.
When I try to open a Framework, it crashed at this line because the attribute runnableDebuggingMode
does not exist.
The function is called on this line and the attribute BuildableProductRunnable
passed in parameter does not exist either.
I saw on this line that if the value is not present, you set it to "0"
by default.
Maybe you could do something like this:
self.runnableDebuggingMode = element.attributes["runnableDebuggingMode"] ?? "0"
Where if the value does not exist, it sets the field to "0"
. I've tried it on my project and it works with no issue. If you're ok with it, I can do a pull request.
Thanks !
Today the new version of Xcode is officially released together with Swift 4. We should migrate xcodeproj to the new version of Swift, including the Package.swift
syntax.
Migrate xcodeproj to Swift 4
I tried to parse empty project (Xcode 8 or 9 generated).
Simple initialization:
let project = try XcodeProj(path: "ProjectName.xcodeproj")
Related to the error: [UnboxError] An error occurred while unboxing path "defaultConfigurationName": The key "defaultConfigurationName" is missing.
It seems that CommonCrypto is the only holdout for getting this working on Linux. I know that usually anything to do with Xcode probably won't run in a Linux machine but it's still nice to have.
As far as I can see CommonCrypto is only used for getting an md5 of a string that is then used in generateUUID()
. A hash function should work fine here as the counter is used to resolve any duplicates
Find a way to generate unique identifiers for PBXProj
objects.
All objects in the PBXProj
are uniquely identified. The purpose of this task is coming up with a way of generating those identifiers, making sure that they are unique across the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.