ARChromeActivity icon indicating copy to clipboard operation
ARChromeActivity copied to clipboard

Activity showed without chrome

Open bynil opened this issue 10 years ago • 0 comments

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.

bynil avatar Oct 20 '15 09:10 bynil