Native script persian calendar - nativescript

According to articles if i want to create a project that share between mobile and web too i can use Native script, i know angular has persian calendar but i did not find any for Native Script. I should use Native script plugin for this purpose so can not use the angular calendar in NS.
The first question is : is it true that i can not use angular calendar in native script and we can use just its plugin?
Second: if question 1 is true so any body know any calendar plugin for native script?

You can not use Angular calendar plugin in {N}, obviously the web version would have been built with HTML DOM which is not supported in {N}.
Here we use Native UI elements of respective platform, so you could try the nativescript-ui-calendar plugin and try setting locale to fa-IR I'm not sure whether it gives the expected results fully but it's one of the best option available.
Otherwise you should find a Persian Calendar for iOS / Android, a quick search shows PersianCalendar for iOS / Persian Calendar View for Android, you may install those dependencies in POD / Gradle and use it in your Project.

Related

UI Automation for AppleTV system using XCode

Is UI automation available for the main menu of the Apple TV and not a specific application? I already setup the whole UI testing thing using XCode and tried using the remote control but it is only available for the application that was defined using XCUIApplication.
So is it possible to control the whole system rather than a specific application? I was thinking of something similar to pyatv but using XCode since I might be able to get more information concerning the current focused apps and so on.
There is an API XCUIApplication(bundleIdentifier: ) to interact with not-AUT apps. You need to substitute the right identifier for this Springboard-like interface. Maybe it is a Headboard, but I'm not sure.
Bundle identifiers of tvOS apps https://github.com/rzakhar/XCTApps/blob/master/Sources/XCTApps/tvOS.swift

Embedding PowerBI report with an iOS app developed in Xcode

I have a simple PowerBI report with 2-3 visualizations that uses Azure database to get data. I want to see how I can embed this report in an iOS app that we are working on. We're using Xcode for developing the app. I want that report to be accessible using our own in-house app and not PowerBI app.
In my Xcode project I added a WebKit component and added the embedded code URL for the report. When I run the simulator, it asks me to sign in to PowerBI but if I click on the Sign-In link, it doesn't do anything. Is that the expected behavior?
I was wondering if anyone has worked on a solution like this before. Also, i thought if you use PowerBI embedding, it shouldn't ask the user to login. Is that correct? If not, what would be the best way to embed the report to the iOS app without asking the users to login?
what would be the best way to embed the report to the ios app without asking the users to login?
Follow the tutorial here: Tutorial: Embed Power BI content into an application for your customers
Your back-end app generates an embed token for the browser to use with the Javascript API to embed and interact with the report visual.

Why doesn't couchbase plugin load?

I use the latest NativeScript Sidekick and Preview for developing (vanilla, pure JS) apps, recently I installed Couchbase Lite Plugin https://market.nativescript.org/plugins/nativescript-couchbase
When I write var couchbaseModule = require("nativescript-couchbase"); in
the JS file of a page and if I try to open the page, this error message shows up
But if I remove var couchbaseModule = require("nativescript-couchbase"); the page loads without error.
Why this happens? How can I use and require couchbase plugin? What can I do to solve this problem?
Limitations
The Preview app comes with a predefined set of NativeScript plugins. If your app utilizes a plugin that is not present in the Preview app, you will see a warning message and your app might not work as expected.
nativescript-couchbase plugin is dependent on their native libraries, so you must have complete environment setup to build your project locally in order to test it. Preview won't support this plugin.

How to show pop up in Xamarin forms. i should not use third party plugins

How to show pop up in Xamarin Forms, without using third party plugins such as Rg plugin or x-labs plugin?
See attached images.enter image description here
There is an official guide on the Xamarin site to get simpel popups:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/pop-ups/
I suggest reading it all, you can also make your own popups like rg.plugins by checking out their code and writing it yourself

How can Xamarin be used to wrap a web app as if it were a native app for Android?

Say I build a super mobile friendly web application that I want in the Play Store for Android users to be able to download.
Could I use Xamarin to:
Wrap the entire mobile app as a single WebView
Register for mobile push notifications
Essentially shortlining an MVP of an android app by using an existing web app? If so, is there any well-known process or documentation that demonstrates this?
Probably the best approach for you would be using Xamarin Forms with one or more pages containing only web views.
I don't love Xamarin Forms because usually for me Xamarin Android+iOS gives a better result in similar time, but your app would be so simple that doesn't make sense to do it with Xamarin Android.
Make sure that your web app will show only what makes sense to be shown in your app, otherwise you risk to see double header/footer, useless buttons... but if the website is yours adding a few parameters to change a bit the UI won't be a problem I guess.
Have a look at this example:
https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithWebview
Another approach is the use of Razor to build your pages in html directly inside your app, but if I understood well it's not what you need:
https://developer.xamarin.com/guides/cross-platform/advanced/razor_html_templates/
Although it is technically possible to do this as the previous answer has suggested. I would recommended firstly reviewing, the relevant stores guidelines on submissions. Apple for example will not allow a submission to their store of any application that simply mirrors the functionality of a website. I suspect Google's would likely be the same.
However that said, to answer your question, Xamarin.Forms would be appropriate for a simple application like the one you are suggesting. Or if you prefer to build to a specific OS, then in iOS with Xamarin you would use the Safari View Controller that was added in it's xcode 8.1 release. Android uses something similar as does windows.
EDIT:
You can use the Web View control in Xamarins Andorid native PCL project to encapsulate your mobile friendly website within an application here is the documentation:
Xamarin Android Developer link to Android Web View
As for push notifications, yes this is perfectly possible using Xamarin.Android. and varies on implementation depending on what you want to use as the back end to handle them, I.E. Azure's notification hub etc.

Resources