Start a new topic

iOS JavaScript Error

 I have copied the instructions at https://www.wikitude.com/external/doc/documentation/latest/ios/setupguideios.html. There is a crash. The code is:

#import "ViewController.h"
@interface ViewController ()
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSError *deviceNotSupportedError = nil;
    if ( [WTArchitectView isDeviceSupportingFeatures:WTFeature_ImageTracking error:&deviceNotSupportedError] ) { // 1
        self.architectView = [[WTArchitectView alloc] init];
      
        //self.architectView.delegate = self;
        self.architectView.requiredFeatures = WTFeature_ImageTracking; // 2
        [self.architectView setLicenseKey:@"MY_WIKITUDE_KEY"]; // 3
        [self.view addSubview:self.architectView]; // 4
       
       
        NSURL *architectWorldURL = [[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html" subdirectory:@"sdapp"];
        [self.architectView loadArchitectWorldFromURL:architectWorldURL];
       
    } else {
        NSLog(@"device is not supported - reason: %@", [deviceNotSupportedError localizedDescription]);
    }
   
}
@end

what am I doing wrong?
1 Comment

Hi Patrick,


Could you please provide further details:


  • Which version of the SDK are you using?
  • Confirm that you're working with the JS API?
  • Could you please send us the crash log
  • Is this happening with the sample app or in your own app? If it happens with your own app, does the sample app work on your device?
  • Could you send exact steps to reproduce the issue?
  • Did you follow the instructions when you ran the SDK sample app?


Thx and greetings

Nicola

Login or Signup to post a comment