ios - How to check if Safari restricted in Settings? -
when safari restricted, [[uiapplication sharedapplication] canopenurl:url]]
return true when call [[uiapplication sharedapplication] openurl:url]]
nothing happened.
i want check if safari restricted in settings - general - restrictions.
this isn't possible in way there hackie way achieve anything. need is, when call safari set global timer before it, schedule few seconds (may 5 seconds), if safari open, app call - (void)applicationdidenterbackground:(uiapplication *)application
, should invalidate global timer, in other case timer fire on scheduled time , you'll know safari couldn't open. can invalidate timer , show user appropriate message.
p.s. comes mind when read question, not sure other possibilities or ways. there can more elegant way.
Comments
Post a Comment