Skip to content

Instantly share code, notes, and snippets.

View mcfans's full-sized avatar
🏠
Working from home

mcfans

🏠
Working from home
View GitHub Profile
@everyplace
everyplace / Disable Xcode's permissions checks.md
Last active March 31, 2026 20:34
Configure Xcode 26.3 with agent support to use the iOS-simulator mcp server

Disable Xcode's agent permissions checks

Note

This addresses the concern of "how to get Xcode's agent support to reach outside of itself without asking for permission" but does not address the reverse of "how to get a terminal agent to talk to Xcode without prompting."

This is basically the equivalent of running something like claude --dangerously-skip-permissions, so... probably this is a bad idea.

defaults write com.apple.dt.Xcode IDEChatAgenticChatSkipPermissions -bool YES

When you set this flag, after you initiate a session with Claude Agent in Xcode, if you go to terminal and run ps -ax | grep danger you will see the claude agent process has --dangerously-skip-permissions passed directly to it from Xcode.

@T1T4N
T1T4N / CustomPlainButtonStyle.swift
Created September 19, 2019 13:41
A custom ButtonStyle that extends PlainButtonStyle functionality
struct CustomPlainButtonStyle: PrimitiveButtonStyle {
func makeBody(configuration: Self.Configuration) -> some View {
// reuse the original button action
Button(action: configuration.trigger, label: {
// configure the button label to our needs
configuration.label
.frame(width: 200, height: 200)
.foregroundColor(Color.red)
.background(Color.green)
})
@Arthraim
Arthraim / hairline.m
Last active October 29, 2018 07:40
Hairline of iOS
/**
* Width of hairline (1px on real device screen)
* The dppx of screens can be found here http://dpi.lv/
*
* @return CGFloat number to be set for "1px"
*/
+ (CGFloat)hairLineWidth {
if ([UIScreen mainScreen].bounds.size.width == 414.f) { // Plus
return 1.f / 2.46f; // 2.46 is the dppx of plus screens
} else {