Skip to main content

tomnvt

ios-debug

ios-debug is a tool for creating and managing mock implementation. It currently creates a mock implementation for each repository protocol within an iOS project.

THREE THINGS...

...that the app is expected to have:

  • there are repository protocols conforming to ...Repository naming convention
  • there is a single rootViewController assigned (doesn't matter in which file)
  • there is a ContainerBuilder.swift file with registerRepositoryLayer function

INSTALLATION

If you have some version of pip, either pip install ios-debug or pip3 install ios-debug should do the job.

USAGE

There is a simple console UI that show when ios-debug is called. Names of the shown options should be pretty self-explanatory :-)

Each command can be also called by passing it as an argument to ios-debug, e.g. ios-debug start or ios-debug stop.

WHEN IT STARTS

When the debug mode is starting, the following happens:

  1. Swift files are gathered and read
  2. Repository protocols are found
  3. Protocols are parsed and function declarations are extracted
  4. Repository mock implementation template is processed so there is a mock implementation for each protocol function for each repository. Also, Container registration are generated, overriding the origin registration.
  5. Registration functions are added to registerRepositoryLayer function in ContainerBuilder.
  6. MockManager and ShakeableNavigationController are generated.
    • MockManager enables user to choose different mock function implementations at runtime.
    • ShakeableNavigationController is used as rootViewController. It responds to shake gesterus by showing the MockManager.
  7. rootViewController is reassigned to ShakeableNavigationController.
  8. A Run Script build phase is added in order to sync* mock function variants and protocol functions during build.

WHEN IT STOPS

When the debug mode is stopping, the following happens:

  1. Swift files are gathered and read.
  2. All mock repositories are gathered and saved to a binary file.
  3. Calls to registration function are removed from ContainerBuilder.
  4. MockManager and ShakeableNavigationController are removed and ShakeableNavigationController is unassigned as rootViewController.
  5. The Run Script build phase is removed from the project.

*Syncing is basically just turning the debog mode off and on again. The whole process is designed to be a function of the code's state, so there are minimal side effect expectation during the processing.

Metadata

Release files for ios-debug 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ios-debug 0.1.6
File Size Uploaded Provenance Actions
ios-debug-0.1.6.tar.gz 14.6 kB Without provenance Details for ios-debug-0.1.6.tar.gz

Release files / ios-debug-0.1.6.tar.gz

Download URL ios-debug-0.1.6.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
399e579c75d4ad1cb6f6fce976918d4499600e2ea1b937c82a11c2fceb8bce25
BLAKE2b-256 checksum
How to use checksums
106b359968dfdffb5d5fd63450237f7e91d51c5494f5165a27b4570591687126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Security for ios-debug 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page