Skip to content

mmorrisdev/iClaudius

Repository files navigation

iClaudius is an iMessage extension that uses the Anthropic Claude API to generate responses to texts as the Roman Emperor.

The extension requires a Claude API key to function. To install it on a device an Apple Developer account is also required.

The iClaudius project demonstrates several components

  • Using Swift UI in an iMessage extension by replacing the default Storyboard file
  • Constructing a URL request with model selection and other parameters for use with the Anthropic API
  • Basic prompt engineering to configure the response personality
  • Calling asynchronous functions from within a Swift UI structure

There are some differences in scrolling within the iMessage window, if you're experiencing issues with this, test the Swift UI in a stand alone app first to ensure its functionality.

The UX is outlined below, click an image for the full size version.

When installed on the device, go to iMessages and click the + sign to bring up the list of iMessage extensions.

Tap More to reveal the full list, and you will see iClaudius there.
Tap on the iClaudius icon to open the extension in your iMessages window
Copy the text message you want to respond to and paste it into the text field, or type in any text. Select if you want a normal response or a response from Emporer Claudius. and press send.
The response text is automatically added to the clipboard. Paste the response back in the main iMessage text field and press Return to send.

Shield: CC BY-NC 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

CC BY-NC 4.0

** iClaudius is not affiliated or related to the "I, Claudius" book or TV series.

Releases

No releases published

Packages

No packages published

Languages