Question

I am implementing wikitude SDK for my iOS project. Now in the tutorial its showing step by step and i am following that. there is an option for adding ARchitectWorld. I am not getting what to add in that folder option. Shall I have to take the .js .css and .html file from the example they have shown. i am getting bit confused. Now I have also added the code. But not getting anything fruitful. What my question is what code should I have to add to get the ARworld work. I am tetsing on my iPOD 5th generation. Its showing me a message and the screen is blank.

The message is 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.

My code is

- (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];
    }


}

Any help is needed. thanks.

Was it helpful?

Solution

I had the same issue. When I ran the project in iPhone, it worked fine. Don't try with iPods.

And you also need to check whether all the steps in this link was done correctly.

Especially configuriing Build Settings in both Projests and Targets tab,

The Wikitude SDK requires that the -ObjC linker flag is set. Linker flags can be adjusted in the projects Build Settings tab. Search for Other Linker Flags and add a new entry if it does not already exist.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top