BLE SensorTagEX example runs once on iOS 6.1 Simulator then hangs on subsequent attempts - core-bluetooth

My environment:
Mid 2012 MacBook Air
Mac OS X 10.8.4
Xcode 4.6.3
Cirago BTA8000
...and TI CC2541 SensorTag (with fresh CR2032 battery)
I have downloaded and installed the SensorTag iOS source code examples and I am attempting to build and run the SensorTagEX example app.
Starting from a fresh Mac restart, I launched Xcode, opened the SensorTagEX project and successfully built and ran the app in the iOS 6.1 Simulator by clicking on Xcode's Run button. Then I stopped the app in Xcode and quit the simulator to read the source code files. Then I clicked Xcode's Run button once again but got different results.
The app appears to hang after detecting the SensorTag device. In the Xcode console, I see:
2013-07-23 14:44:07.455 SensorTagEX[1776:c07] Found a BLE Device :
<CBConcretePeripheral: 0x9553db0 UUID = <CFUUID 0x955f830> 924D7A39-
DEC2- 2C4B-3E0E-AD485CCFD45C, Name = "TI BLE Sensor Tag",
IsConnected = NO>
2013-07-23 14:44:07.457 SensorTagEX[1776:c07] Found a BLE Device :
<CBConcretePeripheral: 0x9553db0 UUID = <CFUUID 0x955f830> 924D7A39-
DEC2-2C4B-3E0E-AD485CCFD45C, Name = "TI BLE Sensor Tag", IsConnected =
NO>
and then nothing else.
If I reboot the Mac and relaunch Xcode, as before, I can run the SensorTagEX app once successfully, then subsequent runs appear to hang, as before.
The SensorTag board has a sticker that says "1.3 1252"
Any help or guidance will be much appreciated.
Thanks!

Related

Cannot run my App on a device disconnected from Xcode

With the last version of Xcode (12.0), I do not succeed to run my App on my device without usb cable.
When connected, the app is installed and works well, but when I remove the cable the App closes and I cannot reopen it...
Then, I have an alert on Xcode saying "Lost connection to the debugger..."
I tried to modify the Runner configuration settings with Releaser and Debug, but same results.
For info: I am using Flutter sdk.
Please help..

Xcode fails to install watchOS app onto Apple Watch device

Xcode "Run" operation fails to install a watchOS app on a real Apple Watch device with error description:
The host is not paired with the device.
Context:
First time ever trying to install a watchOS app from Xcode onto an Apple Watch device for testing/debugging
The watchOS app is an official Apple SwiftUI tutorial example
Assume latest versions of MacOS, Xcode, watchOS, Watch device, etc.
The selected scheme is the watchOS app target
The selected device is "[my Apple Watch name] via [my iPhone name]"
The Apple Watch is in fact paired with the companion iPhone, despite what the Xcode error says
The Apple Watch has not yet trusted this particular Xcode, Mac, developer account, or app. The Apple Watch should have received a "trust/don't trust" notification, but did not; this may be a bug on Apple's part.
However, we can force the notification to pop up by simply restarting the Apple Watch device. The Watch should receive the notification immediately upon restarting. Click "Trust" in the notification on the Watch. Then retry, from Xcode, the "Run" operation. The watchOS app should now install OK on the Apple Watch device.
What needs to be done is restarting both devices, iPhone and paired Apple Watch, connect iPhone to computer with cable. When the trust/don't trust notification appears on the Apple Watch or iPhone obviously choose 'trust'. Then the app will install again.
What it stops from running on your watch sometimes is if you have a simulator debug session open still. It says it can't install because there is another debug session running (but not on your watch..)! Closing this simulator session will allow you to install on your watch.
Other times xCode is building fine and thinks it's running the app on your watch, but it runs an old version and you don't see any changes made. Then you have to delete the app from your Apple Watch.
What also sometimes stops it from running on the Apple Watch are in Xcode the Preferences->Accounts->Profiles. Installing them manually will help in that case.
If nothing works uncouple your apple watch from your iPhone and recouple again.
Why isn't this still been resolved? I see people complaining about it for several of years now. Is this bug only related to standalone apps?

Xcode does not install watchOS app for debugging on device

This is on watchOS 4.3 beta (15T5165e) and Xcode 9.3 beta (9Q98q), but I don't think it's because of them being in beta because another WatchKit project ran on device just fine. I have tried unpairing/repairing, restarting the iPhone/Watch/macOS/Xcode (while making sure to to tap "trust this computer" on the watch) but Xcode still says "Running" in the WatchKit scheme without actually installing and running the watchOS app, eventually saying "Watch app launch timed out."
Disable WiFi on the iPhone. This helped me.
I came to this after following #Appyx advice to activate a hotspot on iPhone. Then I noticed, that in hotspot mode WiFi is automatically disabled and tried this.

Swift sample code compiles but does not connect to Phantom 4

I've successfully compiled the Swift sample code onto my iPhone 6S, however, the status continues to remain in Trying to connect. I'm able to connect with the DJI app itself so it must be something to do with the code or some configuration. Any tips? Also, is there any way to connect to the Phantom with the iOS simulator or is it necessary to compile onto the device to be able to connect to the remote?
OSX: El Capitan 10.11.6
iPhone 6S with iOS 11.0.2
XCode 8.2
You should read the bridge app tutorial
http://developer.dji.com/mobile-sdk/documentation/ios-tutorials/BridgeAppDemo.html
so that you can run your app from the iOS simulator.
As to connecting with iOS 11.0.2 - if you open your app, then un-plug and reconnect the USB cable with your app in focus, how does it go? Some issues are being seen with multi-tasking apps into the DJI remote controllers, and it's an issue that is being worked on.
Hope that helps!
You might have to plug the lightning cable into the phone after the application has already launched, then your Phantom 4 will appear.

Message from debugger: unable to attach error for osx app

I have been building mac app on my mac mini and it always worked well but today i faced this error, searched a lot but no luck.
Message from debugger: unable to attach
What i tried:
Clear derived data
Quit Xcode
Restart machine
installation directory set to blank and also to /Applications
Tried Skip Install No / Yes
Using developer Signing certs
M using only Developer certificates and not provisioning profile to sign my cocoa app
Xcode 8.2
OSX 10.12.1
Please help :)
This is what fixed it for me, perhaps it will help others but I do realize the question was for 8.2. I had it set to Xcode 9 "New Build System" disabling this and switching to "Standard Build System" in the Project Settings under the File Menu. I had tried all the other things like killing DerivedData, clean build, restarting Xcode. I also verified that my dependent libraries were set correctly. The only thing that worked was disabling new "New Build System"
I just had this problem today. I have little demo code in a mac project(created with Xcode 9.4). This error just started to occur after I upgraded system to macOS Mojave 10.14. However, in Xcode 10 this project runs no problem(without changing anything). If you can use Xcode 10 it will probably be fixed.
Unfortunately, the above solutions didn't work for me (although I am sure they work for some people).
Here is what worked for me, in case this helps anyone else:
Close Xcode
Open Xcode and Create a new Xcode project
In the iOS template, select Single View App then click Next
yes, I know you are trying to get a macOS app attaching to the debugger :).
Give the iOS app any product name and organization identifier you would like and click Next
Create the new project anywhere you would like (I saved it to my desktop)
Build and run (cmd + r) the iOS app on a simulator like the iPhone 8 (starting a simulator and running the iOS app will take a little time, so have patients)
After the iOS app runs in the simulator, click to stop it from running (the stop button is next to the run button)
Open your macOS app that you are having trouble connecting a debugger to, and build and run it (cmd + r)
This, for some reason, allowed me to connect to the debugger with my macOS app...
Xcode version: 10.1, macOS Mojave version: 10.14.2

Resources