CBCentral fails to find peripheral's service unless bluetooth is restarted - ios8

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.

I got the same problem, first thought it might be my fault, but later it turns out to be really weird.
I wrote similar program, using iPhone to connect to a BLE beacon, and use [CBPeripheral readRSSI] to get the signal strength. Everything goes smooth when the BLE beacon is connected to my iPhone for the first time. But if it got disconnected, and reconnect again, the method readRSSI won't get called any more.
Only after I restart the bluetooth on my iPhone, the issue will be resolved.
I run the program in debug mode, step by step, to my surprise, I found no problem at all. Even I disconnect for so many times and reconnect again, the method readRSSI can still be called properly.
Hope this may help. I am also waiting for an answer for this strange thing.

Related

On Starting mac and running xcode simulator Consume around 500MB Internet Data

For Past 4 week i observer when i run my Xcode application on simulator on first time simulator launch it consume around 500MB internet data.
This is not project specific issue. Every time when i shutdown and start the mac and run Xcode as soon as simulator open it will consume same amount of Data.
Can any one help me What is the issue?? or any background service run??
Xcode version: 11.6 (11E708)
simulator: 13.6
OSX: 10.15.6
Please help me unnecessary every time my Internet Data is consume i have to fix this
This issue is still persist after updating to xcode 11.7
Thanks For #Rado for suggesting the https://apple.stackexchange.com/.
After posting the question on https://apple.stackexchange.com/ i fond the answer.
Orginal Answer: Xcode simulator constantly download something
Answer:
rename the file com.apple.nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/UserEventPlugins/com.apple.nsurlsessiond.plugin/
to something -com.apple.nsurlsessiond
and also the file nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/
to something -nsurlsessiond
Apps with admob works perfectly also no problem with safari
If you don't need an internet connection for testing you application, you could simply disable the network.
You could run wireshark and see what it is actually doing, or at least see where it is connecting to.
I used tripmode firewall don't give simulator internet access only give when you need it.
Works fine but when you forget to turn it off and start the simulator next time, you feel horrible :(

How do I fix xamarin.ios app crash on launch in iPhone 8 cellular data?

We have develop a xamarin.ios app thats work fine on all iPhone and iPad except iPhone 8. Its crashed on launch in iPhone 8 on cellular data. Its working good on wifi. I don’t have iPhone 8 device right now, so I am checking it on simulator. But simulator using wifi and its working good on simulator. How can I identify the problem and how to solve it?
FYI we are consuming a service on app launch that need an active internet. Any idea, Please reply.
This should really be a comment, but I don't have the reputation for one.
Without knowing what is happening when your app has launched, have you tried testing your app without a Wi-Fi or data connection?
The issue might be that your clients device is getting a different response from the service that you have not accounted for and this might be causing exceptions etc.
We are checking on IPv6 network but our API was not compatible to IPv6. When we change the network to IPv4, Its work perfectly. But as per apple guidelines we must have to compatible our API to IPv6 network.

Delphi - Checklist for PAServer Connection (Mac OSX)

I have spent the better part of a day trying to connect to PAServer on MAC OSX from my Windows PC with no luck. I am not sure what I am missing.
I am using Delphi 10.2 Tokyo on Windows. Trying to connect to PAServer 19.0 on a Mac Mini running macOS Sierra (10.12.4) on which I already have XCode (v8.3.2) installed along with Command Line Tools.
Both the dev machine as well as the Mac Mini are connected to the same Wifi network. I even tried connecting both machines to a different network but with the same issue.
I get the same error message every time that the connection failed. I suspect that it has something to do with the network - where the 2 machines cannot see each other, but I don't know how I can confirm this or resolve it. I have tried to search on SO as well as online but have not found anything that has helped.
Has anyone seen this issue and overcome it? Is there a set of steps I can go thru to troubleshoot this? Any help or guidance would be most appreciated!
OK - I kept trying out different things and was able to solve this issue (one way to solve it I guess).
Because it seemed like it was network related, I tried first to create a hotspot with my phone and connected the dev machine and the Mac Mini to it. The PAServer connection worked.
So I looked for a way to do this via Windows. Here are the steps I followed:
Open Settings > Network & Internet (on Windows 10)
Go into Mobile Hotspot and select Wi-Fi in the Share my
Connection From dropdown
Set a Network name and Network password
Turn on Share my Internet connection with other devices
Now on the Mac, connect to the network name we set up in step 3 and enter the password that was set. Then start PAServer on the Mac. That's it!
Now when you connect from Delphi to PAServer, the connection succeeds.
Note: Interestingly, when I was not using the mobile hotspot method on Windows, the IP address on PAServer (and on Windows) was 10.xx.xx.xx. With the mobile hotspot, the IP address is 192.xx.xx.xx.
I just configured (today) a new macos sierra with paserver. yes it's painfull :(
don't use virtualbox (it's buggy and slow), but use instead VMware, it's work like a charm. it's much more easy to have only one computer to develop than 2. also you can copy/past the log or anythink else from macosx to windows (or vice-versa) in just one click. and you will not have any internet problem or anything else ...

Getting Network Link conditioner to only affect iOS Simulator, not the entire Mac?

Is there a way to use Apple's Network Link Conditioner in such a way that it only affects the iOS Simulator, and not the rest of the Mac?
My KB+M is connected to the Mac via a program called Synergy, which lets me share my Windows KB+M with it, and attempting to run unit tests on the iOS Simulator with any packet loss profiles selected in the Network Link Conditioner makes it almost impossible to control the Mac at all.
I have had the same issue for a while and have been trying to find a solution.
I eventually gave up and started using the Charles Web Proxy instead because it's free (they claim only for 30 days but it works forever) and it allows you to choose which websites you want to throttle internet access for.
Please share if you can do something like that with the network link conditioner.

How can I test an iPhone application on device without the key

How can I run my XCode SDK application on my iPad without key and without jailbreak?
(I found a description yesterday, but cant find it back).
This can be with the device connected to my development machine.
(I can afford the $99, but I cant wait for it to arrive)
Without program membership and without jailbreak? You can't.

Resources