1

皆さん、こんにちは、アプリがバックグラウンドのときに位置情報の更新を取得しようとしています。しかし、以下のコードは機能していないようです。IF ステートメントは真ではありません。また、info.plist ファイルに必要なキーを設定しました。iphone 3GS と ipad 3 でコードを実行しています。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customizatio-n after application launch.
    id locationValue = [launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey];
    if (locationValue)
    {
        // create a new manager and start checking for sig changes

        locManager = [[CLLocationManager alloc] init];

        locManager.delegate = self;

        [locManager startMonitoringSignificantLocationChanges];

        return YES;
    }
4

0 に答える 0