title: the barcode scan library doesn't work on iOS but it does on Android
body: <p>I try to use this librairy to use the barcode scanner on iOS : <a href="https://github.com/codenameone/cn1-codescan" rel="nofollow noreferrer">https://github.com/codenameone/cn1-codescan</a> It works very well on Android but when my application opens the same barcode scanner form on iOS, my application just shuts down without displaying any error message.
  I have to scan Code 128 bar codes.
  Perhaps that I have to edit the property especially for IOS ?</p>
  
  <p>Here is my code :</p>
  
  <pre><code>public class ScanCode extends Form {
  final Container cnt = this;
  public ScanCode(Form parent){
      this.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
      Display.getInstance().setProperty("android.scanTypes", "CODE_128");
      CodeScanner.getInstance().scanBarCode(new ScanResult() {
          public void scanCompleted(String contents, String formatName, byte[] rawBytes) {
              String word;
              word= contents.substring(0,12);
              List&lt;Patient&gt; myList= new ArrayList&lt;&gt;();
              myList= RestManager.getList(contents.substring(0,12));
              if(myList.size()==0){
                  new ManualInfo(parent,contents).show();
              }
              else{
                  Date date = new Date();
                  Intervention intervention = new Intervention();
                  intervention.setList(myList.get(0));
                  intervention.setDateAction(date);
                  intervention.setDateCreate(date);
                  intervention.setDateUpdate(date);
                  intervention.setEncodingType(Intervention.BARCODE_TYPE);
                  Update ajoutintervention = new Update();
                  ajoutintervention.setId((long) 0);
                  ajoutintervention.setDatas(intervention.toJson());
                  ajoutintervention.setDateCreate(date);
                  ajoutintervention.setDateUpdate(date);
                  ajoutintervention.setTreatment(String.valueOf(Constants.INSERT));
                  ajoutintervention.setDone(String.valueOf(false));
                  ajoutintervention.setClassName(intervention.getName());
                  ajoutintervention.setParam(myList.get(0).getWord());
                  DatabaseHelper.saveDataClass(ajoutintervention);
              }
  
          }
  
          public void scanCanceled() {
              cnt.addComponent(new Label("cancelled"));
          }
  
          public void scanError(int errorCode, String message) {
              cnt.addComponent(new Label("err " + message));
          }
      });        
  }
  </code></pre>
  
  <p><strong>EDIT:</strong>
  Here is the build hints :</p>
  
  <pre><code>codename1.arg.ios.add_libs=ExternalAccessory.framework;CoreBluetooth.framework;libc++.dylib;SystemConfiguration.framework;,libc++.dylib,CoreText.framework,MessageUI.framework,CoreVideo.framework,CoreMedia.framework    
  codename1.arg.ios.background_modes=,bluetooth-central,bluetooth-peripheral
  codename1.arg.ios.debug.archs=arm64
  codename1.arg.ios.includePush=true
  codename1.arg.ios.newStorageLocation=true
  codename1.arg.ios.plistInject=&lt;key&gt;NSBluetoothPeripheralUsageDescription&lt;/key&gt;&lt;string&gt;This app uses a BLE cardreader&lt;/string&gt;&lt;key&gt;UISupportedExternalAccessoryProtocols&lt;/key&gt;&lt;array&gt;&lt;string&gt;bt.reader.library&lt;/string&gt;&lt;/array&gt; &lt;key&gt;NSAppTransportSecurity&lt;/key&gt; &lt;dict&gt;&lt;key&gt;NSAllowsArbitraryLoads&lt;/key&gt;&lt;true/&gt;&lt;/dict&gt;   
  codename1.arg.ios.pods.platform=8.0,7.0
  codename1.arg.ios.pods.sources=https\://github.com/CocoaPods/Specs.git
  codename1.arg.ios.xcode_version=10.1
  codename1.arg.java.version=8
  </code></pre>
  
  <p>I work on a 12.1 iOS version and the device is an iPad Air.</p>