Bluetooth diagnostics logs on iOS - ios

I'd like to generate Bluetooth diagnostics logs on iPhone. I've installed Bluetooth Development Profile and I can click on "Save logs". But where can I find them and how can I transfer them to PC?
Preferably without iTunes, as on Windows I have very bad experience with this SW. I'm new to Apple ecosystem.
Thank you.

Your answer can be found in the Apple documentation here.
The steps are as follows.
Download and install the profile on your device (this can be done through Safari on the device).
Restart your device.
Reproduce any bluetooth commands you would like to diagnose.
Go to Settings > Bluetooth and select Diagnostic Mode
Add short description of the problem and tap Save
Sync device via iTunes (there doesn't seem to be a way to pull them manually without a rooted device).
Windows 7, 8, and Vista logs can be found at:
C:\Users\[Your_User_Name]\AppData\Roaming\Apple Computer\Logs\CrashReporter\MobileDevice\[Your_Device_Name]\BluetoothDiagnostics\
OSX logs can be found at:
/Users/[Your_User_name]/Library/Logs/CrashReporter/MobileDevice/[Your_Device_Name]/BluetoothDiagnostics/
The logs will be saved into timestamped folders like this Logs-2015.12.8-00.50.55/.

Related

App discovers bluetooth devices only when ran from Xcode

I'm working with a fork of this project for Empatica E4 wristbands and I'm unable to make the discover devices work without running the app from Xcode. The situation can be replicated with the original sample project.
When I ran the project through Xcode, I can see the list of nearby devices.
However, when I close the app and ran in from the phone (instead of clicking "play" on Xcode), I can't see any device.
Should I configure something on the Project or own a developer account? Right now I'm not paying a developer account but I thought I could do this without using Xcode to run the app. Thanks.
In short: I can open the app without connecting the phone to XCode but I can't discover devices when I'm not connected to XCode.
More details.
When executed through Xcode on the iphone, the device discover works. On the logs, we can see:
E4tester [didUpdate] status 2 • kBLEStatusScanning
bluetoothd Received XPC message "CBMsgIdScan" from session "Empatica.E4testerCV-central-313-24"
bluetoothd Received 'start scan' request without duplicates for all UUIDs from session "Empatica.E4testerCV-central-313-24"
bluetoothd State of application "Empatica.E4testerCV" is now "foreground-running"
However. When the app is opened on the iPhone (instead of ran via Xcode), we get the following log messages:
E4tester [didUpdate] status 0 • kBLEStatusNotAvailable
E4tester Task <EA813C26-F662-461C-8C47-A97FA7E32BA4>.<0> response ended
E4tester Task <EA813C26-F662-461C-8C47-A97FA7E32BA4>.<0> done using Connection 1
The important detail here is the kBLEStatusNotAvailable status, which contrasts with kBLEStatusScanning. According to their docs this means The iOS device does not support Bluetooth LE, or the Bluetooth LE module is not active. but the device does support BT LE and is enabled.
I opened an issue on their repository.
You need developer's account for testing Xcode apps in devices.
Developer account will give certificates and provisioning to run app in device. There is 2 certificates develop and distribution.
In your case you don't have any apple account. so maybe u are using freee provisioning
Please read this one to understand free provision:
Test iOS app on device without apple developer program or jailbreak
Maybe the capabilites on free provision is limited on debug mode *(runned from xcode)
In the end I got a direct answer from Empatica support team which I think is perfect since I sought an answer from credible and/or official sources.
Still, I would like to thank Antonio for his useful answer as well as Scriptable and Hichem for their messages.
The answer from Empatica E4 team is the following:
#carlosvega If you are working with an iPhone with iOS 11 or 12 you
should add the string NSBluetoothPeripheralUsageDescription in the
Info.plist file. The sample code has been created a while ago before
the privacy string was mandatory.
-- Empatica Engineering Team

How do I run/test my Flutter app on a real device?

I want to run/test (not automated test) my Flutter app on a real iPhone and Android phone during development. However, Flutter docs seem to only document how to do it with the iOS simulator or Android emulators.
I think it's already a no-brainer for iOS/Android devs but I am neither and Flutter is my first foray into mobile development.
Is there any link to a beginner's guide somewhere on how to develop while running it on a real device (with all of Flutter's live-reload goodness)?
Additional context
I'm a web developer.
I use Android Studio and VS Code.
I work on a MacBook.
For Android, this is pretty easy:
Enable Developer options and USB debugging on your device. This varies slightly by Android version, but the short version is you tap on the Device Build Number 7 times. Then a "Developer Options" option comes up and you can click "enable USB Debugging." See the linked Android documentation for the most up-to-date instructions.
Then plug your phone into your computer with a USB cable. You'll probably see some popup on your phone asking if you want to allow USB debuggng with that computer. Say "yes".
Run Flutter just like you would if you had a simulator running.
Using the right cable can make a difference. If the device is charging but nothing happens, try using another cable, preferably the one that came with the device. A notification on the device (e.g. "connected as a media device") and on Windows (e.g. "Device connected and ready to go") are indications that the USB connection is working. You should then be able to see the device on the CLI with:
flutter devices
For iOS this is a little more complicated because you need an Apple ID or to sign up for a "Developer Account":
Open XCode, then open "Preferences>Accounts". Sign in with your ID.
"Manage Certificates" > click on the "+" sign and select "iOS Development".
Plug your device into your machine. Find your device in the drop down (Window > Organizer).
Below the Team pop-up menu, click Fix Issue.
In Xcode, click the Run button.
(in subsequent runs, you can deploy to the iOS device with Android Studio, VS Code, or any other IDE of choice, you just need to set up that certificate the first time with Xcode. Here's Apple's documentation on setting up Xcode to run a physical device.)
Also, you can use your android device wirelessly using scrcpy.
Visit this link and install scrcpy. https://github.com/Genymobile/scrcpy
After you install and path scrcpy on your PC/Laptop.
Make sure your phone is connected to your PC/Laptop.
Enable Developers Options and Connect your device to the WIFI.
Open CMD.
Input "adb tcpip 5555". The adb should be restarted
Next, input "adb connect ipaddressofyourdevice:5555"
Ex: adb connect 192.168.254.19:5555
Now, you can use your device wirelessly.
Attach your real device on your development PC. To check setup process, run flutter doctor command. If result success of all required criteria then hit
flutter run

Easiest way to get logs from beta tester iOS device?

I have a beta tester who is experiencing a crash upon launching my app. I have Flurry Crashlytics enabled, but I guess it isn't lasting for long enough for those reports to be sent out.
He's a remote user, so I can't plug his computer into my computer, and I doubt he has XCode or any other development tools installed on his own computer.
How could I get the crash log from his phone so I could have a better idea of where the issue lies?
You can have him access the logs directly on the device under Settings, Privacy, Diagnostics & Usage, D&U data. Here it lists the crash logs. You could have him copy and paste the log to send it to you.

How to get access to beta device logs using Apple's TestFlight

In the old TestFlightApp, there was an SDK that allowed developers to log info on the device and then access those logs from the TestFlight website.
After the Apple takeover of TestFlight, I'm not seeing an option to do this through iTunes Connect.
Does anyone know of a way to do this using Apple's new version of TestFlight? Or does anyone have any recommendations for a simple approach to viewing device logs during beta testing?
If you can get your beta testers to send you log files manually, you have a few options. You used to be able to use the iPhone Configuration Utility to view device log files, but it no longer works as of iOS8. The only OS X tool to view device logs other than Xcode that I've been able to find is iOS Console from Lemon Jar Labs (http://lemonjar.com/iosconsole/). It's a very nice tool and I actually prefer it to the Xcode console log - I especially love the filtering ability. I've also seen reference to iTools (http://www.itools.cn/) that works under Windows being able to access device log files, but have no personal experience with it.

Using the Network Link Conditioner on iOS devices

How can I simulate various network conditions directly on my iOS device? I know this is possible on a Mac thanks to the Network Link Conditioner. Is there something similar on iOS devices?
Yes, with iOS 6, it is now possible to use the Network Link Conditioner directly on your iOS device, if your device is set to be enabled for development.
Simply go to Settings > Developer > Network Link Conditioner to enable it.
If you don't see Settings > Developer, to enable it:
Connect your iPhone to your Mac.
Xcode > Organizer
Select your iPhone.
Click Use for Development.
I've noticed that sometimes the Developer menu item disappears. It reappears again when installing an app using Xcode.
Might also mention that the developer option doesn't show up in settings sometimes until you tether the device and launch Xcode.
Close Settings>tether device>launch Xcode> Open Settings
So strange thing happened for me and hopefully it'll save someone the hassle.
I had my phone set to developer mode as I've used to build multiple apps previously.
For some reason, searching "Network Link Conditioner" in Settings doesn't bring up anything. Searching "Developer" brings up the Apple Developer app (if you have it installed) that shows info about WWDC videos, news etc. about Apple development.
For a little while I thought my phone wasn't in developer mode but scrolling thru Settings to see the other "Developer" option for actual developer settings of the device, its still there.
As an update for iOS8, and for people confused about the next step, if you have already gotten to the step in which you deploy to your device, all you need to do is go to on the device > Settings > Developer > Network Link Conditioner.

Resources