• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Save CBCharacteristic to NSUserDefaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save CBCharacteristic to NSUserDefaults


  • Subject: Re: Save CBCharacteristic to NSUserDefaults
  • From: Andras Kovi <email@hidden>
  • Date: Wed, 17 Apr 2013 08:28:52 +0200

Well, if you retrieve or discover a peripheral, then its services will be nil. Those are read only from our perspective so there is not even a theoretical way to save and then restore the characteristics. Maybe they come up with some caching this year (WWDC 2013 hasn't happened yet to my best knowledge :) ) but I doubt that as that would introduce a whole bunch of issues. Rediscovery is not a big deal, you just have to plan for it.

Cheers,
Andras

On 2013.04.17., at 8:09, Jack Phan <email@hidden> wrote:


I may be wrong but I remember that in Advanced Core Bluetooth session from this years WWDC, they said we could catch the characteristics.

Jack


On Apr 16, 2013, at 11:06 PM, Andras Kovi <email@hidden> wrote:

Yes, Khaos is right. You cannot save neither the characteristics or the services. They must be rediscovered every time.

Andras

On 2013.04.17., at 7:44, Khaos Tian <email@hidden> wrote:

It seems you had to re-discover characteristics every time you established a new connection.

Here are threads that discussed this problem previously.

http://prod.lists.apple.com/archives/bluetooth-dev/2013/Mar/msg00032.html

Best Wishes,
Khaos Tian

On Apr 17, 2013, at 1:25 PM, Jack Phan <email@hidden> wrote:

The reason is that I don't want to scan again. I would like to reconnect but don't want to discover characteristics again because it takes too long.
So when the user opens the app, I reconnect, no discover characteristics, but send characteristic values that I had saved to Peripheral. 

Jack

On Apr 16, 2013, at 10:14 PM, Khaos Tian <email@hidden> wrote:

sorry for the typo.

I mean why don't you perform a discover characteristics action and then use that CBCharacteristic to perform action you want?

Best Wishes,
Khaos Tian

On Apr 17, 2013, at 1:06 PM, Jack Phan <email@hidden> wrote:


Hi Khaos,

Yes. I would like to save CBCharacteristic *myChar into NSUserDefauts and then load it when user open the app.
Thanks,

Jack


On Apr 16, 2013, at 10:02 PM, Khaos Tian <email@hidden> wrote:

May I ask why would you like to say CBCharacteristic into NSUserDefaults?

Best Wishes,
Khaos Tian
Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Save CBCharacteristic to NSUserDefaults
      • From: Jack Phan <email@hidden>
References: 
 >Save CBCharacteristic to NSUserDefaults (From: Jack Phan <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Khaos Tian <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Jack Phan <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Khaos Tian <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Jack Phan <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Khaos Tian <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Andras Kovi <email@hidden>)
 >Re: Save CBCharacteristic to NSUserDefaults (From: Jack Phan <email@hidden>)

  • Prev by Date: Re: Save CBCharacteristic to NSUserDefaults
  • Next by Date: Re: Save CBCharacteristic to NSUserDefaults
  • Previous by thread: Re: Save CBCharacteristic to NSUserDefaults
  • Next by thread: Re: Save CBCharacteristic to NSUserDefaults
  • Index(es):
    • Date
    • Thread