ARChromeActivity
ARChromeActivity copied to clipboard
Activity showed without chrome
In ARChromeActivity.m
- (BOOL)canPerformWithActivityItems:(NSArray *)activityItems {
if (_callbackURL && ![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"googlechrome-x-callback://"]]) {
return NO;
}
for (id item in activityItems){
if ([item isKindOfClass:NSURL.class]){
NSURL *url = (NSURL *)item;
if ([url.scheme isEqualToString:@"http"] || [url.scheme isEqualToString:@"https"]) {
return YES;
}
}
}
return NO;
}
When the _callbackURL is nil (most case I need not set the callback url), the activity will show. Even though in my iOS simulator.
This "can perform" logic may need to be updated? I think we should not use "&&" in if.