1

私は Gimbal フレームワークを初めて使用し、このフレームワークを基本レベルで使用しようとしています。これが私のコードです:

- (void)viewDidLoad
{
....
self.contextCoreConnector = [[QLContextCoreConnector alloc] init];
self.contextCoreConnector.permissionsDelegate = self;

self.contextPlaceConnector = [[QLContextPlaceConnector alloc] init];
self.contextPlaceConnector.delegate = self;

self.contextInterestsConnector = [[PRContextInterestsConnector alloc] init];
self.contextInterestsConnector.delegate = self;

self.contentConnector = [[QLContentConnector alloc] init];
self.contentConnector.delegate = self;


[self.contextCoreConnector checkStatusAndOnEnabled:^(QLContextConnectorPermissions *contextConnectorPermissions) {
    if (contextConnectorPermissions.subscriptionPermission)
    {
        if (self.contextPlaceConnector.isPlacesEnabled)
        {
            [self displayLastKnownPlaceEvent];
        }
    }
}
disabled:^(NSError *error) {
    NSLog(@"%@", error);
    if (error.code == QLContextCoreNonCompatibleOSVersion)
    {
        NSLog(@"%@", @"SDK Requires iOS 5.0 or higher");
    }
    else
    {
        enableSDKButton.enabled = YES;
        placeNameLabel.text = nil;
        contentInfoLabel.text = nil;
    }
}];

}


#pragma mark - QLContextPlaceConnectorDelegate methods

- (void)didGetPlaceEvent:(QLPlaceEvent *)placeEvent
{
NSLog(@"Got place event");
[self savePlaceEvent:placeEvent];
[self displayLastKnownPlaceEvent];
}

- (void)didGetContentDescriptors:(NSArray *)contentDescriptors
{
contentInfoLabel.text = [[contentDescriptors lastObject] title];

NSLog(@"didGetContentDescriptors : %@",contentInfoLabel.text);

[self displaceLastKnownContentDescriptor];

for (QLContentDescriptor *contentDescriptor in contentDescriptors)
{
    [self postOneContentDescriptorLocalNotification:contentDescriptor];
}

}

しかし、その方法は

- (void)didGetContentDescriptors:(NSArray *)contentDescriptors

は呼び出されません。なぜこれが起こっているのか分かりません。SDK で提供されるデモ アプリでは、このメソッドが呼び出されますが、私のアプリでは呼び出されません。両方のアプリのコードを一致させましたが、アプリで問題を見つけることができません。

誰かが助けてくれれば、とても感謝します。

4

1 に答える 1