error - opening session failed as protocol [name] is not declared - ios

I'm trying to connect a heart rate monitor via bluetooth. I have the device's SDK.
When I instantiate an object of type HRMonitor - it's delegate prints connectionChanged
Probably connected and working fine.
But right after that I get the folowing output:
2013-04-10 11:36:00.409 TestHRMonitor[601:907] connectionChanged
2013-04-10 11:36:00.415 TestHRMonitor[601:907] ERROR - opening session
failed as protocol com.ssiamerica.ipulse is not declared in Info.plist
2013-04-10 11:36:00.417 TestHRMonitor[601:907] ERROR -
/SourceCache/ExternalAccessory/ExternalAccessory-213.3/EASession.m:-[EASession
dealloc] - 137 unable to close session for _accessory=0x1fd26e70 and
sessionID=65536
I only have .h,.a files.
Sorry, I know this is a newbe's question but:
Can anyone please explain more about this error, and how do I declare this protocol in Info.plist?
[EDITED]I've worked this out.
All I needed to do is:
1. Open info.Plist
2. Add a key "Supported external accessory protocol.
3. add to the key the value [name] that was stated inside the error description.

I've worked this out.
All I needed to do is:
Open info.Plist
Add a key "Supported external accessory protocol.
add to the key the value [name] that was stated inside the error description.

Related

Unable to set a symbolic breakpoint to some Classes

I had to investigate when a certain cookie was being set but unfortunately, I couldn't figure it out just seeking in the codebase. So as usual, when the game gets tough, I go and set a symbolic breakpoint. This time, against all odds, I wasn't able to.
In particular, I have been trying to set a symbolic breakpoint to the NSHTTPCookieStorage method setCookie: and neither from the Breakpoint navigator nor from the debug console I couldn't manage to set it.
For example:
(lldb) br set -F '-[NSHTTPCookieStorage setCookie:]'
Breakpoint 6: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
I have also tried to set the Module (Foundation) but nothing changed. The same happened also for the NSURLSession method downloadTaskWithResumeData:completionHandler: Then I tried with some other Foundation's classes and it always worked, except for all of those who are part of this group inside the Apple Documentation as NSHTTPCookieStorage and NSURLSession.
I thought it could be related to some security concerns but I also remember I applied a symbolic breakpoint to some Keychain and SecKey's symbols.
Did anyone else experience the same? I haven't found any doc where something similar was mentioned.
I do get a resolved bp in my case with the same:
br set -F '-[NSHTTPCookieStorage setCookie:]'
command (side note b '-[NSHTTPCookieStorage setCookie:]' would work to).
It seems in your case lldb has not loaded CFNetwork for whatever reason.
Mine
image lookup -vn '-[NSHTTPCookieStorage setCookie:]'
yields
1 match found in /Users/myusername/Library/Developer/Xcode/iOS DeviceSupport/12.4.1 (16G102)/Symbols/System/Library/Frameworks/CFNetwork.framework/CFNetwork:
Address: CFNetwork[0x0000000181478fbc] (CFNetwork.__TEXT.__text + 51832)
Summary: CFNetwork`-[NSHTTPCookieStorage setCookie:]
Module: file = "/Users/myusername/Library/Developer/Xcode/iOS DeviceSupport/12.4.1 (16G102)/Symbols/System/Library/Frameworks/CFNetwork.framework/CFNetwork", arch = "arm64"
Symbol: id = {0x00000af7}, range = [0x00000001b6628fbc-0x00000001b6629020), name="-[NSHTTPCookieStorage setCookie:]"
If you're on real device try
image add '/Users/myusername/Library/Developer/Xcode/iOS DeviceSupport/12.4.1 (16G102)/Symbols/System/Library/Frameworks/CFNetwork.framework/CFNetwork'
(obviously path substitute for appropriate iOS version^)
If you're on simulator try
image add '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork'
If you don't get an error then try setting your symbolic breakpoint at that point.

SwiftUI preview crash after modify core data entity's attribute

Prior to this issue, the preview is running fine. However, after I have changed the type of the attribute (e.g. from String to Float) inside a .xcdatamodeld file and modify the manual definition file accordingly, which looks similar to this
public class test01: NSManagedObject, Identifiable {
#NSManaged public var var01: String
...
}
The simulation crashes on first few tries but works again after I removed the application inside the simulation iPhone. But then when I tried to use the preview, it always show an error tab saying that it always crashed in updating the view, even the simplest starter file, "Hello World", given when creating the SwiftUI preview file.
Application Specific Information:
Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134140 "Persistent store migration failed, missing mapping model." UserInfo={destinationModel=() isEditable 0
At this point I could not find the solution, any idea on this bug/problem?
Try deleting the preview canvas simulators as well. They exist in:
~/Library/Developer/Xcode/UserData/Previews/Simulator Devices/
The preview canvas probably has the old version of the data model.
You may need to do this command at command line:
killall -9 com.apple.CoreSimulator.CoreSimulatorService
And restart XCode as well.

Xcode error - use of undeclared identifier 'GAdInterstitialKey_Live'

When I'm trying to build this project in Xcode8 I get this error
use of undeclared identifier 'GAdInterstitialKey_Live'
on this line
interstitial = [[GADInterstitial alloc] initWithAdUnitID:GAdInterstitialKey_Live];
Do you have that string in some part of your code? By the way, are you using admob? Interstitial might be related to it.
Assuming you are using something like admob you have to define keys provided by the service to relate the user to your app. You might not have defined then or dit it in a wrong way.

Google tag manager error

I´m having these messages:
GoogleTagManager error: _us has no backing implementation.
GoogleTagManager error: Failed to parse an invalid boolean:
Do you know why this happens?
Seems like you're referring to a buil-in variable that no longer exists, see this answer on a similar post:
https://stackoverflow.com/a/31041264/805337
EDIT: this could happen if you deactivate a built-in variable or if you changed the GTM version you're using

iOS DropboxSDK [WARNING] - ( 400 )

I demo the sample code "DBRoulette",and use my Appkey and Appsecret to run, Access type = App folder,but when i build to run picture then show this warning , please give me some instruction to this warning than show the picture,thank you!
With reference to DropBox Api (Standard API errors)
400 Bad input parameter. Error message should indicate which one and why.
You can further investigate error object for details!

Resources