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

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by kateinoigakukun.
kateinoigakukun/swift-indexstore 0.2.0
SwiftIndexStore is a IndexStore reader library for Swift.
⭐️ 51
🕓 1 year ago
.package(url: "https://github.com/kateinoigakukun/swift-indexstore.git", from: "0.2.0")

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: 51
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.2.0
1 year ago

What's Changed

Full Changelog: https://github.com/kateinoigakukun/swift-indexstore/compare/0.1.5...0.2.0

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