errordomain=nscocoaerrordomain&errormessage=belirtilen kestirme bulunamadı.&errorcode=4 error occurs when Apple systems configured for Turkish localization cannot locate specified shortcuts due to Turkish character encoding conflicts (ç, ğ, ı, ö, ş, ü), case sensitivity issues with dotted/dotless i, or regional path mapping problems in file system operations.
System Configuration Diagnostics
Locale Verification
# Verify locale settings
locale | grep "tr_TR"
echo $LANG # Should display tr_TR.UTF-8
# Check language priority
defaults read NSGlobalDomain AppleLanguages | head -3
# Should show "tr-TR" or "tr" as primary
# Regional format verification
defaults read NSGlobalDomain AppleLocale
# Expected: tr_TR
Character Encoding Analysis
# Test character handling in system paths
test_character_encoding() {
local special_chars="çğıöşüÇĞIÖŞÜ"
echo "Testing characters in file paths..."
for char in $(echo $special_chars | fold -w1); do
test_path="/tmp/test_$char"
touch "$test_path" 2>/dev/null && rm "$test_path"
echo "Character $char: $([ $? -eq 0 ] && echo "✅" || echo "❌")"
done
# Special test for dotted/dotless i confusion
echo "Testing i/ı/I/İ variants..."
for i_variant in "i" "ı" "I" "İ"; do
test_path="/tmp/test_$i_variant"
touch "$test_path" 2>/dev/null && rm "$test_path"
echo "Character $i_variant: $([ $? -eq 0 ] && echo "✅" || echo "❌")"
done
}
How to Fix errordomain=nscocoaerrordomain&errormessage=belirtilen kestirme bulunamadı.&errorcode=4 Error On macOS?
Character Path Resolution
#!/bin/bash
# Shortcuts repair for character encoding issues
echo "🔧 Kısayol onarımı başlatılıyor..."
# Stop localized processes
killall "Kısayollar" 2>/dev/null
killall "Shortcuts" 2>/dev/null
# Backup directory with proper encoding
backup_dir="$HOME/Masaüstü/kısayol_yedeği_$(date +%d_%m_%Y_%H%M)"
mkdir -p "$backup_dir"
# Check for special characters in existing shortcuts
find "$HOME/Library/Services" -name "*[çğıöşü]*" -o -name "*[ÇĞIÖŞÜ]*" 2>/dev/null
# Check specifically for dotted/dotless i issues
find "$HOME/Library/Services" -name "*i*" -o -name "*ı*" -o -name "*I*" -o -name "*İ*" 2>/dev/null | while read file; do
if [[ "$file" =~ [iıIİ] ]]; then
echo "Dotted/dotless i detected in: $file"
fi
done
# Encoding setup
export LC_ALL=tr_TR.UTF-8
export LANG=tr_TR.UTF-8
echo "✅ Onarım tamamlandı"
Directory Structure Mapping
# Map localized directory names to system equivalents
create_directory_mapping() {
local home="$HOME"
# Check for localized directories
localized_dirs=(
"Masaüstü:Desktop"
"Belgeler:Documents"
"İndirilenler:Downloads"
"Resimler:Pictures"
"Filmler:Movies"
"Müzik:Music"
)
for mapping in "${localized_dirs[@]}"; do
localized_name="${mapping%:*}"
english_name="${mapping#*:}"
if [[ -d "$home/$localized_name" ]]; then
echo "Klasör tespit edildi: $localized_name"
# Create compatibility symlink if needed
[[ ! -L "$home/$english_name" ]] && ln -sf "$home/$localized_name" "$home/$english_name"
fi
done
}
iOS Settings Navigation
iOS Interface Paths
# iOS settings structure
ios_settings_paths() {
cat << EOF
Ayarlar > Genel > Dil ve Bölge > iPhone Dili
Ayarlar > Kısayollar > Kısayollarım
Ayarlar > Siri ve Arama > Kısayollarım
Ayarlar > [Adınız] > iCloud > Kısayollar
EOF
}
# iOS reset procedure
ios_reset_procedure() {
cat << EOF
1. Ayarlar > Genel > iPhone Depolama > Kısayollar > Uygulamayı Kaldır
2. Cihazı yeniden başlat
3. App Store > Kısayollar > Yükle
4. Ayarlar > iCloud > Kısayollar (Aç)
EOF
}
Developer Solutions for Special Characters
Character Normalization
class SpecialCharacterHandler {
private let characterMappings: [Character: String] = [
'ç': "c", 'Ç': "C",
'ğ': "g", 'Ğ': "G",
'ı': "i", 'I': "I", // Note: dotless i maps to regular i
'İ': "I", // Dotted capital I maps to regular I
'ö': "o", 'Ö': "O",
'ş': "s", 'Ş': "S",
'ü': "u", 'Ü': "U"
]
func normalizeCharactersInPath(_ path: String) -> String {
var normalized = path
for (specialChar, latinChar) in characterMappings {
normalized = normalized.replacingOccurrences(of: String(specialChar), with: latinChar)
}
return normalized
}
func detectSpecialCharacters(in text: String) -> Bool {
return text.contains { characterMappings.keys.contains($0) }
}
func handleDottedIssue(_ text: String) -> String {
// Handle i/ı confusion specifically
var corrected = text
// Common i/ı patterns that cause issues
let iPatterns = [
("İstanbul", "Istanbul"),
("İndir", "Indir"),
("Sıkıştır", "Sikistir"),
("Açılış", "Acilis")
]
for (original, latin) in iPatterns {
corrected = corrected.replacingOccurrences(of: original, with: latin)
}
return corrected
}
func handleShortcutError(_ error: NSError) {
guard error.domain == NSCocoaErrorDomain && error.code == 4 else { return }
if let filePath = error.userInfo[NSFilePathErrorKey] as? String {
if detectSpecialCharacters(in: filePath) {
print("⚠️ Dosya yolunda özel karakter tespit edildi")
print("Orijinal yol: \(filePath)")
print("Normalleştirilmiş yol: \(normalizeCharactersInPath(filePath))")
// Check for dotted/dotless i specific issues
if filePath.contains("i") || filePath.contains("ı") || filePath.contains("İ") || filePath.contains("I") {
print("⚠️ Noktalı/noktasız i sorunu tespit edildi")
print("Düzeltilmiş yol: \(handleDottedIssue(filePath))")
}
// Suggest creating normalized version
let normalizedPath = normalizeCharactersInPath(filePath)
if FileManager.default.fileExists(atPath: normalizedPath) {
print("✅ Normalleştirilmiş yolda dosya bulundu")
}
}
}
}
}
Locale-Aware Shortcut Creation
class RegionalShortcutManager {
private let characterHandler = SpecialCharacterHandler()
func createCompatibleShortcut(title: String, intent: INIntent) {
// Check if system is configured for region
guard isRegionalSystem() else {
print("⚠️ Sistem bölgesel ayarlar için yapılandırılmamış")
return
}
// Normalize title for file system compatibility
let safeTitle = characterHandler.normalizeCharactersInPath(title)
let iHandledTitle = characterHandler.handleDottedIssue(safeTitle)
do {
let shortcut = INShortcut(intent: intent)
// Set both original and normalized titles
shortcut.shortcut?.localizedShortcutTitle = title
shortcut.shortcut?.identifier = iHandledTitle
INVoiceShortcutCenter.shared.setShortcutSuggestions([shortcut])
print("✅ Kısayol oluşturuldu: '\(title)'")
if title != iHandledTitle {
print("📝 Normalleştirilmiş ID: '\(iHandledTitle)'")
}
} catch let error as NSError {
characterHandler.handleShortcutError(error)
}
}
private func isRegionalSystem() -> Bool {
let locale = Locale.current
return locale.languageCode == "tr" || locale.regionCode == "TR"
}
}
Encoding Migration Tools
Legacy Encoding Conversion
#!/bin/bash
# Convert legacy encoding to UTF-8
convert_legacy_encoding() {
local shortcuts_dir="$HOME/Library/Services"
echo "ISO-8859-9'dan UTF-8'e dönüştürme..."
find "$shortcuts_dir" -name "*.workflow" -type d | while read -r workflow; do
local info_plist="$workflow/Contents/Info.plist"
if [[ -f "$info_plist" ]]; then
# Check for encoding issues
if file "$info_plist" | grep -q "Non-ASCII"; then
echo "Dönüştürülüyor: $(basename "$workflow")"
# Backup original
cp "$info_plist" "$info_plist.backup"
# Convert ISO-8859-9 to UTF-8
iconv -f ISO-8859-9 -t UTF-8 "$info_plist.backup" > "$info_plist" 2>/dev/null || {
# Fallback to CP1254 if ISO-8859-9 fails
iconv -f CP1254 -t UTF-8 "$info_plist.backup" > "$info_plist" 2>/dev/null || {
# Restore backup if conversion fails
mv "$info_plist.backup" "$info_plist"
echo "❌ Dönüştürülemedi: $(basename "$workflow")"
}
}
fi
fi
done
echo "✅ Kodlama dönüştürme tamamlandı"
}
Keyboard Layout Configuration
# Configure keyboard layouts
setup_keyboard_layouts() {
# Enable Q keyboard layout
defaults write com.apple.HIToolbox AppleEnabledInputSources -array-add \
'<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>179</integer>
<key>KeyboardLayout Name</key>
<string>Turkish-Q</string>
</dict>'
# Enable F keyboard layout (alternative)
defaults write com.apple.HIToolbox AppleEnabledInputSources -array-add \
'<dict>
<key>InputSourceKind</key>
<string>Keyboard Layout</string>
<key>KeyboardLayout ID</key>
<integer>178</integer>
<key>KeyboardLayout Name</key>
<string>Turkish-F</string>
</dict>'
# Set regional time zone
sudo systemsetup -settimezone "Europe/Istanbul"
echo "✅ Klavye düzeni yapılandırıldı"
}
Regional iCloud Settings
iCloud Configuration
# Configure iCloud for regional accounts
configure_regional_icloud() {
# Set country code
defaults write com.apple.bird countryCode "TR"
defaults write com.apple.bird languageCode "tr"
# Currency format
defaults write NSGlobalDomain AppleCurrencyCode "TRY"
# Calendar preferences (Monday as first day)
defaults write NSGlobalDomain AppleFirstWeekday -dict gregorian 2
# Number formatting
defaults write NSGlobalDomain AppleNumberFormat -dict \
DecimalSeparator "," \
ThousandsSeparator "."
# Restart iCloud daemon
killall bird
sleep 2
launchctl load ~/Library/LaunchAgents/com.apple.bird.plist
echo "✅ iCloud yapılandırıldı"
}
Database Repair Procedures
Shortcuts Database Character Fix
SQLite3
class ShortcutsDatabase {
func repairCharacterEncoding() {
let dbPath = "\(NSHomeDirectory())/Library/Application Support/Shortcuts/Shortcuts.sqlite"
var db: OpaquePointer?
guard sqlite3_open(dbPath, &db) == SQLITE_OK else {
print("❌ Kısayol veritabanı açılamadı")
return
}
defer { sqlite3_close(db) }
// Check for encoding issues in shortcuts table
let query = "SELECT identifier, name FROM shortcuts WHERE name LIKE '%[çğıöşüÇĞIÖŞÜ]%'"
var statement: OpaquePointer?
if sqlite3_prepare_v2(db, query, -1, &statement, nil) == SQLITE_OK {
while sqlite3_step(statement) == SQLITE_ROW {
let identifier = String(cString: sqlite3_column_text(statement, 0))
let name = String(cString: sqlite3_column_text(statement, 1))
print("Özel karakterli kısayol: \(name) (ID: \(identifier))")
// Check for specific i/ı issues
if name.contains("i") || name.contains("ı") || name.contains("İ") || name.contains("I") {
print("⚠️ Noktalı/noktasız i sorunu tespit edildi: \(name)")
}
// Fix encoding if needed
if let normalizedName = name.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) {
print("URL güvenli ad: \(normalizedName)")
}
}
}
sqlite3_finalize(statement)
// Run integrity check
if sqlite3_prepare_v2(db, "PRAGMA integrity_check;", -1, &statement, nil) == SQLITE_OK {
if sqlite3_step(statement) == SQLITE_ROW {
let result = String(cString: sqlite3_column_text(statement, 0))
print("Veritabanı durumu: \(result)")
}
}
sqlite3_finalize(statement)
}
func fixDottedIIssues() {
// Specific function to handle i/ı confusion in database
let dbPath = "\(NSHomeDirectory())/Library/Application Support/Shortcuts/Shortcuts.sqlite"
var db: OpaquePointer?
guard sqlite3_open(dbPath, &db) == SQLITE_OK else { return }
defer { sqlite3_close(db) }
// Find shortcuts with potential i/ı issues
let problematicPatterns = ["İ", "ı", "Sıkıştır", "İndir", "Açılış", "İçerik"]
for pattern in problematicPatterns {
let query = "SELECT COUNT(*) FROM shortcuts WHERE name LIKE '%\(pattern)%'"
var statement: OpaquePointer?
if sqlite3_prepare_v2(db, query, -1, &statement, nil) == SQLITE_OK {
if sqlite3_step(statement) == SQLITE_ROW {
let count = sqlite3_column_int(statement, 0)
if count > 0 {
print("'\(pattern)' içeren \(count) kısayol bulundu")
}
}
}
sqlite3_finalize(statement)
}
}
}
System Maintenance Automation
Monthly System Health Check
# Automated system maintenance
monthly_system_maintenance() {
echo "🔧 Aylık sistem bakımı..."
# Check locale integrity
if ! locale | grep -q "tr_TR"; then
echo "⚠️ Locale ayarları düzeltiliyor..."
export LANG=tr_TR.UTF-8
export LC_ALL=tr_TR.UTF-8
fi
# Scan for special characters in critical paths
critical_paths=(
"$HOME/Library/Services"
"$HOME/Library/Application Support/Shortcuts"
"/Applications"
)
for path in "${critical_paths[@]}"; do
if [[ -d "$path" ]]; then
special_files=$(find "$path" -name "*[çğıöşüÇĞIÖŞÜ]*" 2>/dev/null | wc -l)
dotted_i_files=$(find "$path" -name "*[iıIİ]*" 2>/dev/null | wc -l)
echo "Yol $path: $special_files özel karakterli, $dotted_i_files noktalı/noktasız i'li dosya"
fi
done
# Check Shortcuts database health
shortcuts_db="$HOME/Library/Application Support/Shortcuts/Shortcuts.sqlite"
if [[ -f "$shortcuts_db" ]]; then
integrity=$(sqlite3 "$shortcuts_db" "PRAGMA integrity_check;" 2>/dev/null | head -1)
echo "Veritabanı durumu: $integrity"
fi
# Verify iCloud settings
if defaults read MobileMeAccounts 2>/dev/null | grep -q "TR"; then
echo "✅ iCloud aktif"
else
echo "⚠️ iCloud ayarlarını kontrol edin"
fi
# Check for keyboard layout issues
if defaults read com.apple.HIToolbox AppleEnabledInputSources | grep -q "Turkish"; then
echo "✅ Klavye düzeni aktif"
else
echo "⚠️ Klavye düzeni yapılandırması gerekli"
fi
echo "🎉 Sistem bakımı tamamlandı"
}
# Execute maintenance
monthly_system_maintenance
Character Testing Utilities
Comprehensive Character Test
struct CharacterTest {
static func runComprehensiveTest() {
let testStrings = [
"Belirtilen kestirme bulunamadı",
"Özel karakterler: çğıöşü",
"İstanbul şehrinde güzel manzara",
"Sıkıştırılmış dosya açılamadı",
"Müzik indirme kısayolu"
]
print("🧪 Karakter testi...")
for testString in testStrings {
let normalized = testString.applyingTransform(.stripDiacritics, reverse: false) ?? testString
let fileSystemSafe = normalized.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? normalized
print("Orijinal: \(testString)")
print("Normalleştirilmiş: \(normalized)")
print("Dosya sistemi güvenli: \(fileSystemSafe)")
print("---")
}
// Test character variants separately
let specialChars = ["ç", "ğ", "ı", "ö", "ş", "ü", "İ"]
for char in specialChars {
let testPath = "/tmp/test_\(char).txt"
let success = FileManager.default.createFile(atPath: testPath, contents: nil)
if success {
try? FileManager.default.removeItem(atPath: testPath)
}
print("Karakter \(char): \(success ? "✅" : "❌")")
}
// Special test for i/ı confusion
let iVariants = ["i", "ı", "I", "İ"]
print("\nNoktalı/noktasız i testi:")
for variant in iVariants {
let testPath = "/tmp/test_\(variant).txt"
let success = FileManager.default.createFile(atPath: testPath, contents: nil)
if success {
try? FileManager.default.removeItem(atPath: testPath)
}
print("Variant \(variant): \(success ? "✅" : "❌")")
}
}
}
FAQs
Q: Why do i and ı characters cause specific problems?
The system has four distinct i variants: i (dotted lowercase), ı (dotless lowercase), I (dotless uppercase), and İ (dotted uppercase). This creates unique case conversion issues not found in other languages. File systems may incorrectly convert İstanbul → iSTANBUL instead of the correct İstanbul → İSTANBUL, breaking path resolution.
Q: Which characters are most problematic for shortcuts?
The most problematic characters are:
- ı (dotless i): Often confused with regular i in file paths
- İ (dotted capital I): Case conversion issues with file systems
- ğ (soft g): Sometimes rendered incorrectly in older encodings
- ç, ş: Cedilla characters that may not display properly
- ö, ü: Diaeresis characters with encoding conflicts
Q: What’s the difference between Q and F keyboard layouts?
- Q (QWERTY): Standard layout with special characters on AltGr combinations
- F: Native layout optimized for local typing frequency Both layouts can create different character sequences that affect shortcut naming and recognition.
Q: How do I fix shortcuts created with F keyboard layout?
F layout produces different key combinations. Normalize using:
let fLayoutString = "güzçl" // F layout typing
let standardForm = fLayoutString.applyingTransform(.toLatin, reverse: false)
let fileSystemSafe = standardForm?.normalizeCharactersInPath()
Q: Can I use localized folder names in Shortcuts workflows?
Yes, but create compatibility mappings:
ln -sf "$HOME/Masaüstü" "$HOME/Desktop"
ln -sf "$HOME/Belgeler" "$HOME/Documents"
ln -sf "$HOME/İndirilenler" "$HOME/Downloads"
This allows shortcuts to work with both localized and English path references.
Q: Why do some shortcuts work on iOS but not macOS?
iOS and macOS handle locale differently, especially case conversion rules. iOS correctly handles i/ı rules while macOS file system may not. Convert using specific case rules:
let regionalLocale = Locale(identifier: "tr_TR")
let uppercased = string.uppercased(with: regionalLocale) // Correctly: ı → I, i → İ
Q: How do I troubleshoot character display issues?
Check the character pipeline:
- Keyboard layout: Verify Q or F is active
- System encoding: Ensure tr_TR.UTF-8 locale
- Font support: Check if fonts support special characters
- Legacy encoding: Test for ISO-8859-9 or CP1254 conversion needs
Q: What happens if I mix languages in shortcut names?
Mixed-language shortcuts can work but may have issues:
- Path resolution: Different parts use different case rules
- Search: Special characters may not match English search patterns
- Voice recognition: Siri may struggle with mixed-language commands
Use consistent language within individual shortcut names.
Q: How do I migrate shortcuts from Windows systems?
Windows systems often use CP1254 encoding. Convert using:
iconv -f CP1254 -t UTF-8 input_file.txt > output_file.txt
Then apply character normalization to ensure macOS compatibility.
Q: Can voice commands work reliably with Siri?
Siri support varies by region. For better recognition:
- Use standard pronunciation
- Avoid regional dialects in command phrases
- Test with clear articulation of ç, ğ, ş sounds
- Create simpler alternative phrases for complex words
Q: Why do shortcuts fail after system updates?
System updates may reset locale preferences or case conversion rules. After updates:
- Verify
locale
shows tr_TR.UTF-8 - Check keyboard layout is still active
- Re-run character normalization
- Test i/ı case conversion behavior
Q: How do I handle shortcuts in corporate environments?
For business deployments:
- Standardize on UTF-8 across all systems
- Use ASCII identifiers for critical shortcuts while keeping localized display names
- Document i/ı handling procedures for IT staff
- Test with both Q and F keyboard layouts
- Provide English fallbacks for international teams
Q: What’s the best practice for naming shortcuts?
Follow these conventions:
- Use lowercase for file system identifiers
- Handle i/ı conversion explicitly in code
- Keep special characters in user-facing names
- Create ASCII aliases for system operations
Example:
Display Name: "İstanbul Hava Durumu"
File System ID: "istanbul_hava_durumu"
ASCII Alias: "istanbul_weather"
Q: How do I debug encoding issues?
Monitor specific errors:
# Watch for character encoding errors
log stream --predicate 'messageText CONTAINS "Turkish" OR messageText CONTAINS "tr_TR" OR messageText CONTAINS "ISO-8859-9"'
# Check for i/ı case conversion issues
log show --predicate 'messageText CONTAINS "case" OR messageText CONTAINS "dotless"' --last 1h
Q: Should I avoid special characters in shortcuts entirely?
No, special characters are fully supported when properly implemented. Best approach:
- Use native characters for display names (better user experience)
- Implement proper i/ı handling in code
- Use normalized identifiers for file operations
- Test across different keyboard layouts
This maintains cultural authenticity while ensuring technical reliability.
Q: How do currency and number formatting affect shortcuts?
The region uses distinctive formatting that can affect shortcuts:
- Currency: ₺ (Lira symbol)
- Decimal separator: Comma (,)
- Thousands separator: Period (.)
Configure properly:
defaults write NSGlobalDomain AppleCurrencyCode "TRY"
defaults write NSGlobalDomain AppleNumberFormat -dict DecimalSeparator "," ThousandsSeparator "."
This ensures localized shortcuts handle numbers and currency correctly.