2016-12-13 3 views
0

Я использовал xcode 8.0 и версию os 9.3.5 , когда я использую эту демонстрацию, я не могу открыть камеру.Не загружается. Файл с камерой в камере отображает только белый экран в kudan

Сначала я положил объект, этот экран работает исправно, но при нажатии кнопки кнопки, чем после отображения белого экрана. В этом экране нет отображения.

я использовал демо

https://github.com/kudan-eu/GPSSample-iOS

вот мой скриншот enter image description here

вот мой код

mapViewcontroller.m

- (IBAction)progressButton:(id)sender 
{ 
    if (self.touchPin) { 
     [self performSegueWithIdentifier:@"showGPSDemo" sender:self]; 
    } 
} 

#pragma mark - Navigation 

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 
{ 
    if ([[segue identifier] isEqualToString:@"showGPSDemo"]) { 
     // Set model coordinate to position of the map pin. 
     CameraViewController *viewController = [segue destinationViewController]; 

     CLLocationCoordinate2D touchPinCoordinate = self.touchPin.coordinate; 

     viewController.objectCoordinate = [[CLLocation alloc] initWithLatitude:touchPinCoordinate.latitude longitude:touchPinCoordinate.longitude]; 
    } 
} 

CameraView Controller.com

- (void)setupContent 
{ 
    // Initialise and start the GPS Manager. 
    ARGPSManager *gpsManager = [ARGPSManager getInstance]; 
    [gpsManager initialise]; 
    [gpsManager start]; 

    // Initialise a GPSNode with coordinate provided from the map. 
    ARGPSNode *gpsNode = [[ARGPSNode alloc] initWithLocation:self.objectCoordinate]; 

    // Point the GPS Node due east. 
    [gpsNode setBearing:90]; 

    // Must add GPSNode as a child to the GPS Manager world. 
    [gpsManager.world addChild:gpsNode]; 

    // Import the model. 
    ARModelImporter *modelImporter = [[ARModelImporter alloc] initWithBundled:@"bloodhound.armodel"]; 

    // The ARModel node represents all external contents relating to the model e.g.animations, textures. 
    ARModelNode *modelNode = [modelImporter getNode]; 

    // Add the modelNode as a child to the GPSNode. 
    [gpsNode addChild:modelNode]; 

    // Add the texture to the 3D model. 
    ARTexture *modelTexture = [[ARTexture alloc] initWithUIImage:[UIImage imageNamed:@"bloodhound.png"]]; 

    // Setup the object material. 
    ARLightMaterial *modelMaterial = [[ARLightMaterial alloc] init]; 
    modelMaterial.colour.texture = modelTexture; 
    modelMaterial.ambient.value = [ARVector3 vectorWithValuesX:0.5 y:0.5 z:0.5]; 
    modelMaterial.diffuse.value = [ARVector3 vectorWithValuesX:0.5 y:0.5 z:0.5]; 

    // Apply to the model. 
    for (ARMeshNode *meshNode in modelNode.meshNodes) { 
     meshNode.material = modelMaterial; 
    } 

    // Scale the model to the correct height of Big Ben from model height. Units of the GPSManager world are meters, model is 11008 units high in object space. 
    [modelNode scaleByUniform:(96.0/11008.0)]; 

    self.gpsNode = gpsNode; 
} 

вот мой журнал

Could not find file for texture Big_Ben_spec.png 
2016-12-13 16:40:37.546 GPS Sample[13723:834618] RootNode ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618] Big_Ben_001 ARVector3(0.001160, -0.000000, 0.001221) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:37.547 GPS Sample[13723:834618]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:39.877 GPS Sample[13723:834618] generated main fbo 2 
2016-12-13 16:40:39.885 GPS Sample[13723:834618] created main FBO with width 1536 and height 2048 
2016-12-13 16:40:40.281 GPS Sample[13723:834682] camera dimensions: 480.000000 x 640.000000 
2016-12-13 16:40:40.282 GPS Sample[13723:834682] camera aspect ratio: 0.750000 
2016-12-13 16:40:40.282 GPS Sample[13723:834682] framebuffer aspect ratio: 0.750000 
2016-12-13 16:40:40.288 GPS Sample[13723:834682] rotating to orientation 1 
2016-12-13 16:40:40.444 GPS Sample[13723:834682] WARNING: Could not find file for texture Big_Ben_diffuseShade.png 
2016-12-13 16:40:40.444 GPS Sample[13723:834682] WARNING: Could not find file for texture Big_Ben_spec.png 
2016-12-13 16:40:40.461 GPS Sample[13723:834682] RootNode ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:40.461 GPS Sample[13723:834682] Big_Ben_001 ARVector3(0.001160, -0.000000, 0.001221) 
2016-12-13 16:40:40.462 GPS Sample[13723:834682]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:40.462 GPS Sample[13723:834682]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:40.462 GPS Sample[13723:834682]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:40.462 GPS Sample[13723:834682]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:40.462 GPS Sample[13723:834682]  Big_Ben_001 ARVector3(0.000000, 0.000000, 0.000000) 
2016-12-13 16:40:49.263 GPS Sample[13723:834618] Error while getting core location : (null) 
+0

Записывает ли Xcode любые ошибки в минусах ole, когда он загружает представление? – DisturbedNeo

+0

@DisturbedNeo Я добавил свой журнал – iOS

+0

Итак, похоже, проблема в том, что он не может получить координаты GPS. Я предполагаю, что он попросил разрешения использовать ваше местоположение, и вы сказали «да», поэтому единственным объяснением является то, что вы не указали фактическое местоположение при запуске приложения. Вы нажали на карту и поместили булавку или просто нажали «done» и перешли к следующему экрану? – DisturbedNeo

ответ

0

я использовал другую ARAPIKey, но в конце концов я получил правильный ARAPIKey

[[ARAPIKey sharedInstance] setAPIKey:@"sVmoznmKZ+4nFEHD6HoslwpC26PNuBZGHrikUwyon2BKSvza1yu2CqbSrae+pHPr1NHjhsf5pHQOZn8IEqXlqXFodGsrOJhxJANbMOdvnRLUi9/QWGqyRL9FViDmyohw6e5R7U4Ex8H7d7spLLvhfp5HFv56DgLr8c8sC2ipDtv9g1IjOTaY7UGxata3eulG2A/UkIdRv2NcotZXqan01xQUWFAislEwlGguParEYiwu11T4mqtU3dQBbfxpvxbczjdYz493YG3rAO2RHgT+5M5TJShJsz2irkNo71JD2Fzqf4AR2b4+7t1c55zKjegXzGS6Xa/rpNn9yiXUn7rUYIHNvN3cEQa9HsZiVxAV4vJgxFS+T/AxfWqKrEg1uj6xF5MsodZ2EkZ8mqliYIsxZqnFz+Re2HeWG8wvrEob0ZwRIO0TxppAemZc3HChTAPLcNt5gzeBk0oRP4wnrFAFFBDi8XjDocwTSVw++hWZb1qNHzt6bKLsMDRT057UVuuZB6M8f7EOQD79Oah0Vrx/3DUK6e9BEV8oGFNHtk1wyYEkg0i6RLhVSokGx//Qj36A4gCz3h1OjtfB0OuukbNq7xI1L/FcNQLmGYNGZwszARjGr9ESw1gVAkbQMxaV27uo/KoIq4+nR7RL8iT7t7NAaXCFIi24RR+7WGjTvKqWYjA="]; 

если это ARAPIKey истек, чем получить новый ключ https://wiki.kudan.eu/Development_License_Keys

Смежные вопросы