I have two apps talking through CoreBluetooth, iOS and Today Extension (peripheral) and OSX (central).
1 - Setup process (iOS app x OSX app): They connect, exchange data that is stored and disconnect.
2 - App's main feature usage (iOS Today Extension x OSX app): They connect, exchange data and disconnect.
Unless I turn my iPhone's bluetooth off and on again between step 1 and 2, OSX app, finds iPhone, connects, but finds 0 services from Today Extension after peripheral.discoverServices is called in OSX app.
If I do turn bluetooth off and on, everything goes as expected. What could it be? Any help is very welcome. Thanks!
UPDATE: After using LightBlue on OSX I was able to confirm that, unless I restart bluetooth, the UUID service used in step 1 continues to be advertised, only when I restart bluetooth, UUID used in step 2 shows up.