Skip to content

Instantly share code, notes, and snippets.

View embassem's full-sized avatar
🎯
Focusing

Bassem Tourky embassem

🎯
Focusing
View GitHub Profile
@zoltan-magyar
zoltan-magyar / xcode-claude-code-third-party.md
Last active February 12, 2026 17:54
Xcode Claude Code integration with third-party APIs

Setting Up Xcode Claude Code with Third-Party API Endpoints

This guide explains how to configure Xcode's built-in Claude Code integration to work with third-party API endpoints instead of the official Anthropic API.

Step 1: Bypass the Authentication UI

Xcode normally requires signing in through the UI with an Anthropic account or API key and doesn't offer any bypass. Even if the Xcode internal claude can use your third-party endpoint Xcode won't send any query because YoU ARe NOt LOgGeD IN. To bypass this when using a third-party endpoint, set a placeholder API key override, which you cannot do through the UI:

defaults write com.apple.dt.Xcode IDEChatClaudeAgentAPIKeyOverride ' '
@MRKMKR
MRKMKR / docker-compose.yml
Created October 24, 2025 13:26
Using GLM-4.6 with Xcode 26 via LiteLLM Proxy
services:
litellm:
image: ghcr.io/berriai/litellm:main-latest
container_name: glm-proxy
ports:
- "4000:4000"
volumes:
- ./litellm_config.yaml:/app/config.yaml
command: --config /app/config.yaml
restart: unless-stopped
@AlexKobachiJP
AlexKobachiJP / XcodeCommand
Last active June 1, 2024 20:26
Sort file and package references in an Xcode project.
// Copyright © 2023 Alex Kovács. All rights reserved.
import ArgumentParser
import Foundation
import PathKit
import XcodeProj
// See below for `MainCommand` skeleton.
extension MainCommand {
struct XcodeCommand: ParsableCommand {
@lukaskubanek
lukaskubanek / Bundle+TestFlight.swift
Last active September 29, 2025 14:26
A code snippet for detecting the TestFlight environment for a macOS app at runtime
/// MIT License
///
/// Copyright (c) 2021 Lukas Kubanek, Structured Path GmbH
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
//
// CardPagingLayout.swift
//
// Created by Ahmed Fathi on 5/29/20.
// Copyright © 2020 Ahmed Fathi. All rights reserved.
//
import UIKit
class CardPagingLayout: UICollectionViewLayout {
@SergLam
SergLam / UIApplication+Environment.swift
Created January 16, 2020 18:56
Swift - check iOS app environment (debug OR TestFlight build) at runtime
import UIKit
extension UIApplication {
// MARK: Public
func isRunningInTestFlightEnvironment() -> Bool {
if isSimulator() {
return false
} else {
if isAppStoreReceiptSandbox() && !hasEmbeddedMobileProvision() {
@sukov
sukov / CodableExtension.swift
Last active January 28, 2026 12:55 — forked from mikebuss/decode-json-swift.swift
Codable (Encode & Decode) [Any] and [String: Any] Swift 5
// Original: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
import Foundation
private struct JSONCodingKeys: CodingKey {
var stringValue: String
init(stringValue: String) {
self.stringValue = stringValue
}
@beloso
beloso / flat-swift4-noncaching.stencil
Created May 8, 2018 16:04
SwiftGen non caching Strings template
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
{% if tables.count > 0 %}
{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %}
import Foundation
// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length
{% macro parametersBlock types %}{% filter removeNewlines:"leading" %}
{% for type in types %}
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@durul
durul / Xcode 26 Defaults.md
Last active November 21, 2025 16:14
Xcode Defaults

Xcode Defaults

Command Line

# Enable internal menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -bool YES

# Enable project build time