Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill maui-geolocation명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | maui-geolocation |
| description | > Use when this capability is needed. |
GetLocationAsync can hang indefinitely if GPS is off, the device is indoors,
or permissions are in a pending state. Always set a timeout.
// ❌ Hangs forever if no GPS fix is available
var location = await Geolocation.Default.GetLocationAsync(
new GeolocationRequest(GeolocationAccuracy.High));
// ✅ Times out after 30 seconds
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var location = await Geolocation.Default.GetLocationAsync(
new GeolocationRequest(GeolocationAccuracy.High), cts.Token);
Use the lowest accuracy that satisfies your feature. Higher accuracy drains battery significantly faster — especially on Android.
| Use case | Recommended accuracy |
|---|---|
| City-level / weather | Lowest or Low |
| Nearby search / store finder | Medium |
| Turn-by-turn navigation | High or Best |
Users can grant "approximate" location (accuracy > 1 km). Your app receives a location, but it may be useless for precision features.
location.Accuracy — values > 100 m likely indicate reduced precision.GeolocationRequest.RequestFullAccuracy with a key matching
NSLocationTemporaryUsageDescriptionDictionary in Info.plist to
prompt for full accuracy.// ⚠️ Always check in security-sensitive flows (e.g., geofence, check-in)
if (location.IsFromMockProvider)
{
// Reject — user is spoofing location
}
Altitude 0.0 is not sea levelSome Android devices return 0.0 for Altitude when the GPS has no
barometric sensor. Treat 0.0 as "unknown", not sea level.
ACCESS_BACKGROUND_LOCATION must be requested separately from foreground
permissions and triggers a distinct system dialog. Requesting it together with
foreground permissions causes both to be denied on some devices.
GetLastKnownLocationAsync returns nullThis is expected on first boot or after a location-data reset. Always fall
back to GetLocationAsync:
// ✅ Cache-first with fresh fallback
var location = await geolocation.GetLastKnownLocationAsync();
if (location is null || location.Timestamp < DateTimeOffset.UtcNow.AddMinutes(-5))
{
location = await geolocation.GetLocationAsync(
new GeolocationRequest(GeolocationAccuracy.Medium, TimeSpan.FromSeconds(10)), ct);
}
Call Permissions.RequestAsync<Permissions.LocationWhenInUse>() first, or
catch PermissionException. Calling GetLocationAsync without permission
throws on some platforms and returns null on others — inconsistent
behaviour across platforms.
Failing to remove the LocationChanged handler when stopping causes
continued GPS usage and battery drain.
// ❌ Forgetting to unsubscribe — GPS stays active
public void StopTracking()
{
Geolocation.Default.StopListeningForeground();
// LocationChanged handler still fires!
}
// ✅ Always remove the event handler
public void StopTracking()
{
Geolocation.Default.StopListeningForeground();
Geolocation.Default.LocationChanged -= OnLocationChanged;
}
CancellationToken passed to every GetLocationAsync callBest)GetLastKnownLocationAsync null-check with GetLocationAsync fallbackLocationChanged handler removed when stopping continuous listeningACCESS_BACKGROUND_LOCATION requested separately (if needed)NSLocationTemporaryUsageDescriptionDictionary added for full-accuracy promptIsFromMockProvider checked in security-sensitive flowsConverted and distributed by TomeVault — claim your Tome and manage your conversions.