Cordova ios back button issue - ios

We have developed a mobile application in cordova, after undergoing the application on Apple store 20 days again later, we received a communication in which Apple refuses to submit our application for the following reasons:
Reasons :
10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good, it may be rejected
----- 10.6 -----
We found the following issues with the user interface of your app:
Specifically, there were no back buttons on social media web views displayed in the app. In order to return to the main app from a community page, such as Facebook or Twitter, the app had to be closed and re-launched.
These examples identify types of issues discovered in your app but may not represent all such issues. It would be appropriate to thoroughly evaluate your app to address these types of issues.
In fact we use links to our pages on social networks, it works well on Android, because it simply click the back button to return the phone. Thing that is not obvious on an iPhone.
Is there a method to solve this? A webview? a popup with a close button ? an HTML5 iframe ?
THANK YOU !

You can use official InAppBrowser plugin (it should have a close button x), or just open these links externally in browser (safari).
In addition, IMHO, you are risking to lose your precious users by opening social links on top of your (or inside) your own app. People can get distracted and just browse away.

Related

Facebook pixel event PURCHASE not registering iOS-sales

We have an Woocommerce site and run ads on Facebook and Instagram. When potential customers click on these ads our website is loaded in the in-app browser that Facebook and Instagram uses. What we've discovered is that the Facebook pixel is not sending any purchase data back to Facebook regarding users on iOS. This again means that it's registered as 0 conversions in iPhone and iPad, skewing the audience and algorithms for optimised ad delivery. (The data comes back correctly on Android and computers.)
We've tried several plugins to see if it's plugin related issue, among them Facebook for Woocommerce, Pixel Caffeine and PixelYourSite. No change there.
What is also interesting, is that the metrics for iOS dropped to zero at the same time I switched from another theme to the Divi-theme (which is a page-builder theme for Wordpress). So it may seem like the error is directly related to the theme, but then again there must be something iOS-specific since it works on all other devices, and the theme change though suspicious may be irrelevant.
TLDR: The pixel tracking works exactly like they should on all devices except on iOS in-app browser where the website is displayed as it should be, but where the pixel is not registering purchases.
Edit: We receive other pixel data from iOS as well, it seems that the order confirmation page is the one that is "blocked".
Example of landing page we use for our ads: https://www.friskforlag.no/frisk-graviditet/
Received help from Elegant Themes, developers of the Divi theme. There is a bug in the current version of Divi that will be fixed in the next 2-3 versions. The solution was to comment out a line of code in the core > functions.php file, and after that we were able to track purchases on iOS again.

Can I find out the location of an app's icon on the home screen?

Is is possible to dynamically figure out the position of an app's icon on the home screen of an iphone/ipad?
Sorry I don't have enough credit to comment yet so I'm posting here.
To my knowledge no you cannot natively or easily do this. I know of no open source or other libraries. The reason being that your app exists in its own world, it is not in touch per say with the rest of the device. It can get permissions to read and write data but it doesn't know of itself.
Does that make sense?
When you open a website it cannot know which tab it is in the browser. Instead it knows how it was accessed and what device (physically) is using it. It knows the user-agent, the time, the browser, etc because that is information sent to it in the request. In turn the phone on launch gives data to the app in how to handle it but not for example how many other apps are running, or where it is on the screen. It's not normally considered relevant to run time. In addition it's a security feature in preventing an app from deleting or altering other apps, as well as itself. If you have an iPhone you will notice that SIRI cannot turn off google maps navigation or any other non-apple specific app. Only apps natively comparable and private party ones (ex apples) are accessible because Apple did that intentionally. They all know of their own existence and each others. However non-native in the sense of apps that do not come preinstalled and manufactured by the company creating the device are less trustworthy, in addition there are no guarantees about how they will be run by the device, where they will be, or what other apps will be there.
It is true that an app can request for another app it may be comparable with but it is up the user to handle that information.
May I ask for curiosities sake why you are trying to do this? Are there any other workarounds?
However in terms of it being physically possible, yes. I doubt that apple allows independent developers to do this however. But an example of this occurring may be gridlock where a user can move their apps around differently on the screen. The app in this case has the ability to access app position. But I believe in this case app position is about the UI and not about nested files. apps cannot to my knowledge modify information outside of their own file. Imagine if you had an app that could edit other games scores.
It is not possible to dynamically find out the position of an app's icon on the Home Screen (even for jailbreak apps). Apple wants you to respect the user's privacy settings.
Extra Info - There is popular JavaScript library that adds a promo bubble to the bottom of your mobile web application, inviting users to bookmark the app to their device's home screen.

Another Stand Alone Web App Linking Issue

I have a mobile web app designed as a single place for employees of our company to help them locate various online resources. The app has a lot of in-app content, but also provides links to external partner websites. My issue is a common one with a bit of a twist. I like the way the app looks in standalone mode on an iphone, but am struggling to figure out a solution for keeping the app in stand-alone mode, while also providing the ability to open external links in safari. I know how to keep the app in standalone mode when links are clicked, but when an external link is clicked, one of two problems occurs:
1) If I code the external link to keep it in standalone mode, there is no way to navigate back to my app from the external site as the back button is obviously no longer available.
2) If I code the external link to open in safari, when the user is done with the external link, the session for my app is closed and the user has to go back to their homescreen and re-open it again. (I know I can code it so that they will return to where they were in the session, but this is not the solution I want).
My question is this, is there a way to open external links ON TOP OF a standalone web app session? So that when the external link is closed, the standalone web app session appears?
I've read that I can use AJAX to open external links within the active session, but I don't know how to do this and can't find anything online that explains it well. Any help would be MUCH appreciated.
My app functions fine in safari, but looks SO much better in standalone mode; I would be SO appreciative if anyone can provide a solution. I am also willing to discuss paying someone to help with this as well.
Cheers,
SC
Turn your app into an actual app, not just a web site. You should implement your own web browser in your app using UIWebView. It's very simple. You probably only need a back button and a close button, you don't need a full search/address bar, bookmarks, etc. UIWebView and two buttons will do it.
As soon as you switch apps to Safari you will see the behavior you have described - there's no getting around it. Your only choice is not to exit.
https://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html

Detect if browser is mobile Twitter app browser?

my site is responsive, and it's looking good on Safari on iPhone. But when I browse to my website from my Twitter app on my iPhone, it seems to ignore most of my mobile styling and looks very bad. Is there something I can do to detect if the browser is some kind of mobile app (such as Twitter) and cause the page to load in the default mobile browser instead (Safari, Browser, etc.)?
Edit: I strictly used CSS' max-width media query and targeted HTML5 block elements to change widths into percents. On two navs, I changed the display attribute as necessary.
Turns out it was a caching issue. It loads fine in the Twitter app. Oddly, it didn't before, even after several tries.
To the best of my knowledge, you can't force the site to open in the default mobile browser. The decision whether to open your site in the app's UIWebView or the default Safari browser is made by the Twitter app alone. If the Twitter app was gracious enough to provides any interface for you to choose, it might be possible, but they probably don't. Most app publishers try to keep users inside the app for as long as possible, and throwing them outside to a different app usually goes against this.
Your best bet is probably to try to improve your site's responsiveness to also work inside the Twitter app UIWebView as well (or inside other apps for that matter). If you base your responsiveness on screen width for example (CSS max-width and friends), I assume it should also work inside the Twitter app UIWebView.
The problem you are describing is indeed a very serious and annoying one. UIWebViews inside apps don't implement by default all of Apple's special handlers (that work inside the original Safari). The app maker is expected to implement these manually, and 99% of all apps simply don't do this. It's true for many other apps as well, the Google native search app also opens URLs inside a UIWebView - and sites tend to look lousy there too.
You should also consider filing a bug with Twitter and urge them to improve website compatibility when opened inside their app.
You can't force the user to open the link from a browser from your website. Android WebView is restricted and by default does not allow javascript and other extensions.
You can find more information here: Android WebView VS Phone Browser

Opening deep content links in native apps from mobile web

My company has an app (iOS and Android), to which the following scenarios applies. I'm trying to help point my engineers and product team in the right direction.
When one of our users clicks on a content link from one of our emails, or Tweets or Facebook posts, and they're on their mobile device, we prompt the user with a link to download our app. This is similar to what many apps do, including LinkedIn (see i.stack.imgur.com/glSgJ.png).
I imagine this is mildly effective of driving awareness and downloads of a native app, for new users who came in from social media and various web sources. However, it is not helpful at all for a user like me who already has the app!
1) clicking "No Thanks" keeps me on the mobile web (when I want to be in the native app), and
2) clicking "Download the App" takes me to iTunes App Store page for an app I already own.
SUPER ANNOYING. As a result, I have to manually open the app, and search for the content in question. I'm guessing most users don't do this. More importantly, depending on the UI/UX of the app, I may never get there!
Again, I know we are handling mobile web visits in the same way many other companies (including LinkedIn) do, but it seems we are leaving a lot of potential native app use on the table. I want our engineers to build that elusive 3rd option, "Open In App".
Spotify and Rdio have solved this very nicely. Here are deep content links (in the case of these companies, to a specific song) for the two apps respectively:
http://open.spotify.com/track/2SldBUTJSK6xz43i8DZ5r2
http://rd.io/x/QF3NK0JKWmk
If you have a moment, first grab the free version of Rdio or Spotify apps. Then, if you open those links above from an iOS device, you will see how nice the experience is, for existing native app users: Rdio has a nice "Tap to open in Rdio" link (http://i.stack.imgur.com/B7PuE.png), and Spotify's link is even more clear, "I have Spotify" (http://i.stack.imgur.com/Q3IV6.png). Both apps also include a link to download the app, for new app users. More importantly, both apps cookie the user: future visits to links (whether from email, Twitter, Facebook, etc) on mobile web automatically open the app, instead of prompting you to choose each time. SUPER CONVENIENT.
Questions:
1) How do they accomplish this? I'm initially only concerned about iOS (on which I tested this), but this same situation should apply to Android.
2) Why aren't more apps doing this? It doesn't seem like rocket science, so am I missing a key reason why this might be a bad idea? Half of my problem is convincing the use case.
3) Why don't I see discussions about this technique? I've searched a ton for an iOS solution. I come up with a lot of discussion about URL registrations (mainly app-to-app), but no one actually referring to the type of scenario I describe (mobile web prompt to open native app).
It seems that with minimal engineering, app developers could dramatically increase native app use, converting from mobile web. :)
Android supports deep linking. Please refer to
http://developer.android.com/training/app-indexing/deep-linking.html
Tapstream's deferred deep links can send users to specific views within apps (iOS only), even when the app isn't yet installed on their device.

Resources