Inspiration
project.pbxproj file is hell...
What it does
It convert project.pbxproj file to readable format.
.pbxproj file has flat dictionary structure for linking object, like
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
2222DA9F1E63CA9000D754A1 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2222DA991E63CA9000D754A1 /* Info.plist */; };
2222DAA01E63CA9000D754A1 /* Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 2222DA9A1E63CA9000D754A1 /* Logo.png */; };
2222DAA11E63CA9000D754A1 /* TodayController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2222DA9B1E63CA9000D754A1 /* TodayController.swift */; };
2222DAA41E63F0E300D754A1 /* TodayInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2222DAA61E63F0E300D754A1 /* TodayInterface.storyboard */; };
2222DAB11E64036A00D754A1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2222DAB31E64036A00D754A1 /* Localizable.strings */; };
2242EE9C1E5E783800133750 /* VenuesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2242EE9B1E5E783800133750 /* VenuesViewController.swift */; };
22C9804E1E5978B900C8C756 /* KingfisherExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22C9804D1E5978B900C8C756 /* KingfisherExtension.swift */; };
22CE18D11E5A2EB6002C035F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 22CE18D31E5A2EB6002C035F /* Localizable.strings */; };
22CE18D71E5A2F85002C035F /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22CE18D61E5A2F85002C035F /* StringExtension.swift */; };
...
we are tying to convert this to like
{
"isa" : "PBXProject",
"mainGroup" : [
[
[
"Base.lproj\/Localizable.strings",
"ja.lproj\/Localizable.strings"
],
"trySwift.entitlements",
"AppDelegate.swift",
[
"Base.lproj\/Main.storyboard"
],
[
[
"ScheduleViewController.swift",
"SessionsTableViewController.swift",
"SessionDetailsViewController.swift"
],
[
"SpeakersViewController.swift",
"SpeakerDetailViewController.swift"
],
[
"OfficeHoursDetailViewController.swift"
],
[
"SponsorsViewController.swift"
],
[
...
So now, by addiing converted json in your repository, you can see friendly diff on PR : )
Example: https://gist.github.com/yokomotod/ae39d54e0f8a97f8461769d7de7a5b8c
How I built it
swift command : )
Challenges I ran into
Be friend with project.pbxproj
Accomplishments that I'm proud of
- Easy to browse
project.pbxproj
What I learned
- How to use Swift Package Manager
- How to build Swift command line tool with Commandant
- ... and structure of
project.pbxproj
What's next for pbxprojson
- More friendly output
- Linting project settings
- Recognize settings from .xcconfig file
Log in or sign up for Devpost to join the conversation.