2012-06-08 17 views
1

在iPhone中假冒當前位置我正在使用corelocation框架。是否有可能僞造當前位置用於社交網絡應用程序?如果是,那麼如何?如何使用代碼

請幫忙。

提前謝謝你。

::編輯::

我衝浪更有些後作代碼爲,也可能是改變使用類CLLocationManager的首要方法。 代碼像一些波紋管:

@interface MyHeading : CLHeading 
     -(CLLocationDirection) newHeading; 
-(CLLocationDirection) new1Heading; 
@end 

@implementation MyHeading 
-(CLLocationDirection) newHeading { return 55; } 
-(CLLocationDirection) new1Heading { return 56; } 
@end 

@implementation CLLocationManager (LF) 
- (void)setFLocation { 
    CLLocation *location = [[CLLocation alloc] initWithLatitude:40.778023 longitude:-73.981935]; 
    [[self delegate] locationManager:self didUpdateToLocation:location fromLocation:nil]; 

    id heading = [[MyHeading alloc] init]; 
    [[self delegate] locationManager:self didUpdateHeading: heading]; 
} 

-(void)startUpdatingHeading { 
    [self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1]; 
} 

- (void)startUpdatingLocation { 
    [self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1]; 
} 
@end 

謝謝大家分享。 再次感謝。

+1

懶惰。你有沒有嘗試過自己?你做過任何研究嗎? –

+0

@阿什利,如果你知道,請幫忙,不要說話。我已經厭倦了自己。謝謝。 – iKing

+0

同意阿什利,搜索網絡和SO:http://stackoverflow.com/questions/2054843/core-location-on-simulator-device - 你不是第一個想到這個。 – petert

回答

0

試試看下面的framework

+0

謝謝Petert,我檢查了這個框架,它在iOS模擬器中的工作,但不適用於Device iPhone 4.所以,請讓我知道如果你做了。再次感謝你。 – iKing