现在,在用户批准了相机和GPS的权限后,我就拥有带有pois的黑屏。它就像摄像机出现问题一样,因为pois正在移动设备位置变化,所以部分工作得很好,如果我杀了应用程序,然后启动它每一个都很好(用户已经批准了权限)任何想法是什么可能是问题?代码如下:
- (void)viewDidLoad {
[super viewDidLoad];
NSError *deviceNotSupportedError = nil;
if ( [WTArchitectView isDeviceSupportedForRequiredFeatures:WTFeature_Geo error:&deviceNotSupportedError] ) { // 1
self.architectView.delegate = self;
[self.architectView setLicenseKey:@""];
self.architectWorldNavigation = [self.architectView loadArchitectWorldFromURL:[[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html" subdirectory:@"4_PointOfInterest_4_SelectingPois"] withRequiredFeatures:WTFeature_Geo | WTFeature_2DTracking];
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
if (self.architectWorldNavigation.wasInterrupted) {
[self.architectView reloadArchitectWorld];
}
[self startRunning];
}];
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
[self startRunning];
}];
} else {
NSLog(@"device is not supported - reason: %@", [deviceNotSupportedError localizedDescription]);
}
}
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self startRunning];
}
- (void)startRunning {
if ( ![self.architectView isRunning] ) {
[self.architectView start:^(WTStartupConfiguration *configuration) {
configuration.captureDevicePosition= AVCaptureDevicePositionBack;
} completion:^(BOOL isRunning, NSError *error) {
if ( !isRunning ) {
NSLog(@"WTArchitectView could not be started. Reason: %@", [error localizedDescription]);
}
}];
}
}
答案 0 :(得分:0)
答案 1 :(得分:0)
如果Wikitude引擎已启用,我会通过检查Query query = session.getNamedQuery("callStockStoreProcedure")
.setParameter("stockCode", "7277");
List result = query.list();
for(int i=0; i<result.size(); i++){
Stock stock = (Stock)result.get(i);
System.out.println(stock.getStockCode());
}
通知来解决此问题。如果不是,我执行Wikitude的启动方法,一切正常。
ninja -C out/Debug