Skip to content

Instantly share code, notes, and snippets.

@AldoMX
Created June 26, 2025 14:38
Show Gist options
  • Save AldoMX/155c6cc66818580d072dfc03c1c87e3d to your computer and use it in GitHub Desktop.
Save AldoMX/155c6cc66818580d072dfc03c1c87e3d to your computer and use it in GitHub Desktop.
Fix for error: cannot find 'TARGET_OS_SIMULATOR' in scope
sed -i.bak '/var isSimulator: Bool {/,/^ }/c\
var isSimulator: Bool {\
#if targetEnvironment(simulator)\
return true\
#else\
return false\
#endif\
}' node_modules/expo-device/ios/UIDevice.swift
@AldoMX
Copy link
Author

AldoMX commented Sep 24, 2025

Fix for error: switch must be exhaustive

sed -i.bak '/switch calendar.identifier {/,/^    }$/ {
  /@unknown default:/b done
  /^    }$/ i\
    @unknown default:\
      log.error("Unhandled `Calendar.Identifier` value: \(calendar.identifier), returning `iso8601` as fallback. Add the missing case as soon as possible.")\
      return "iso8601"
  :done
}' node_modules/expo-localization/ios/LocalizationModule.swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment