react native Image Loading on android faster than IOS - image

I'm building an application where i render many images in swiper, flatlist and i'm using React Native Image Component, but the component loads the images very fast on Android and very slow on iOS, also the caching is better on android than ios although i use force-cache prop, is there any way to improve image performance for ios ?!

You might want to use react-native-web-image, it often gives a way faster experience.

Related

ReactNative : How to design UI support all devices iOS and android

I am developing react native app. I wanted to know about design screens that is automatically adjust to iOS and android devices. For example we are using auto layout for iOS apps which gives consistent view for all iPhones and iPads.
I am little bit confused about designing screens for android and iPhones. I know how to design UI for Native platform that is consistent for all devices.
Yes, you can create UI for both Android and IOS devices using the same js file.
Mainly u need to have a good idea about flexbox. It is the base of creating responsive UI for compatible all devices. Follow below tutorials and get a good idea about flexbox and design responsive UI
https://facebook.github.io/react-native/docs/flexbox
https://medium.com/the-react-native-log/a-mini-course-on-react-native-flexbox-2832a1ccc6
and You can find a good example of components https://github.com/jondot/awesome-react-native here.

Native mobile app with React VR

I have a bit of experience with React JS & React Native. Now I have just started with React VR. From what I have learnt so far, one can use React VR to create virtual reality experiences in web pages.
I have a web application which uses Three JS to create a virtual walkthrough (using panoramic images). I wanted to know whether it is possible to create a native mobile app for the same using React VR and React Native.
My main reason for wanting to do this is to harness the power of the native hardware for better performance of the app. I hope to keep most of the existing Three JS code intact by making it work with React VR.
React VR is essentially a React-ive wrapper for Three.js. So, yes, you can keep most of your Three.js code intact and pop it into an a React VR app. You can simply pop your Three.js code into the Client.js file of a React VR app.
Some of the newer phones are WebVR friendly (e.g. Google Pixel), and from my experience, work well with React VR apps. To this end, this does leverage the native hardware.
However, as for combining React VR and React Native, in short, its not possible. React VR makes Views renderable via WebGl and leverages the WebVR API that many browsers are becoming equipped with these days.
React Native on the other hand takes Views and renders them on a device as Java (android) or objective-C (iOS) Views. In short, React Native, at the time of writing this answer, does not have VR capabilities, and cannot be combined with React VR.
Check out this informative link for a more detailed discussion.

Best practice for loading images on nativescript angular iOS

I'm building out an iPhone and Android app using nativescript angular.
Since the app will be loading images in a list view, I have the nativescript fresco plugin to take care of loading the images and it works beautifully btw. Unfortunately this only take care of Android side.
I was wondering what other developers use when developing for nativescript apps for IOS. 
clarification: what I'm really trying to figure out is what should I use to replace fresco when developing for ios.
Also, I now have all these Fresco tags for all the images for android. But what do you do when you are ready to develop for IOS? Do I need to have *ngIF statements on all of them for android and use default Image tags for IOS?
You can use the <android></android> or <ios></ios> tags for platform specific views
e.g
<android>
<FrescoDrawee [imageUri]="someImage"></FrescoDrawee>
</android>
<ios>
<Image [src]="someImage"></Image>
</ios>
There is also the SDWebImage library which can automatically manage caching.
http://cocoadocs.org/docsets/SDWebImage/4.1.2/

Multi resolution splash screen, tiles and App icons for Windows Phone 7

I'm developing an application which must work for both WP7 and WP8. And want to create multi resolution splashscreen and Tiles. I know that it can be done easily for WP8 (http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769511(v=vs.105).aspx)
But how can I do it for WP7 application?
How can I make my application (developed for WP7.5) closer to WP8 but still working on WP7.5-7.8.
I just want my application looks good for both WP7 and WP8 devices.
You can run your app designed for WP7 on WP8 device too, but then you will have problems with screen resolution on some devices. You can develop two versions app WP7 and WP8. Porting is not that difficult, if correctly to this approach. In the articles you can find good advice http://www.developer.nokia.com/Community/Wiki/Maintaining_a_WP7_and_WP8_version_of_a_same_Silverlight_application and http://www.developer.nokia.com/Community/Wiki/Introduction_to_multiple-resolution_support_on_Windows_Phone_8_apps .
Since WP7 devices are all (and always will be) WVGA, there's no point to supporting multiple resolutions. What you can do, though, is support multiple tile sizes on 7.8+, and I'd suggest using Mangopollo for that.
Just reuse your WVGA tile assets from the WP8 version of your app, and make the appropriate changes in your app's WMAppManifest.xml:
<AppExtra xmlns="" AppPlatformVersion="8.0">
<Extra Name="Tiles"/>
</AppExtra>
This should be placed inside the <Deployment> tag before <App>. Then you just need to make sure to change your primary tile's type and assets on first run using Mangopollo, and to use the library when creating or updating any secondary tiles.
That's as close to multi-resolution that WP7 will ever get.

Interactive 3d Web Technology

I would like to use interactive 3D models in a web page. The required functionality is:
Import dxf file which defines & displays a room.
Add/move prebuilt objects from javascript
Add/move lamp which cast shadows from javascript
Return room dimensions to javascript
Return object positions to javascript
Can I import dxf files into any WebGL engine?
I have a small repeat user base so a browser installation is no problem at all. Is there any plugin technology I could use? Java applets? Unity? Can I use an OpenGL engine as a plugin? How about a java3d applet?
I will start with desktop but would need to be targeting tablets soon and mobiles in two years or so.
I am becoming convinced I will need to hire an expert to write this but I want to understand the options. Can you recommend a suitable technology?
I think WebGL is an excellent choice for this application; the graphics functions you describe are well within its capabilities. I can't comment on model loading, though, as I'm not familiar with WebGL engines.
However, mobile is a big wrinkle. Regarding the techniques you mention:
WebGL is supported in Chrome and Firefox for Android. On iOS, Mobile Safari does not enable WebGL, but an implementation exists (used strictly for in-app ads), so it is likely that there may be broader WebGL support in the future (possibly requiring a custom web view wrapper to enable it).
Java applets are not supported by any browser on either Android or iOS.
Unity is a viable choice; the Unity Web Player browser plugin allows embedding Unity content in a web page. However, there is no such plugin for mobile-OS devices; Unity content may be compiled into a application for iOS or Android but it cannot be viewed within a web page.
News as of August 2014: Unity has announced that the upcoming Unity 5 will include publishing to JavaScript + WebGL (no plugin required). Assuming this works as promised, you can use Unity if your target platform has a browser with WebGL support.
So, if you absolutely need cross-platform 3D including iOS right now, Unity is where it's at, but WebGL is a good choice for desktop and Android now and likely to improve on mobile in the future, and is the only way to embed 3D in a web page, not an app across desktop and Android.
WebGL is not the only way to embed 3D in a web page - see phoria.js:
http://www.kevs3d.co.uk/dev/phoria/
https://github.com/kevinroast/phoria.js
Also three.js has a canvas rendering for without web-gl.
Phoria.js and others like it will work on iPhone/iPad and Android phones that don't support web-gl. Of course, the performance is MUCH lower but if you don't have complex models and want it to work everywhere...

Resources