Skip to content

Deploying to Device#

Once you've defined a procedure in Python, you need to serialize it and import it to the iOS app.

Serialization#

Convert your procedure to JSON:

import capturegraph.procedures as cgp

# Your procedure definition
procedure = my_procedure()

# Serialize to JSON string
json_string = cgp.procedure_to_json(procedure)

# Write to file
with open("MyProcedure.json", "w") as f:
    f.write(json_string)

Tip: Give your procedure a unique, descriptive name so it's easy to identify in the app.

Importing to iOS#

Transfer the JSON file to the CaptureGraph iOS app:

Option 1: Files App#

  1. Connect your device to your Mac
  2. Open Finder and select your device
  3. Navigate to FilesCaptureGraph
  4. Drag your .json file into the folder

Option 2: CaptureGraph Server#

For team deployments, upload procedures to the server:

  1. Upload your procedure JSON to the server
  2. Team members sync via the app
  3. Everyone gets the same procedure automatically

Verifying Import#

After importing:

  1. Open the CaptureGraph app
  2. Your procedure should appear in the procedure list
  3. Tap it to create a new Capture Target
  4. Run through the procedure to test

Next Steps#