After buying from codecanyon, configure and everything was working fine but the social (Facebook, WhatsApp, Messenger, etc) share button is not working.
Test all the share links on real device simulator, not support share URL.
First of all, check your share link type and follow bellow:
Type 1:
For example if your URL something like:
fb-messenger://share/?link=https%3A%2F%2Ftuspas.ba%2Fponuda%2Fsarajevo%2Cnovigrad%2Cnovosarajevo%2Cstarigrad%2….
viber://forward?text=NEDJELJA%2006.12.%20u%2011%3A00%20sati%2C%20TOBIJA%20(lutkarska%20predstava%20za%20djecu%204+….
That’s mean your prefix is “fb-messenger” and “viber“. So it’s not any URL you need to allow this first on your project. Please check here, if your prefix not found then please add it to the list.
After that add bellow code for your prefix, In my case prefix is “fb-messenger” and “viber“, so my code will be:
if
(url.absoluteString.hasPrefix("fb-messenger")) { browseUrlInternal(viewcontroller:
self
, url: url) }
else
if
(url.absoluteString.hasPrefix("viber")) { browseUrlInternal(viewcontroller:
self
, url: URL)
}
Type 2:
If you are URL something like this or a valid URL then:
https://m.facebook.com/xyz/feed?app_id=27581114690850…..
Add this below code on your HomeViewConroller.
else if(url.absoluteString.contains("google.com/maps")
|| url.absoluteString.contains("m.facebook.com/")){
browseUrlExternal(viewcontroller: self, url: url)
decisionHandler(.cancel)
return
}