Web Service MYProblem - mobile

I add to web reference for my cross platrom to two platform droid and iOS. There tho reference is same. But I don't use to two platform. I add to iOS web reference and droid web reference. I want to my device platform then iOS using to iOS web reference, then android using to droid web reference. How I do this? Can you help me?

If you have to keep them separate (I would try to add them to PCL) you need to define interface with functions you need to call. Then implement this interface on each platform. If you use XForms you can use Dependency service to resolve that interface, otherwise you need to use third-party IoC or just find the way to pass this interface to your platform specific code.

Related

Micro Frontend Architecture in React Native Application

I am creating a react-native application, And the application having many module like
Login Module
Payment
Cart
Product etc.
So I want to follow Micro Frontend Architecture for each module. I have searched on internet but did not find anything. So I want to know is it possible to achieve Micro Frontend Architecture for React-Native application. If yes then How ?
You can use Re.Pack, which is Webpack toolkit for React Native. Since v3 it provides its own ModuleFederationPlugin, which allows you to set up Module Federation (MF) architecture of building micro-frontends.
Example MF app can be found here: https://github.com/callstack/repack-examples/tree/main/module-federation. It covers a basic example of 2 mini-apps loaded dynamically from a "host" app.
There are no proper solutions for RN Micro-frontend so far.
there are a few libraries that may help you to achieve this.
https://github.com/callstack/react-native-brownfield
React Native Wix
But these are not recommended
kindly go through this link so you will be more clear about your question.
https://www.reddit.com/r/reactnative/comments/jdpfrj/microservices_in_react_native/
Microfrontends are concept originating from Web apps world. Achieving the same paradigm on mobile/React Native is possible, e.g. by using Re.Pack, but requires a quite complex setup. On the other hand, using Re.Pack will give you more app superpowers, like dynamically loading bundle splits from Internet.
As a simpler alternative, I would suggest setting up a monorepo containing separate NPM packages for each of the modules. This way you can achieve code separation more natural for mobile apps paradigm.

FileTransfer is not defined

I am using Transfer plugin in my ionic 2 app for sending files. While testing the app, I had difficulty in mocking Transfer. Please take a look into this problem to understand the context . After that discussion , I decided to inject Transfer in my service.
So I added Transfer in my providers in app.module.ts.And injected it into my service.
constructor( public transfer: Transfer){}
But this leads to an error. FileTransfer is not defined. I guess its because there is no browser support for this plugin. So I am in a tough spot, I do not know how I can make working testable code. Any ideas?
In ionic cordova plugin are not supported for browser Because the browser cant access native api of the os so you need to develop the app and deply it in your Android or ios device .

Is there a way to use Wikitude with Nativescript

I am working on an app, and the client is convinced that we need to go to the Nativescript path, that sounds fine but we need to make it work with Firebase + Mapbox and Wikitude.
My concern is to be able tu use Wikitude on the project, I cant find information about this.
Can anyone please point me to the right direction, and if this is posible this moment.
I had a quick look at Wikitude SDKs and saw they offer both native Android and iOS versions so you are good to go. NativeScript comes with metadata generators for both Android and iOS so you can use third party SDKs/libraries from JavaScript. I guess the easiest way to go is to create NativeScript plugin. If you are looking for an example you can take a look at Firebase plugin.

Can I develop an app for hybris with ionic?

I know that hybrid has already provided these wrappers in the form of android SDK and ios SDK.
But what if I have to use ionic to develop an app for hybris? Can I use SDK that provided by hybris?
Yes you can, one of the nice things of Hybris is that you can create your own extensions in Hybris to do what you want, I.E. create a custom UI, or make use of the web services to create a UI completely outside of hybris. I know there are projects which had a front end completely using Angular. You might struggle to find documentation on it as it is not OOTB, but Hybris won't prevent this sort of development.
It's possible for sure so just give it a go and try.
just make sure to ENABLE this CUSTOM extension in Local.Properties.

Cross platform mobile app / server architecture

I work on a team that supports a mobile web site. It's a typical web app in that it's pages of forms that submit and retrieve data from a server. Back end currently JSF.
It's working fine but there's a strong want to start leveraging more of the native device's components and features (namely messaging/alerts and UI widgets). Given the number of platforms we're trying to support (iOS, Android, BlackBerry, Symbian [yuck] and potentially Windows 7) PhoneGap seems to be the first thing I should spend some time looking at.
I think I have a good grasp on how it works (broadly speaking) in that it allows you to use HTML CSS and JS then builds a native app that 'wraps' around your code and offers up a JS API into the device's native widgets and features as needed.
What I'm not so clear on is how one would use it in a client/server type of interaction. Could we use PhoneGap to create a front end UI that would still talk live to our servers? If so, could we leverage standard AJAX/JSON/XML type technologies to send and receive the data or are there hidden hurdles I'm not aware of in doing that with a solution like PhoneGap? In otherwords, does the webview within the PhoneGap app work just as WebKit would in that we can make an AJAX call, get some data, and update the DOM?
Or is there a different type of framework I should be looking at?
A example summary explanation of what we're looking for would be: We'd like our current web application to be able to launch a native date picker on the device and receive alerts but still interact with our servers as our current mobile web site does.
As user731077 says, yes, PhoneGap can do all of that. There's a number of potential methods you could use to do so in the Javascript code of your PhoneGap app. Here's a few to check out.
XMLHttpRequest object, but I'd suggest one of the below choices that handles cross browser inconsistencies
jQuery ajax()
xui.js xhr() (my choice)
zepto.js ajax()
xui.js and zepto.js are my suggestions as they are basically stripped down versions of jQuery optimized for mobile web development. I'm partial to xui.js because its the framework commonly used by the PhoneGap guys themselves.
your every question has a YES answer :)

Resources