Swiftpack.co - kateinoigakukun/swift-indexstore as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
kateinoigakukun/swift-indexstore
SwiftIndexStore is a IndexStore reader library for Swift.
.package(url: "https://github.com/kateinoigakukun/swift-indexstore.git", from: "0.1.5")

SwiftIndexStore

⚠️ This library API is not stable yet

SwiftIndexStore is a IndexStore reader library for Swift.

This library uses libIndexStore to derive data from index directory generated by Xcode. For more information about libIndexStore, and producing raw indexing data, see the Indexing While Building whitepaper.

Example Users

  • swift-renamer: A tool that renames Swift identifiers in project.

Adding SwiftIndexStore as a Dependency

To use the SwiftIndexStore library in a SwiftPM project, add the following line to the dependencies in your Package.swift file:

.package(url: "https://github.com/kateinoigakukun/swift-indexstore", .branch("master")),

Development

If you want to dump the content of IndexStore, you can use index-dump-tool.

$ swift run index-dump-tool print-record --index-store-path path/to/IndexStore
=============================
Unit: "ViewModel.o-366G7N49CIUXI"
------------------------------
Record: "/Applications/Xcode-11.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface"
------------------------------
Record: "/var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift"
----------Symbols----------
| usr = s:9ViewModelAACABycfc | name = init() | kind = constructor | subKind = none | language = swift |
| usr = s:9ViewModelAAC | name = ViewModel | kind = class | subKind = none | language = swift |
| usr = s:9ViewModelAAC4nameSSvg | name = getter:name | kind = instanceMethod | subKind = accessorGetter | language = swift |
| usr = s:9ViewModelAAC4nameSSvp | name = name | kind = instanceProperty | subKind = none | language = swift |
| usr = s:9ViewModelAAC4nameSSvs | name = setter:name | kind = instanceMethod | subKind = accessorSetter | language = swift |
| usr = s:SS | name = String | kind = struct | subKind = none | language = swift |
----------Occurrences----------
| roles = Roles(["definition", "implicit", "childOf"]) | usr = s:9ViewModelAACABycfc | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:1:7 |
| roles = Roles(["definition"]) | usr = s:9ViewModelAAC | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:1:7 |
| roles = Roles(["definition", "implicit", "childOf", "accessorOf"]) | usr = s:9ViewModelAAC4nameSSvg | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:2:7 |
| roles = Roles(["definition", "implicit", "childOf", "accessorOf"]) | usr = s:9ViewModelAAC4nameSSvs | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:2:7 |
| roles = Roles(["definition", "childOf"]) | usr = s:9ViewModelAAC4nameSSvp | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:2:7 |
| roles = Roles(["reference"]) | usr = s:SS | location = /var/folders/br/7sr_p7cj7v549x_gtkb33df00000gp/T/tmp.1FkAuTE5/ViewModel.swift:2:13 |

GitHub

link
Stars: 38
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

0.1.5
1 week ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics