Add to home function [duplicate] - objective-c

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How could I create a shortcut on desktop in iOS through an app
I want to know if it's possible with the iOS API to put a web page on the home screen (in Objective-C). A specific event to catch ? A "magic" function ? :)
Thanks :)

Nope, apps can not do anything outside their sandbox.
As the answer to this question explains, you can launch your page you want to save in Safari and provide users with instructions to save the page from there, then use a url to switch apps back to your app from Safari afterwards, but you can't add a webapp to the springboard from your app itself

Related

Does Agora support screen share on Safari?

i dont have a straight answer whether Agora supports screen sharing on SAFARI. This 4x api page does not seem to list Safari at all, and there is some chatter on Stack overflow to that effect (at least for 3.x api) https://docs.agora.io/en/Interactive%20Broadcast/screensharing_web_ng?platform=Web
This is a show stopper for me, so appreciate a straight answer YES or NO whether Agora supports screen sharing on safari
When i tried it, I got a getDisplayMedia error:
"getDisplayMedia must be called from a user gesture handler" on Safari 13+. I do indeed create the new client, join and publish the local video upon an actual user click on a button, so not sure why we get this error. Only happens with screen share, camera/mic work
Looks like you answered your own question on the Agora RTE Dev Slack, I'll relay it here for anyone looking for a solution.
How Sri did it was essentially:
AgoraRTC.createScreenVideoTrack(..).then(() => client.join( ..)

How to open the apple app store internally using a modal segue

I am currently making an app that recommends other apps to download on the apple app store. I assumed that the only way for users to download these linked apps was to call the iTunes URL of the particular app -> the apple app store would then open pushing the original calling app into the background -> then the user would press the download button here as per normal.
Then I was playing with the app "App Hero" and they do something I thought wasn't possible. You can actually download another app to your device without ever leaving the "App Hero" application. I thought this was impossible due to sandboxing. They have a modal segue to what appears to be an embedded app store where you can commence installation of another app. This "embedded" app store doesn't have the usual UITabBar running along the bottom but everything else is basically the same.
Does anyone have any idea how they would have achieved this? It doesn't appear to be a UIWebView, perhaps I am wrong. And is this against any of the apple regulations?
*This is no way an advertisement for "App Hero". I am genuinely impressed/confused how they are able to do this and would love this functionality in my own app if it is allowed.
The class you are looking for is called SKStoreProductViewController. Docs here.

Current location alert access

What is the class or API used to popup the alert to the user for their current location access permission to the app?
When you are using core-location the app shows automatically the alert for permission. You can't disable/enable that by yourself.
Not quite sure what you're asking ... is this related to a web application? iphone? android? java? fortran? Anyway, i'll go on a limb here and think you're referring to the HTML5 GeoLocation API:
http://html5demos.com/geo
This other question may be of value to you if it's iOS and you don't want to do it once with HTML5 ...
What's the easiest way to get the current location of an iPhone?

Facebook like with sharekit on iphone [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
iOS 'like' facebook application page, how to do it?
i build a web site and it has a facebook like button. i handled the link of the like button and want to make it with sharekit.
For example, i can handle share button and share it with sharekit but i cannot do it for like button also.
Did anybody something like that or is there any other way to this?
The only way to allow a user to like a link or page or anything is to embed the iframe/xfbml like button code in a UIWebView control.
It seems there is an agreement on not being able to do this. However, this post shows you can:
Using 'Like' with the Facebook Graph API on iOS
To back it up, here's an excerpt from FB Graph API documentation:
You can comment on or like any object that has a /comments or /likes
connection by posting to https://graph.facebook.com/OBJECT_ID/comments
and https://graph.facebook.com/OBJECT_ID/likes, respectively:
(source: http://developers.facebook.com/docs/reference/api/)

disabling the home button on ipad [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Disabling home button on iPhone/iPad
hi developers
i am trying to disable the home button. the reason being my app is designed to be like a convenience store register , the person using the app would be entering the opening and closing balance while loggin in and loggin out of his shift. so when the home button is pressed(accidentally) there is no way of entering the closing balance.i did try some stuff in applicationWillTerminate method in the app delegate , but it did not work. i have put a check mark against "application will not run in background" in the info.plist so that the user has to login again with the password(that takes care of security issue). now , what i was thinking was instead of trying to code in applicationWillTerminate is there anyway i can disable the home button so that the only option left out for the user to logout is the proper logout button.
and last of all , this app will not be in the Appstore , its for a client. i dont have to bother apple rejecting my App for sure.
The only way would be to get a case that covers the home button
IMPOSSIBLE!!! not even an API for a jailbroken phone will have this feature.
try some alternatives:
do allow the app to run in the background,
but log the user out after 2mins of backgrounding [takare of your security], by saving the current time in applicationWillResignActive and checking it against timeIntervalSinceDate in applicationDidBecomeActive
save the closing balance as a variable in NSUserdefaults against that user when logging out due to timeout/terminating and maybe ask him if he wants to enter it in if he logs in again.
Short answer: no. You can't do that.
I'd be very surprised if this was possible, even using private APIs.
In essence, the operation of the home button is controlled by the underlying OS (the "springboard" app launcher in this case), so it's unlikely to be possible for an application to override or somehow block the "button pressed" message.
That said, some alternatives have been discussed within the existing Disabling home button on iPhone/iPad question.