Is there a way to control the URL rendering on Messages App on iOS 10 with special meta tags, such as Open Graph tags or Twitter cards tags?
It seems like it is not based on apps installed, so I'd assume it is a white list made by Apple if we cannot control it.
Example:
Apple calls the metadata used for rendering web content throughout iOS "Web Markup" — this is largely based on schema.org and Open Graph. For details see the Mark Up Web Content section in Apple's App Search Programming Guide.
You can validate your metadata using the API Validation Tool or using iMessage in iOS 10.
Related
I'm developing an application that must share a picture with Facebook.
Following the guidelines of Windows 8, I must use the Share Charm (text, html, image and file). Basically the idea is to build sources apps they can share information and target apps that are capable of receiving this information.
Turning the sample from Microsoft, which allows sharing of information types is only possible to share links with Facebook using People app.
I found three possible solutions to this problem:
1 - Wait for Facebook to launch an official app for Windows 8 to receive all these information types;
2 - Wait for Microsoft to include sharing these types of information in the People app.
3 - Create a target application that implements the Facebook API.
Finally, I would like to know if you have had this kind of problem and how they solved.
Have you tried using this library... Facebook C# SDK
I think it will give you what you want
In the web page, I have file upload widget. I need to show this web page on UIWebView. Is it possible to browse the file system and upload the pdf, doc, xls files?
Note: this answer was correct when written in 2012 and iOS 5 was current. iOS 6 introduced media uploads and iOS 8 allowed arbitrary file uploads.
No is the short answer. iOS has no user accessible file-system.
At WWDC they announced the ability to upload pictures in iOS6 but there is no publically available information on how that works.
You could do it by interacting directly with the website using the lower level tools (NSURLConnection, etc) and creating your own "open" dialog.
iOS grants the webView no means to browse the file system, so no you will not be able to use the normal upload mechanism in UIWebView
You will have to present some API to your web server that allows you to send images as POST
The answer would be NO, since the webview runs in a different sandbox as compared to native applications.
Also there is no accessible file system mechanism like android for iOS.
Even native application have very limited file access pertaining to only their own and certain user directories like tmp, documents etc.
I would like to enable interaction between a native iOS application and the Safari browser such that tapping a right click on an image on a webpage provides an option in the context menu to send the image to another custom written native iOS application for further processing and/or storage.
However, according to this article from Safari Developer Library, “Safari extensions are not currently supported on iOS”.
Is there any other alternative to achieve the above functionality?
You have multiple choices here:
You could register in your application's Info.plist file that your app known how to handle certain type of documents (see here in Apple's doc). This way when your iPhone encounters this document type, iOS will propose the user to open this document in your app; for example if you register for the PDF type and you then tap on a PDF document as an attachment in a mail, you app will be listed in the proposed menu and will then be opened with the document as a parameter.
But it seems that even if this works perfectly for any type like DOC, PDF, or even custom types, it does not work for images, which seems to be handled in a separate way by iOS :(
A simpler way would be to register, still in your application's Info.plist, any custom URL schemes. See here and below in the Apple's doc. For example when, anywhere in your iPhone (either in your own app, or in another third-party app, including Safari), it encounters URLs like "myapp://xxx/yyy/zzz", it opens your app, passing this URL as an argument. You can then do whatever you want with this URL.
The solution then is to add some code in your web page so that when the image is tapped, you ask Safari to open the URL "myimageditor://edit?url=http://www.url.of/your/image.jpg". If you registered for the "myimageeditor://" URL scheme, you app will then open with the URL in the parameters, and you then will be able to retrieve the image using the embed URL.
I think it is possible only for jailbroken devices.
I'm a mobile web developer, and I'd like to test a few iOS devices to see what mime-types and url schemes the average iOS device can accept.
On Android I'm able to install an app called PackageExplorer that lists all the "intent filters" for all the apks and lists what file mime-types (image/png, text/html, text/x-vcard) and url schemes (like geo:, tel:, sms:, mailto:, http://youtube.com) the app handles.
It would be really nice if I could tell what schemes and mime-types are supported/registered from the server or browser side on my mobile webpages, but if that's not possible, I'm looking for a display or an app in iOS to view all the registered file mime-types and url scheme protocols that the device currently supports with all it's installed apps.
How do i find all the registered scheme/mime intent filters on an iOS device?
UPDATE: I don't know if it's complete, but I found an official list of url schemes sported in mobile safari: https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html (still looking for mime-types etc.)
This information is not available per se. You can however build an app that tries out content of varying types with different content-types and look whether this displays nicely or doesn't.
We've had one situation where the content type for Powerpoint was not registered on the web server and thus UIWebView was unable to display it. It will in these cases respond with a specific error code instead of didFinishLoading. When it was fixed on the server it started working in the app as well.
A slight complication there is that the test files would have to served by a web server because fileURL-based documents don't have a content type. There webkit inside UIWebView auto-detects the file type.
Though in all likelihood this information will prove to be useless to you for a simple reason: apps can always register to open certain file types on the device. The document interaction controller can be used to hand off the opening of the content in this other app. And since this extends the number of viewable document types infinitely you can never how to have a complete list.
So what you really would want is a list of these types of files that UIWebView can display, but you have this list already, you have quoted Apple's URL in your question.
Are there any resources or guidance out there on how to make iPhone friendly web applications?
In my case specifically, I'd like to use ASP.NET MVC, but since that all runs on the server, I know it'll boil down to just markup/css/javascript considerations.
edit: as I find other resources not mentioned here, I will update the question text :-)
CSS-Tricks ScreenCast on Designing for the iPhone
There’s an iPhone article on Sitepoint (which usefully shows you how to target stylesheets at just the iPhone, whilst hiding them from Internet Explorer—Apple's documentation doesn't).
Craig Hockenberry wrote Put Your Content In My Pocket at A List Apart.
A Flickr developer posted some lessons learned: http://code.flickr.com/blog/2008/10/27/lessons-learned-while-building-an-iphone-site/
+1 for Apple’s documentation as mentioned by Boot To The Head—horses’ mouth and all that: they have pretty comprehensive stuff on neat CSS properties that are only really supported by Safari, like CSS animations and CSS Transitions.
Scot Hanselman had a great presentation at Mix 09. Click here link.
Also look at the Mobile Device Browser File=>LINK. It is open source at codeplex.
"What is the Mobile Device Browser Definition File?
The Mobile Device Browser Definition File contains capability definitions for individual mobile devices and browsers. At run time, ASP.NET uses this .browser file, along with the information in the HTTP request header, to determine what type of device/browser has made the request and what the capabilities of that device are. This information is exposed to the developer through the Request.Browser property and allows them to tailor the presentation of their web page to suit the capabilities of the target device." - Codeplex
The definitive resource is Apple's Safari Dev Center.