title: iOS - MTU Size for BLE data transfer between iOS device and External Accessory(BluetoothWatch)
body: <p>I'm Working on iOS Application(Objective-C) for Bluetooth watch which using BLE(CoreBluetooth),  and my watch is having GATT Bluetooth Profile, iOS application minimum support is from iOS7.</p>
  
  <p>I wants to know How can we do data transfer between iOS device and external device using Core Bluetooth framework.</p>
  
  <p>Actually I'm working on the Firmware upgrade section of my Bluetooth watch,
  My iOS application will get Firmware code (binary data) from web service whenever any update received and then it will send data to Bluetooth watch.</p>
  
  <p>I have searched and got one Apple Sample code:
  BTLE_Transfer: <a href="https://developer.apple.com/Library/ios/samplecode/BTLE_Transfer/Introduction/Intro.html" rel="noreferrer">https://developer.apple.com/Library/ios/samplecode/BTLE_Transfer/Introduction/Intro.html</a></p>
  
  <p>I guess sample code was not useful in my case as its having Central and Peripheral both code and transferring data between two iOS device.</p>
  
  <p>is there any other way apart from this sample code for BLE data transfer? or it's possible with this sample code only?(if yes how?)</p>
  
  <p><strong>UPDATED:</strong></p>
  
  <p>My device have 1 service which have 2 characteristic one for read and one for write.</p>
  
  <p>According to my workflow using write charateristic:</p>
  
  <ol>
  <li>Using WRITECHARACTERISTIC I'm sending data of firmware code in chunks </li>
  </ol>
  
  <blockquote>
    <p>[MYDEVICEINSTANCE writeValue:NSDATACHUNK
    forCharacteristic:WRITECHARACTERISTIC
    type:CBCharacteristicWriteWithResponse];</p>
  </blockquote>
  
  <ol start="2">
  <li>and in delegate method "<strong>didWriteValueForCharacteristic</strong>" method I'm notifying read characteristic as below</li>
  </ol>
  
  <blockquote>
    <p>[MYDEVICEINSTANCE setNotifyValue:TRUE
    forCharacteristic:READCHARACTERISTIC];</p>
  </blockquote>
  
  <ol start="3">
  <li>which calls "<strong>didUpdateNotificationStateForCharacteristic</strong>" delegate method inside that I'm checking if READCHARACTERISTIC <strong>isNotifying</strong> or not then I call </li>
  </ol>
  
  <blockquote>
  <pre><code>[MYDEVICEINSTANCE readValueForCharacteristic:READCHARACTERISTIC];
  </code></pre>
  </blockquote>
  
  <ol start="4">
  <li>which call delegate method "<strong>didUpdateValueForCharacteristic</strong>" and I'm reading response using <strong>READCHARACTERISTIC.value</strong></li>
  </ol>
  
  <p><strong>My query:</strong></p>
  
  <p>I wants to confirm <strong>MTU maximum limit allowed by Apple</strong> for External device communication from iOS application, which I'm starting in step-1 by sending <strong>NSDATACHUNK</strong> to BLE Watch from iOS app using <strong>writeValue</strong> </p>
  
  <p>I have tested that I can send NSDATACHUNK of <strong>MTU=255</strong> size and BLE watch is receiving same successfully.</p>
  
  <p>I have found in "<strong>Apple Sample code: BTLE_Transfer</strong>" they are using <strong>MTU=20</strong> but, I guess that sample code is for iOS device to iOS device communication (Please, correct me if I'm wrong)</p>
  
  <p>So, If I use <strong>MTU=250</strong> in my iOS application for BLE communication is there any chance that apple will reject my Application?</p>
  
  <p>Or is there any one that can say <strong>what is the maximum limit allowed by Apple for MTU?</strong></p>
  
  <p>Every suggestion are appreciated,</p>
  
  <p>Thanks in advance</p>