I'm writing a SIMBL plugin for Chrome and I'm getting a particular instance with an unexposed type which is written in C as a NSConcreteValue
. I cannot unwrap it or perform selectors on it, but I can get its type string with [myInstance objCType]
.
The type I'm talking about is GURL
.
Here is some code:
NSArray* tabViews = [tabStripController performSelector:@selector(tabViews)];
for (id tabView in tabViews) {
id tabController = [tabView valueForKey:@"controller_"];
id tabTitle = [tabController valueForKey:@"toolTip"];
id tabUrl = [tabController valueForKey:@"url_"];
NSLog(@"%@", tabTitle);
NSLog(@"%s", [tabUrl objCType]);
}
The tab title is not an issue since it's a NSString
.
[tabUrl objCType]
returns this:
{GURL={basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >={__compressed_pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<char> >={__rep=(?={__long=QQ*}{__short=(?=Cc)[23c]}{__raw=[3Q]})}}}B{Parsed={Component=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}{Component=ii}^{Parsed}}{unique_ptr<GURL, std::__1::default_delete<GURL> >={__compressed_pair<GURL *, std::__1::default_delete<GURL> >=^{GURL}}}}
GURL
has a property called spec_
which I would like to access to get the ASCII string of the GURL instance.
Here is GURL: https://chromium.googlesource.com/chromium/src/+/lkgr/url/gurl.h
Is the objCType string of any help?