Push notification to alert for Enterprise update? - ios

Are there any suggestions for the feasibility/correctness of this solution? Enterprise app with quarterly updates. Client unwilling to use MDM solution.
Using push, alert the app of an update. An action on the notification or just opening the app pops a modal with a button to open Safari to download the updated app (url is in code). Modal has login info next to the button.
Safari opens, I copy and paste from the modal or just remember the login info. App installs. I reopen and the notif. is gone because a fresh install happened so no need to remove it.
Has anyone done something similar?

If I undestand you right, you can explicitly open URL to manifest of your enterprise build right from your application code instead of opening html page with exactly the same url inside.
NSString * urlString =#"itms-services://?action=download-manifest&url=https://mywebsite.com/path_to_distr/manifest.plist"
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
This will launch the update process.

Related

Is there any way to open appstore updates tab?

Sometimes we are forcing users to update their apps from AppStore. We show an alert if new mandatory version is available and open app page from AppStore. Instead of showing update button, AppStore shows the open button. I know its a bug and there are a lot of threads about it. Instead of showing app page, can i show the updates tab? Is there any url for it?
No, it's not possible for sure. You can only open application page from application.

swift open link in safari/app store

I have a simple iOS app and I'm in the process of developing a pro version of the app. I will then add a hyperlink to the existing app that will point to the url of the pro app in the app store. So is there any recommended way to do this so when the user taps the link, they will be forwarded to the pro app's page on the app store?
Will the user be redirected to the app store if I simply use this piece of code?
UIApplication.sharedApplication().openURL("http://itunes.apple.com/myappname")
As Far As I know, there's no longer
itms-apps://
instead of the regular http://
so the best way is to use this line of code, watch that I've put it in NSURL because you can't past a simple String. Other than that you can use ! at the end or better way is to use IF LET ...
UIApplication.sharedApplication().openURL(NSURL(string: "https://itunes.apple.com/us/app/24-s-wt-h-plyqzyh-hyhydh-smqry/id897282272?ls=1&mt=8")!)
UIApplication.sharedApplication().openURL(NSURL(string : "itms-apps://itunes.apple.com/app/developerName")!)
With this one I couldn't open my app page on the App Store then I went to my iTunes page on Safari, copied my home page uri and pasted it to related code. And it works perfect!
Just copy your iTunes page on the internet and paste it!

How to open downloaded application, when it is downloaded from itms-services?

I have to write my code such that, i want to open downloaded app from current application,
I have URL Scheme of downloaded app, and able to open that app from current application,
But want to open app immediately whenever it is downloaded, also want to know if download is
canceled or any error is occured.
Can you please help me in this case.
Thanks.
Abbas
There is no notification that would ever tell your app that some other app has been installed.
Your only option would be to use UIApplication canOpenURL: once in a while to see if the app exists and then launch it if appropriate. But getting this right would be complicated.
You can't. The sandbox does not allow you to interact with other apps except to invoke them with a custom URL scheme.

Exit an application on button click in iPhone using PhoneGap

I'm using PhoneGap in Xcode. The problem is that I want to quit application when user clicks on Logout button. How can this be achieved?
Is there any alertnative that objective-c code can be used to quit application?
You don't have to launch open using NSTask... open just calls into Launch Services, some of whose functionality is directly available from NSWorkspace.
To quit, you just call [[NSApplication sharedApplication] terminate:nil]. See NSApplication documentation.
You're technically not supposed to exit the application if you're planning to submit your App to the App Store.
See here: https://developer.apple.com/library/ios/#qa/qa2008/qa1561.html
Perhaps, you should bring the user back to some sort of login/landing page instead.

App as shortcut for website

I want to create an app that will act as a shortcut for my website.So basically what i want to do is when user click on app icon it opens my website in safari or other browser and close the app.
I know its not recommended to close app as per apple guideline but i want to do it gracefully like it opens browser now its work is done; close the app.
Does anybody have any idea?
I can open the browser using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"myurl"]];
but don't have any idea on how to close app gracefully.
Note: you can NOT do the following in iOS apps (2016):
You can close your app by using this code.
exit(0);

Resources