1

iOS プロジェクトに wikitude SDK を実装しています。今、チュートリアルでそのステップバイステップを示しており、私はそれに従っています。ARchitectWorld を追加するオプションがあります。そのフォルダーオプションに追加するものを取得できません。彼らが示した例から.js .cssおよび.htmlファイルを取得する必要がありますか。私は少し混乱しています。今、私もコードを追加しました。しかし、何も実りがありません。私の質問は、ARworld を機能させるためにどのコードを追加する必要があるかということです。iPOD 第 5 世代でテスト中です。メッセージが表示され、画面が空白になります。

メッセージはThis device is not capable of running ARchitect Worlds. Requirements are: iOS 6 or higher, iPhone 3GS or higher, iPad 2 or higher. Note: iPod Touch 4th and 5th generation are only supported in WTAugmentedRealityMode_IR.

私のコードは

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

    NSLog(@"here it comes");
    if ( [WTArchitectView isDeviceSupportedForAugmentedRealityMode:WTAugmentedRealityMode_Both] ) { // 1

        NSLog(@"not entering");
        self.architectView = [[WTArchitectView alloc] initWithFrame:self.view.bounds motionManager:nil augmentedRealityMode:WTAugmentedRealityMode_Both];

       // [self.architectView setLicenseKey:@"MY-LICENSE-KEY"]; // 2
        [self.architectView setLicenseKey:nil];

        NSURL *architectWorldUrl = [[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html"];
        [self.architectView loadArchitectWorldFromUrl:architectWorldUrl];

        [self.view addSubview:self.architectView]; // 3
    }

    else {



        NSLog(@"This device is not capable of running ARchitect Worlds. Requirements are: iOS 6 or higher, iPhone 3GS or higher, iPad 2 or higher. Note: iPod Touch 4th and 5th generation are only supported in WTAugmentedRealityMode_IR.");
    }

}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];


    [self.architectView start];
    if ( [self.architectView isRunning] ) {

       NSLog(@"ARchitect is running with version: %@", [WTArchitectView versionNumber]);
    }else {
       NSLog(@"WTARchitectView wasn't able to start. Please check e.g. the -ObjC linker flag in your project settings.");
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)startAR
{
    if([self.architectView isRunning])
    {

        NSLog(@"architect view is working");
        [self.architectView start];
    }
    else{
         NSLog(@"architect view is NOT working");
    }
}
-(void)stopAR
{
    if([self.architectView isRunning])
    {
        [self.architectView stop];
    }


}

どんな助けも必要です。ありがとう。

4

1 に答える 1