I iCAB Well-Known Member Licensed User Longtime User Sep 1, 2021 #1 Hi There, I am using Square mobile POS and I believe that this code was working before: In main: B4X: #QueriesSchemes: square-commerce-v1 B4X: #If ObjC - (BOOL) checSquareInstalled { if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"square://"]]) { //canOpenURL:[NSURL URLWithString:@"square-commerce-v1://"]]) { NSLog(@"square INSTALLED"); return true; } else { return false; } } #End if Now I am getting: -canOpenURL: failed for URL: "square://" - error: "This app is not allowed to query for scheme square" Any ideas? Thanks Last edited: Sep 1, 2021
Hi There, I am using Square mobile POS and I believe that this code was working before: In main: B4X: #QueriesSchemes: square-commerce-v1 B4X: #If ObjC - (BOOL) checSquareInstalled { if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"square://"]]) { //canOpenURL:[NSURL URLWithString:@"square-commerce-v1://"]]) { NSLog(@"square INSTALLED"); return true; } else { return false; } } #End if Now I am getting: -canOpenURL: failed for URL: "square://" - error: "This app is not allowed to query for scheme square" Any ideas? Thanks
Semen Matusovskiy Well-Known Member Licensed User Sep 1, 2021 #2 1) You need to uncomment the second CanOpenURL instead of first 2) No need to use OBJC. Use App.CanOpenURL Upvote 1
1) You need to uncomment the second CanOpenURL instead of first 2) No need to use OBJC. Use App.CanOpenURL
I iCAB Well-Known Member Licensed User Longtime User Sep 1, 2021 #3 Semen, you are absolutely right. Thank you! Upvote 0