New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logViewContent error: values are not NSStrings or NSNumbers #73
Comments
I've got some more insights to where this is happening. I noticed that the line I mentioned was from the Facebook iOS SDK not this plugin. facebookAppEvents.logEvent(
name: FacebookAppEvents.eventNameViewedContent,
parameters: {
FacebookAppEvents.paramNameContentType: 'TYPE_HERE',
FacebookAppEvents.paramNameContentId: 'ID_HERE',
'title': 'test,
},
); everything works fine. The bug is that parameters: {
paramNameContent: content,
paramNameContentId: id,
paramNameContentType: type,
}, the plugin tries to place the Map as a Map-value in the property For some reason the tracked events on iOS don't show up in the event debugger – but the same codebase on Android does, but that's something for another issue and might be related to the iOS14 privacy updates? |
Thanks for bringing this to attention, I see the issue and where it went wrong The definition of |
Fixed in 22e254a |
* master_up: Bumping version Fixing issue oddbit#73 Updating readme with discussions Fixing CHANGELOG Bumping version 0.9.0 Formatting Formatting Removing resource files PR fixes Upgrading facebook-core to 9.0.0 Upgrading FBSDKCoreKit to 9.0.0 fix typing error pubspec update fix stupid errors changes to get my local working additional feature to support iOS14
Expected Behavior
Expected the logged event to go through and show up in the events debugger.
Current Behavior
Event doesn't show up and XCode console shows the following error:
Possible Solution
Since I don't really know why a simple string wouldn't qualify as a NSString, I can't give any good solution.
I don't know Object-C but just from reading the check that produces this error: FBSDKAppEvent.m:1198 reads:
if (![obj isKindOfClass:[NSString class]] && ![obj isKindOfClass:[NSNumber class]]) {
for some reason the
obj
variable holds the whole dictionary instead of just the value ("test") so it's not checking the actual values of thecontent
Map provided, but the whole Map in dictionary format.Steps to Reproduce (for bugs)
Context
After implementing the plugin according to the example neither the automatic events (App Install etc.) nor the logged events showed up in the Facebook Event Debugger. The XCode console showed the following error on the logViewContent:
As you can see I tried to simplify the submitted value to "test" to ensure it's just a basic String.
I've found a similar issue here: #27
which was suggested to be fixed, but seems not to.
Your Environment
flutter doctor
MacOS Catalina 10.15.7 developing for iOS.
The text was updated successfully, but these errors were encountered: