title: Wikitude Camera doesn't prompted in ios
body: <p>I'm facing a critical issue about opening <code>wikitude camera</code> in ios although <code>wikitude</code> is running. Any of my code did wrong to open wikitude camera? Please help and thanks.</p>
  
  <p>This is my <code>CameraPlugin.h</code> :</p>
  
  <pre><code>#import IBMMobileFirstPlatformFoundationHybrid/IBMMobileFirstPlatformFoundationHybrid.h`&lt;br&gt;
  #import Cordova/CDV.h
  
   @interface CameraPlugin : CDVPlugin
  
   - (void)launchCamera:(CDVInvokedUrlCommand*)command;
  
   @end
  </code></pre>
  
  <p>This is my <code>CameraPlugin.m</code>  :</p>
  
  <pre><code>#import "CameraPlugin.h"&lt;br&gt;
  #import "CDVMainViewController.h"&lt;br&gt;
  #import &lt;Cordova/CDV.h&gt;&lt;br&gt;
  #import &lt;WikitudeSDK/WikitudeSDK.h&gt;&lt;br&gt;
  
       @interface CameraPlugin() &lt;WTArchitectViewDelegate&gt;&lt;br&gt;
       @property (nonatomic, strong) WTArchitectView  *architectView;&lt;br&gt;
       @property (nonatomic, assign) WTNavigation     *architectWorldNavigation;&lt;br&gt;
       @property (nonatomic, strong) CDVMainViewController *view;&lt;br&gt;
       @end
  
       @implementation CameraPlugin
  
       -(void) dealloc {
          [[NSNotificationCenter defaultCenter] removeObserver:self];}
  
       -(void)launchCamera:(CDVInvokedUrlCommand *)command{
          CDVPluginResult* pluginResult = nil;
          NSError *deviceSupportError=nil;
  
          if([WTArchitectView isDeviceSupportedForRequiredFeatures:WTFeature_2DTracking error:&amp;deviceSupportError]) {
          NSLog(@"Device is supported Wikitude SDK");
  
          self.view = [[CDVMainViewController alloc] initWithNibName:nil bundle:nil];
  
          NSLog(@"=== View is configure ===");
          self.architectView = [[WTArchitectView alloc] initWithFrame:CGRectZero motionManager:nil];
          self.architectView.delegate = self;
  
          NSLog(@"=== LicenseKey is configure ===");
          [self.architectView setLicenseKey:@""];
  
          NSLog(@"=== URL loading ===");
          self.architectWorldNavigation = [self.architectView loadArchitectWorldFromURL:[[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html" subdirectory:@"ArchitectWorld"] withRequiredFeatures:WTFeature_2DTracking];
  
          NSLog(@"architectWorldNavigation : %@", self.architectWorldNavigation);
  
          NSLog(@"Observer is configure");
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveApplicationWillResignActiveNotification:) name: UIApplicationWillResignActiveNotification object:nil];
              [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveApplicationDidBecomeActiveNotification:) name:UIApplicationDidBecomeActiveNotification object:nil];`
  
  
          NSLog(@"Subview is configure");
          [self.view.view addSubview:self.architectView];
          self.architectView.translatesAutoresizingMaskIntoConstraints = NO;
             NSDictionary *views = NSDictionaryOfVariableBindings(_architectView);
          [self.view.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat:@"|[_architectView]|" options:0 metrics:nil views:views] ];
          [self.view.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_architectView]|" options:0 metrics:nil views:views] ];
  
          NSLog(@"%@", self.view.view);
  
          NSLog(@"Result is configure");
  
         [self startWikitudeSDKRendering];
  
          NSLog(@"Wikitude is Running - %d", [self.architectView isRunning]);
  
          pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:@"true"];
      } else {
          NSLog(@"This device is not supported. Show either an alert or use this class method even before presenting the view controller that manages the WTArchitectView. Error: %@", [deviceSupportError localizedDescription]);
  
         pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"true"];
      }
  
     `[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];`
  }
  
     `- (void)startWikitudeSDKRendering {`&lt;br&gt;
       `NSLog(@"Wikitude is Running - %d", [self.architectView isRunning]);`&lt;br&gt;
      `if ( ![self.architectView isRunning] ) {`&lt;br&gt;
          `NSLog(@"Try to start wikitude sdk");`&lt;br&gt;
          `[self.architectView start:^(WTStartupConfiguration *configuration{`
              `// configuration.captureDevicePosition = AVCaptureDevicePositionFront;`
  
          } completion:^(BOOL isRunning, NSError *error) {
  
             /* The completion block is called right after the internal start method returns.
  
               NOTE: In case some requirements are not given, the WTArchitectView might not be started and returns NO for isRunning.
               To determine what caused the problem, the localized error description can be used.
               */
              if ( !isRunning ) {
                  NSLog(@"WTArchitectView could not be started. Reason: %@", [error localizedDescription]);
              }
          }];
      }
  }
  
      `- (void)stopWikitudeSDKRendering {
      if ( [self.architectView isRunning] ) {
          [self.architectView stop];
      }
  }`
   `@end`
  </code></pre>
  
  <p>Here is my logcat (Wikitude service seems running but there is not camera prompted):</p>
  
  <blockquote>
    <p>2016-04-25 18:02:13.330 CPBVOCA[357:30022] Device is supported Wikitude SDK<br>
    2016-04-25 18:02:13.341 CPBVOCA[357:30022] === View is configure ===<br>
    2016-04-25 18:02:13.380 CPBVOCA[357:30022] === LicenseKey is configure ===<br>
    2016-04-25 18:02:13.381 CPBVOCA[357:30022] === URL loading ===<br>
    2016-04-25 18:02:13.389 CPBVOCA[357:30022] architectWorldNavigation : navigation: original URL: 'file:///var/containers/Bundle/Application/9A01A65D-34A9-4AB2-B733-A8C5CE9B40F9/CPBVOCA.app/ArchitectWorld/index.html' - final URL: '(null)' - isLoading: '1' - wasInterrupted: '0'<br>
    2016-04-25 18:02:13.389 CPBVOCA[357:30022] Observer is configure<br>
    2016-04-25 18:02:13.389 CPBVOCA[357:30022] Subview is configure<br/>
    2016-04-25 18:02:13.435 CPBVOCA[357:30022] UIView: 0x141425e70; frame = (0 0; 320 460); autoresize = W+H; userInteractionEnabled = NO; layer = CALayer: 0x13ff76680<br>
    2016-04-25 18:02:13.436 CPBVOCA[357:30022] Result is configure<br>
    2016-04-25 18:02:13.436 CPBVOCA[357:30022] Wikitude is Running - 0<br>
    2016-04-25 18:02:13.436 CPBVOCA[357:30022] Try to start wikitude sdk<br>
    2016-04-25 18:02:13.708 CPBVOCA[357:30022] Wikitude is Running - 1<br>
    2016-04-25 18:02:13.710 CPBVOCA[357:30022] THREAD WARNING: ['CameraPlugin'] took '404.823975' ms. Plugin should use a background thread.<br>
    2016-04-25 18:02:13.712 CPBVOCA[357:30022] Success to get camera plugin<br></p>
  </blockquote>