-
Notifications
You must be signed in to change notification settings - Fork 47
feat: Add Swift SDK for MCP Apps #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ochafik
wants to merge
24
commits into
main
Choose a base branch
from
ochafik/swift-sdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,312
−2
Draft
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
df60c48
feat: Add Swift SDK for MCP Apps
ochafik 4f7916c
Merge main into swift-sdk
ochafik 4b23834
chore: Remove non-existent Kotlin SDK references
ochafik 4961d00
fix: Update Swift SDK tests for API changes
ochafik 13cf904
feat: Display server name above tool name in cards
ochafik b8534d4
feat(swift-host): Add teardown pattern when removing tool calls
ochafik af07189
fix(swift-host): Actually await teardown before removing card
ochafik 5277436
Merge origin/main into ochafik/swift-sdk
ochafik b46c805
feat(swift-host): Add visual feedback during teardown
ochafik 4686fa5
fix(swift-host): Robust teardown with single source of truth
ochafik 35d20ff
update .prettierignore
ochafik b2ff5db
fix(swift-sdk): Fix teardown params and WebView lifecycle
ochafik 2268d5e
feat(swift-host): Add toast notifications for teardown errors
ochafik 8295077
fix(swift): Add request timeout and initialization check for teardown
ochafik 72c8b82
feat(swift-sdk): reduce sendResourceTeardown default timeout to 0.5s
ochafik 6271126
fix(swift-host): update example to use new typed params API
ochafik 3c0aec9
Merge main into swift-sdk
ochafik c86ddf2
Merge origin/main into ochafik/swift-sdk
ochafik 5561c9b
Merge main into swift-sdk
ochafik cbe0a60
Merge remote swift-sdk and main
ochafik da0b36f
ci: remove kotlin job (no kotlin folder on this branch)
ochafik 1354767
Merge remote-tracking branch 'origin/main' into ochafik/swift-sdk
ochafik ac927cd
fix: update Swift host example for new AppBridge API + fix multi-line…
ochafik 5f0a3b0
feat(swift-host): add structuredContent support + JS console logging
ochafik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Xcode | ||
| .DS_Store | ||
| */build/* | ||
| *.pbxuser | ||
| !default.pbxuser | ||
| *.mode1v3 | ||
| !default.mode1v3 | ||
| *.mode2v3 | ||
| !default.mode2v3 | ||
| *.perspectivev3 | ||
| !default.perspectivev3 | ||
| xcuserdata/ | ||
| *.xccheckout | ||
| *.moved-aside | ||
| DerivedData/ | ||
| *.hmap | ||
| *.ipa | ||
| *.xcuserstate | ||
| project.xcworkspace/ | ||
|
|
||
| # Swift Package Manager | ||
| .build/ | ||
| .swiftpm/ | ||
|
|
||
| # CocoaPods | ||
| Pods/ | ||
|
|
||
| # Intermediate outputs | ||
| intermediate-outputs/ | ||
| build/ | ||
| .build/ | ||
| *.xcodeproj/ | ||
| DerivedData/ | ||
| Package.resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // swift-tools-version: 6.0 | ||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "BasicHostSwift", | ||
| platforms: [ | ||
| .iOS(.v16), | ||
| .macOS(.v13) | ||
| ], | ||
| products: [ | ||
| .executable( | ||
| name: "BasicHostSwift", | ||
| targets: ["BasicHostApp"] | ||
| ), | ||
| ], | ||
| dependencies: [ | ||
| // Local MCP Apps Swift SDK | ||
| .package(path: "../../swift"), | ||
| // MCP Swift SDK for MCP client (using spec-update branch with _meta support) | ||
| .package(url: "https://github.com/ajevans99/swift-sdk.git", branch: "spec-update"), | ||
| ], | ||
| targets: [ | ||
| .executableTarget( | ||
| name: "BasicHostApp", | ||
| dependencies: [ | ||
| .product(name: "McpApps", package: "swift"), | ||
| .product(name: "MCP", package: "swift-sdk"), | ||
| ], | ||
| path: "Sources/BasicHostApp" | ||
| ), | ||
| ] | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.