IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
- 17k
- Swift
- MIT
- 8 wk ago
The maintainer has not written a description at the source.
Repo hackiftekhar/IQAIProvider, read from GitHub 1 min ago. hackiftekhar has not joined Take My Repo.
hackiftekhar/IQAIProvider is a public repo on GitHub by hackiftekhar. It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it. It is written mainly in Swift, has 0 stars and last changed on 2026-09-11. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Swift package for talking to multiple LLM backends through one API. You pick a provider product (AIOpenAI, AIClaude, AIGemini, or AIApple), send an AIRequest, and get an AIResponse. Tool loops, session history, and wire formats stay inside the package.
Platforms: iOS 16+, macOS 14+. Apple Foundation Models require iOS 26+ / macOS 26+ and a device where the model is .available.
https://github.com/hackiftekhar/IQAIProvider.git
Add only the provider you need. Each provider product re-exports shared types (AIRequest, AIProvider, AITurn, transporters, and so on), so a single import is enough.
| Product | Import | What you get |
|---|---|---|
AIOpenAI |
import AIOpenAI |
OpenAIProvider, OpenAITransporter (OpenAI Responses API) |
AIClaude |
import AIClaude |
ClaudeProvider, ClaudeTransporter (Anthropic Messages API) |
AIGemini |
import AIGemini |
GeminiProvider, GeminiTransporter (generateContent) |
AIApple |
import AIApple |
AppleProvider (on-device, no API key) |
AIConversation |
import AIConversation |
AIConversationStore, AITurn, AIPart (optional; already re-exported by providers) |
Internal targets (not products): AICore (shared request/response/tools) and AITransporter (HTTP JSON). Apps do not add those as dependencies.
flowchart TB
App["Your app"]
subgraph products [Public products]
OpenAI["AIOpenAI"]
Claude["AIClaude"]
Gemini["AIGemini"]
Apple["AIApple"]
Conv["AIConversation"]
end
Core["AICore"]
Transport["AITransporter"]
Store["AIConversationStore.shared"]
Wire["Provider wire state"]
App --> OpenAI
App --> Claude
App --> Gemini
App --> Apple
OpenAI --> Core
Claude --> Core
Gemini --> Core
Apple --> Core
Core --> Conv
OpenAI --> Transport
Claude --> Transport
Gemini --> Transport
Transport --> HTTP["HTTPJSONTransporter"]
OpenAI --> Store
Claude --> Store
Gemini --> Store
Apple --> Store
OpenAI --> Wire
Claude --> Wire
Gemini --> Wire
Apple --> Wire
AIRequest and calls provider.complete.AITransporter (except Apple, which is on-device).AIConversationStore keyed by sessionID (full text plus tool calls/results).previous_response_id. Apple keeps a LanguageModelSession plus the same transcript store.Xcode: File → Add Package Dependencies… → paste the Git URL → add the products you use.
Package.swift:
dependencies: [ .package(url: "https://github.com/hackiftekhar/IQAIProvider.git", branch: "main") ], targets: [ .target( name: "MyApp", dependencies: [ .product(name: "AIOpenAI", package: "IQAIProvider"), // .product(name: "AIClaude", package: "IQAIProvider"), // .product(name: "AIGemini", package: "IQAIProvider"), // .product(name: "AIApple", package: "IQAIProvider"), ] ) ]
import AIOpenAI let provider = OpenAIProvider( transporter: OpenAITransporter(apiKey: apiKey), defaultModel: "gpt-4.1-mini" ) let response = try await provider.complete( AIRequest( system: "You are a concise coach.", user: "What should I eat after a lift?", sessionID: "chat-1" ), onProgress: { event in if case .partialText(_, let text) = event { // Ephemeral in-flight text snapshot print(text) } } ) print(response.text)
OpenAITransporter POSTs to https://api.openai.com/v1/responses. Built-in HTTP transporters conform to AIStreamingTransporter for SSE. You can still inject any JSON-only AITransporter (proxy, Firebase callable, mock); those calls fall back to one-shot responses.
import AIClaude let provider = ClaudeProvider( transporter: ClaudeTransporter(apiKey: apiKey), defaultModel: "claude-sonnet-4-6", maxTokens: 1500 )
ClaudeTransporter POSTs to https://api.anthropic.com/v1/messages with x-api-key and anthropic-version.
import AIGemini let provider = GeminiProvider( transporter: GeminiTransporter(apiKey: apiKey, model: "gemini-2.0-flash") )
The model is part of the Gemini URL. GeminiTransporter calls ...:generateContent for one-shot and ...:streamGenerateContent?alt=sse for streaming.
import AIApple if #available(iOS 26.0, *) { let provider = AppleProvider() let response = try await provider.complete( AIRequest(system: "Be brief.", user: "Suggest a 20-minute workout") ) }
No transporter and no API key. Generic AITool values are supported through Foundation Models' native on-device tool loop, alongside structured outputSchema. For this provider, maxToolRounds is a hard cap on total tool invocations because the native framework does not expose model-round counts. Check availability before selecting this provider (SystemLanguageModel.default.availability == .available).
Imported automatically with any provider.
AIProviderfunc complete(_ request: AIRequest) async throws -> AIResponse func complete( _ request: AIRequest, onProgress: (@Sendable (AIProgress) -> Void)? ) async throws -> AIResponse func completeEvents(_ request: AIRequest) -> AsyncThrowingStream<AICompletionEvent, Error> func transcript(for sessionID: String) async -> [AITurn] // full history, including tools func displayTranscript(for sessionID: String) async -> [AITurn] // text-only, for UI func clearSession(_ id: String) async
AIProgress is the in-flight lifecycle. partialText is a snapshot (replace pending UI; do not append) and is not a displayable transcript turn.
enum AIProgress { case requestStarted case partialText(delta: String, accumulated: String) case toolStarted(id: String, name: String) case toolFinished(id: String, name: String) case requestFinished // always, success or failure } enum AICompletionEvent { case progress(AIProgress) case finished(AIResponse) }
Use onProgress (or completeEvents in SwiftUI) to show a live bubble while tools run. After complete returns, keep using displayTranscript for chat history.
for try await event in provider.completeEvents(request) { switch event { case .progress(.requestStarted): pending = nil case .progress(.partialText(_, let accumulated)): pending = accumulated case .progress(.requestFinished): pending = nil case .finished(let response): print(response.text) default: break } }
Omit onProgress (or call complete(request)) when you only need the final AIResponse.
AIRequest| Field | Role |
|---|---|
system |
System / instructions |
user |
This turn’s user text |
model |
Optional override. OpenAI uses defaultModel when nil. Claude uses its default. Gemini’s model is on the transporter URL. |
sessionID |
When set, history and transcripts are stored. When nil, the call is stateless. |
maxToolRounds |
Cap on local tool iterations (default 10) |
historyLimit |
Optional Claude/Gemini replay window override for this call. |
promptCaching |
Enable provider-specific prompt cache controls (default true). |
promptCacheKey |
Optional OpenAI prompt_cache_key. |
tools |
[AnyTool] — empty means no tools |
outputSchema |
Optional JSON Schema for structured output |
AIResponsetext (final assistant string) and sessionID.
AIErrornetwork, timeout, unauthorized, rateLimited, decoding, validation(String), emptyResult, maxToolRoundsExceeded, featureUnavailable, unknown(String).
AIConversationStore.shared is process-wide and in-memory. All providers write the same session ID, so switching OpenAI ↔ Claude still shows the same UI bubbles. History does not survive process death.
Each turn is an AITurn with role (.user / .assistant) and parts:
.text — user or assistant prose.toolCall — name, call id, arguments JSON.toolResult — name, call id, result JSONlet full = await provider.transcript(for: sessionID) let ui = await provider.displayTranscript(for: sessionID) // or: full.displayTurns await provider.clearSession(sessionID)
displayTranscript / displayTurns so tool calls do not appear in chat bubbles.complete with the same sessionID rebuilds vendor history from the full transcript (including tools).previous_response_id (disk, Application Support). The shared store still records text and tools for your UI.Omit sessionID for a one-shot call that is not stored.
Define an AITool, wrap it in AnyTool, put it on the request. The provider calls execute when the model requests that name.
import AIOpenAI struct SearchFoodsTool: AITool { struct Arguments: Decodable { var query: String } struct Result: Encodable { var names: [String] } let name = "search_foods" let description = "Search the food catalog by name." let parameters = ToolParameters( properties: [ "query": ToolProperty(type: .string, description: "Food name") ], required: ["query"] ) func execute(arguments: Arguments) async throws -> Result { Result(names: ["chicken", "rice"]) } } let response = try await provider.complete( AIRequest( system: "Use tools to look up foods. Do not invent catalog rows.", user: "Log grilled chicken.", sessionID: "meals", maxToolRounds: 8, tools: [AnyTool(SearchFoodsTool())] ) )
ToolProperty.ValueType: string, number, integer, boolean, object, array.
Apple Foundation Models accepts the same AnyTool list. It invokes tools through its native loop, records calls and results in the shared transcript, and caps total invocations with maxToolRounds.
Pass OutputSchema (JSON Schema object). Providers map it to OpenAI json schema, Claude output config, Gemini responseJsonSchema, or Apple DynamicGenerationSchema.
In the demo app, structured output is intentionally scoped to assistant informational chat replies. Tool-heavy logging flows (meals/workouts/kitchen) stay unconstrained so tool orchestration remains reliable.
let schema = try OutputSchema( name: "meal", schema: JSONSchemaObject( properties: [ "food": .string(description: "Catalog name"), "kcal": .integer(description: "Calories") ], required: ["food", "kcal"] ) ) let request = AIRequest( system: "Return JSON only.", user: "I ate an apple.", outputSchema: schema )
You can also pass a raw [String: Any] schema to OutputSchema(name:schema:).
AITransporter is one round-trip:
public protocol AITransporter: Sendable { func send(_ payload: [String: Any]) async throws -> [String: Any] }
HTTPJSONTransporter POSTs JSON to any URL with extra headers. Built-in vendor transporters wrap it:
| Type | Default endpoint |
|---|---|
OpenAITransporter |
POST /v1/responses + Authorization: Bearer |
ClaudeTransporter |
POST /v1/messages + x-api-key |
GeminiTransporter |
POST .../models/{model}:generateContent?key= |
To proxy or mock:
struct ProxyTransporter: AITransporter { func send(_ payload: [String: Any]) async throws -> [String: Any] { // Forward payload to your backend; return the vendor JSON object } } let provider = OpenAIProvider(transporter: ProxyTransporter())
The provider still owns tool execution. Your proxy should return one model response per send.
| OpenAI | Claude | Gemini | Apple | |
|---|---|---|---|---|
| API | Responses | Messages | generateContent | Foundation Models |
| Auth | API key on transporter | API key on transporter | API key in URL | None |
| Tools | Yes | Yes | Yes | Yes, on-device |
| Session continuation | previous_response_id |
Replay AIConversation |
Replay AIConversation |
LanguageModelSession with transcript rehydration |
| Default model | gpt-4.1-mini |
claude-sonnet-4-6 |
gemini-2.0-flash (transporter) |
System default |
Wire helpers live next to each provider (OpenAIWire, ClaudeWire, GeminiWire) and are not part of the app-facing API.
Package.swift
AIConversation/Sources/AIConversation/
AITurn.swift # AITurn, AIPart, displayTurns
AIConversationStore.swift # in-memory store by sessionID
AICore/Sources/AICore/
AIProvider.swift # protocol + displayTranscript
AIRequest.swift / AIResponse.swift / AIError.swift
AIProgress.swift # AIProgress, AICompletionEvent
OutputSchema.swift / JSONSchema.swift / JSONValue.swift
Tool/AITool.swift, AnyTool.swift, ToolParameters.swift, ToolProperty.swift
AITransporter/Sources/AITransporter/
AITransporter.swift
HTTPJSONTransporter.swift
AIOpenAI/Sources/AIOpenAI/
OpenAIProvider.swift / OpenAITransporter.swift / OpenAIWire.swift
OpenAIResponseIDStore.swift # disk previous_response_id
AIClaude/Sources/AIClaude/
ClaudeProvider.swift / ClaudeTransporter.swift / ClaudeWire.swift
ClaudeConversationBridge.swift
AIGemini/Sources/AIGemini/
GeminiProvider.swift / GeminiTransporter.swift / GeminiWire.swift
GeminiConversationBridge.swift
AIApple/Sources/AIApple/
AppleProvider.swift / AppleToolAdapter.swift / AppleSessionStore.swift
The Xcode project IQAIProvider Demo is a sample fitness/kitchen coach named Pulse. It is not required to use the package.
It shows:
AIRequest with catalog tools (CoachTools)displayTranscript, with live intermediate text while tools runsessionID UUIDs per process (dashboard, meals, train, kitchen)Open IQAIProvider Demo.xcodeproj, add keys in Settings, run on a simulator or device.
swift testAICoreTests covers JSON value round-trips and conversation store display filtering.
hackiftekhar/IQAIProvider is a public repo on GitHub by hackiftekhar. Its maker has not written a description.
It declares no license on GitHub. Public does not mean open source: without a license, nobody is granted the right to reuse it.
Its maker tagged it for macOS. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-09-11. GitHub counts 0 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.

A drop-in universal library allows to record audio within the app with a nice User Interface.

Audio Image Video Picker Controller

This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/hackiftekhar/IQAIProviderTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.