// // FGPrefix.h // FakeGPS Reborn // // Tiền tố dùng chung: import framework, hằng số, tiện ích nhỏ. // Dylib này KHÔNG phụ thuộc CydiaSubstrate. Mọi hook dùng Objective-C runtime // thuần (method_setImplementation), hoạt động sau khi được inject và ký lại // bằng zsign / ESign / LCSign trên máy không jailbreak. // #pragma once #import #import #import #import #import #import #import extern NSString *const FGStoreDidChangeNotification; extern NSString *const FGSpoofStateDidChangeNotification; /// Đăng kèm userInfo[@"item"] (NSDictionary) để yêu cầu áp dụng một địa điểm. extern NSString *const FGRequestApplyLocationNotification; static inline CLLocationCoordinate2D FGCoordinateMake(double lat, double lng) { CLLocationCoordinate2D c; c.latitude = lat; c.longitude = lng; return c; } static inline BOOL FGCoordinateValid(CLLocationCoordinate2D c) { if (!CLLocationCoordinate2DIsValid(c)) return NO; if (fabs(c.latitude) < 0.000001 && fabs(c.longitude) < 0.000001) return NO; return YES; } NSString *FGCoordString(CLLocationCoordinate2D c); // "21.02776, 105.83416" NSString *FGCoordDetailedString(CLLocationCoordinate2D c); // "21.027760° B, 105.834160° Đ" #ifndef FGLog #define FGLog(fmt, ...) NSLog((@"[FakeGPS] " fmt), ##__VA_ARGS__) #endif