void _alibabacloud_rum__set_custom_event()

in Sources/AlibabaCloudRUMBridge/AlibabaCloudRUMBridge.m [135:161]


    void _alibabacloud_rum__set_custom_event(const char *event_name, const char *event_group, const char *snapshots, double value, uint32_t length, char **kvs)
    {
        NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
        if (length > 0)
        {
            for (uint32_t i = 0; i < length; i++) {
                if (NULL == kvs[2 * i] ||
                    NULL == kvs[2 * i + 1] ||
                    strlen(kvs[2 * i]) == 0 ||
                    strlen(kvs[2 * i + 1]) == 0 )
                {
                    continue;;
                }

                [dictionary setObject:[NSString stringWithUTF8String:kvs[2 * i + 1]]
                               forKey:[NSString stringWithUTF8String:kvs[2 * i]]
                ];
            }
        }

        [AlibabaCloudRUM setCustomEvent:[NSString stringWithUTF8String:event_name]
                                  group:NULL == event_group ? nil : [NSString stringWithUTF8String:event_group]
                              snapshots:NULL == snapshots ? nil : [NSString stringWithUTF8String:snapshots]
                                  value:value
                                   info:dictionary
        ];
    }