Apple introduced SVG support in Xcode 12. Is it possible natively to work with SVG downloaded from the web? I need to download SVG from a server and display it on the screen.
Natively, no. The Xcode 12 improvement is only for an svg that you put in an asset catalog beforehand. iOS has no support for displaying a downloaded svg. You could look for a third party library, however.
Related
I'm using Storyboard editor on XCode 11.3.1 to create a UIButton with an icon. When I add a "system" image to a button, e.g., named square.and.pencil, it shows it in Storyboard and on iOS 13 devices. But on iOS 12, it shows nothing. Any way to use system icons for older iOS?
Also note:
User-created images from assets are working everywhere with my setup.
UIBarButtonItem shows the same icon on all devices, but it's specified with "System Item: Compose," not with an image named square.and.pencil.
What you are using is an .SVG image, provided like a system icon with Xcode 11.
This one and 1500 more are available on SF Symbols app, made by Apple. You can read more about SF Symbols and download it here.
However, as you can read on the link,
You can use SF Symbols in apps running in iOS 13 and later, watchOS 6 and later, and tvOS 13 and later.
these are only available for iOS13 and up, so that is why the image is not displayed on iOS12.
If you want to use that exact same image on iOS 12, export it as .PNG using SF Symbols and add it as a resource to your project.
I would like to suggest you this app which will simplify your life.
https://happycoding.app/index.html
From the link you can download the app.
This app allows you to download the icons of material design ios default icons and many more, just remember you give same name to icons as they have for ios 13*. Also it helps you in many other ways like pods info plist files and lot more. You should give it a try.
I have an HTML animation created using Adobe Edge Animate that plays fine in my desktop browser version of Safari (9.0.1)
It doesn't work on the iPad platform it is targeted at, and it transpires that some of the image names in the assets folder are not capitalised. The HTML is calling for 'pasted.svg' for example and the file is called 'Pasted.svg'
OS Safari seems to be using some kind of fuzzy logic to be kind to the developer and is working out which image to use. iOS is not, which doesnt help me bugtest.
Is there a way I can duplicate this behaviour on OS Safari so I dont need to keep loading up to the iPad to test if the animations will work?
Thanks
ADDITION : It seems to work correctly on other native apps. Broke on web browsers ONLY. (ie. Chrome, Mobile Safari)
Using HLS (=.m3u8) for providing adaptive streaming, and considering to use WebVTT for subtitle. But I found out some characters, except English, happened to be broken on iOS 8.x devices when I played them on Mobile Safari. It works well on iOS 7 device.
Here’s an official sample video(.m3u8) web page hosted from Apple:
https://developer.apple.com/streaming/examples/advanced-stream.html
If you load this on both on iOS 7.x and iOS 8.x devices, select Japanese subtitle, then it will display broken characters on iOS 8.x (okay for 7.x and below):
Any ideas to avoid? I've tested this on iOS Simulator (7.1, 8.1, 8.2 beta 4) and iOS devices(8.0.2, 8.1.2).
There has been no answer since I've posted this and I still have got struggled with this issue. However, I give you my 4-months-workaround and trivia here:
There are two environments for native iOS video playback feature:
HTML5 Video & Native app playback SDK (such as AVPlayer)
You can provide multiple subtitle feature by using WebVTT. This is an ONLY option unless you have 3rd party renderer or something from your backyard.
If you wanna implement your own subtitle feature, you must start considering how to handle the controller UI of video player. One example of them, you can't use built-in full screen feature with your subtitle renderer. I think, if your subtitle-base isn't WebVTT (or such as .SRT, which is similar to .VTT), then implementing a subtitle renderer isn't a bad idea. (In my case, I implemented a subtitle converter to create .VTT subtitle files, though)
Trivia of iOS HTML5 video :
You can provide WebVTT by embedding them into HLS playlist, and also by putting element into element.
>= iOS 8.0, if you provide WebVTT files by embedding them into HLS playlist, then multibyte characters would get broken. (This has been my problem, as described above)
If you provide WebVTT files by putting element into element, simply it works everywhere. (at least >= iOS 6.0. I didn't check older versions)
CSS styling works. It means that you can colorize your subtitle.
Trivia of iOS HTML5 video :
You should embed all WebVTT into HLS playlist to use iOS built-in subtitle feature. There is no other way.
CSS styling not works. No text coloring.
Multibyte character not gets broken. Peace.
I hope you a good luck, if you fell into this subtitle hell :(
Is it possible to convert a flash button that I have on my site with Adobe Air to work in iOS?
You can convert entire flash apps using http://www.adobe.com/devnet/air/air_for_ios.html, but if you are converting a single button it's not going to be worth the hassle.
Is there a way to access iOS icons? Eg. some hidden folder in the SDK?
In Android, it is possible to access drawables straight from the code, and there is even a folder in the SDK. Is this possible on iOS?
I guess you are looking for https://github.com/0xced/UIKit-Artwork-Extractor