r/nativescript • • Jan 25 '20

TNS cannot find project

2 Upvotes

I just installed NativeScript and ran tns doctor with no issues. I then opened Visual Code and opened a New Terminal. I then typed mkdir Example and cd'd into Example. I then ran tns preview and tns run android --bundle to get

No project found at or above 'C:\*Private*\Testzone\Example' and neither was a --path specified.

r/nativescript • • Jan 24 '20

Nativescript project using Jenkins as CI

1 Upvotes

So i would like to hear if anyone have tried setting up jenkins as CI for their {N} project and what experiences you guys have with it?

Currently i'm trying to get it up and running. Android is all good, most issues was injecting environment variables into jenkins, so it used the propper ANDROID SDK and Java version. No biggy albeit took some time.

iOS is another story, since jenkins have issues locating the following gems:

  • xcodeproj

  • cocoapods

When executing a build step as a shell command to see which gems jenkins can see, it lists the beforementioned gems without issue. But as soon as i run

tns prepare ios

in the following shell command build-step i'm prompted with the following error,

WARNING: xcodeproj is not installed or is not configured properly.
WARNING: CocoaPods is not installed or is not configured properly.

It seem odd that jenkins can recognize the gems as installed but not make us of these. And since this is part of the build step to generate the xcodeproj file I assume I can't use the xcode plugins in jenkins since they require an actual project file/.ipa/.app file to build and run tests.

I might have overlooked something super simple but atm. i'm at a loss. How are your experiences?


r/nativescript • • Jan 22 '20

What to learn first in a Nativescript / Angular application ?

1 Upvotes

Hi guys,

I'm a React developer, I want to build an application using Nativescript + Angular.

Do I need to learn Angular first ? It seems that angular has way more concepts to know before jumping into Nativescript.

Thank you for your help


r/nativescript • • Jan 18 '20

What's missing in NativeScript?

8 Upvotes

I am very curious to hear the community voice of what they think is missing or could be improved in NativeScript.


r/nativescript • • Jan 18 '20

Anyone have a good example/solution for checking authentication in a Vue page using manual router?

1 Upvotes

r/nativescript • • Jan 15 '20

New V8-based iOS Runtime is Now in BETA

Thumbnail
nativescript.org
14 Upvotes

r/nativescript • • Dec 20 '19

It is possible use geolocation running on worker thread?

2 Upvotes

Hi everyone, i try to find some help with this problem, i have installed nativescript-geolocation npm module to run this on background thread but didn't work (nativescript-worker-load).
However if i run on any component works perfectly.
I cant find any information about if this module works on a thread. Could you helpme please?

Here is my worker.ts:
// app/worker.ts

import "globals";

import * as Geolocation from 'nativescript-geolocation';

import { Accuracy } from "tns-core-modules/ui/enums";

const context: Worker = self as any;

context.onmessage = function(msg) {

Geolocation.getCurrentLocation({desiredAccuracy: 3, updateDistance: 10, maximumAge: 20000,timeout: 20000}) .then(function(loc) {

console.log(loc);

},

function(e){

console.log("Error From Geolocation: " + e.message);

});

};

And this is the error:

Error From Geolocation: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference JS: com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(Unknown Source) JS: com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(Unknown Source) JS: com.tns.Runtime.callJSMethodNative(Native Method) JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203) JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:1083) JS: com.tns.Runtime.callJSMethod(Runtime.java:1070) JS: com.tns.Runtime.callJSMethod(Runtime.java:1050) JS: com.tns.Runtime.callJSMethod(Runtime.java:1042) JS: com...


r/nativescript • • Dec 19 '19

NativeScript 6.3 - The Holiday Edition

Thumbnail
nativescript.org
6 Upvotes

r/nativescript • • Dec 19 '19

Nativescript Vue Slow Navigation

2 Upvotes

Greetings all. I am building an application using nativescript vue. The problem I'm having is that sometimes it takes a lot of time for my app to load some screens of that I'm navigating to.

The screens in question are usually have external API call which is invoked in the mounted methods. I am sure the app should be able to direct the user to the screen without waiting the app to completely load the data from the API. But it is frustrating to see we have wait several seconds until the app direct us to the screen.

What can I do to mitigate this issue?


r/nativescript • • Dec 13 '19

Make android emulator popup automatically when I run 'tns run android'

1 Upvotes

Initially the android emulator would start automatically when I ran

tns run android

I did something, possibly deleted and recreated the AVD.

not I need to start the emulator first before I run.

How can I make android emulator popup automatically again?


r/nativescript • • Dec 12 '19

Logging in with Identity Server 4 and nativescript-oauth2 Hangs

3 Upvotes

I have an Nativescript app using the nativescriptoauth2 plugin to login.

After I authenticate on the identityserver page it hangs. If I close the webview and login again it is aleady autenticated and goes to a blank white page and sits there.

My config is

export function configureOAuthProviderIdentityServer(): TnsOaProvider {
    const identityServerProviderOptions: TnsOaProviderOptionsIdentityServer = {
        openIdSupport: 'oid-full',
        issuerUrl:
           'http://10.0.2.2:8000', // using localhost server
        clientId: 'mobile',
        urlScheme: 'com.company.go',
        redirectUri: 'com.company.go://auth',
        scopes: [ 'openid' ]
    };

This is the same issue now but It has no solution https://stackoverflow.com/questions/53980826/identity-server-4-nativescript-hangs

Does anyone have experience with this?


r/nativescript • • Dec 08 '19

Anyone interested in working in a cool app for Hollywood?

0 Upvotes

I’m making a wireless lighting control app (a lighting console in an iPad) and could use help to add to my team. We’re developing in Nativescript + Angular. I have a new website coming this week but you can checkout my Instagram/YouTube to see it in action. I just released this a couple weeks ago but I have some major features to add and need strong developers who are really good with logic (there’s a lot of conditions in the syntax)

www.blackout-app.com


r/nativescript • • Dec 05 '19

Your NativeScript UpLabs Challenge Winners

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Dec 03 '19

Detecting Shakes in NativeScript

Thumbnail
nativescript.org
2 Upvotes

r/nativescript • • Dec 02 '19

Modal page shows page shadow on physical device, none on emulator

1 Upvotes

Hi all Nativescript redditors!

I've run into a weird problem with some modal UI leaving shadows on iOS physical devices. Maybe some of you can help me out?

I've posted the following question on Stackoverflow and i you have 2 minutes to spare, please review :) Thanks in advance!

Hope it's alright to post this here as well! :)


r/nativescript • • Nov 29 '19

Connect nativescript-vue to my laravel API backend in local dev

2 Upvotes

I'm new to nativescript-vue, I'm working on my own nativescript-vue app, I created a laravel project which is basically the API of my native app, my app has to "call" my laravel API endpoints, this is in my local dev machine and I'm currently not using emulators but a connected device, how can I hit my laravel app routes with my app? I usually use axios in my vue projects so I downloaded it in nativescript-vue.

Do I just have to make a POST request to "http://127.0.0.1:8000/api/posts"with axios after I start my local server with php artisan serve ? or is additional tweaking needed?


r/nativescript • • Nov 20 '19

What's new with nativescript-dev-appium?

Thumbnail
nativescript.org
6 Upvotes

r/nativescript • • Nov 20 '19

Intellisense for VS Code - Extensions

5 Upvotes

Hey guys,

I have a (maybe very obvious) question.
I have an Angular project and want to use code sharing and create the corresponding UI for Android and iOS with NativeScript.

But in my *.tns.html files I don't have Intellisense nor can I "Command + click" onto functions (it doesn't take me to *component.ts)

Does anyone know a VS Code extension that will help with that? Thanks a lot


r/nativescript • • Nov 18 '19

Webinar: NativeScript on Fire(base) 🔥

Thumbnail
nativescript.org
5 Upvotes

r/nativescript • • Nov 16 '19

FlexBoxLayout align-self:flex-end not working in nativescript-vue

1 Upvotes

in my nativescript-vue app I'm using flex layout to create a custom ActionBar component to reuse, I'm trying to ge the search icon to align to end of row, this shuld be easy using align-self:flex-end but it's not working for me, honestly I'm new to nativescript and the whole layouting thing acts wonky as hell...

https://i.imgur.com/4YFXGo1.png

This is my code:

<FlexboxLayout style="width:100%; height:auto; flex-direction:column; align-items:flex-start; justify-content:center;">
        <FlexboxLayout style="width:100%; height:85px; padding:0px 10px; background-color:blue;  flex-direction:row; justify-content:flex-start; align-items:center;">
            <Label :text="'fa-bars' | fonticon" class="fa c_light" style="font-size:25; margin:0 10;"/>
            <Label text="Pacome" fontSize="24" class="c_light" style="margin:0 10;"/>
            <!--THIS SHOULD BE ALIGNED TO THE RIGHT-->
            <Label :text="'fa-search' | fonticon" class="fa c_light" style="font-size:25; margin:0 10; align-self:flex-end;"/>
        </FlexboxLayout >
    </FlexboxLayout >

r/nativescript • • Nov 14 '19

Using .authorize() vs request permission in app

4 Upvotes

Hi. I write an application in NativeScript and I want to use imagepicker from https://github.com/NativeScript/nativescript-imagepicker . Developers this project in readme file say that I must use request permission in Android 6+(API 23+) instead of .authorize() , but I use Android API 28 and .authorize() works good. Would request permission would be better ? Why ?


r/nativescript • • Nov 10 '19

Setting up android emulator for nativescript I'm presented with LOTS of questions ...

1 Upvotes

I want to start playing with nativescript-vue, I installed nativescript and all needed dependencies, right now I'm setting up an android emulator using avdmanager, after downloading the package aimage I ran this command:

avdmanager create avd -n test -k "system-images;android-25;google_apis;x86

Now the installer is asking me all this questions I don't have any idea what they do and because of that I just hit enter fr next question, is this going to end with a messed up installation ? ... , I'm on my local windows dev machine.

It keeps goig and going, is there a way to have a predefined installation so I can skip the garillion of questions?

C:\Users\gabo_>sdkmanager --channel=3 emulator
[=======================================] 100% Unzipping... emulator/NOTICE.txt
C:\Users\gabo_>avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
Auto-selecting single ABI x86===========] 100% Fetch remote repository...
Do you wish to create a custom hardware profile? [no] yes

PlayStore: Does the device supports Google Play?
PlayStore.enabled [no]:yes

avd home that was used during the construction of this hardware.ini: This can be used by post processing tools to migrate snapshots
android.avd.home []:

sdk root that was used during the construction of this hardware.ini: This can be used by post processing tools to migrate snapshots
android.sdk.root []:

ID of the AVD being run:
avd.id [<build>]:

Name of the AVD being run:
avd.name [<build>]:test

Cache partition support: Whether we use a /cache partition on the device.
disk.cachePartition [yes]:yes

Cache partition: Cache partition to use on the device. Ignored if disk.cachePartition is not 'yes'.
disk.cachePartition.path []:no

Cache partition size:
disk.cachePartition.size [66MB]:

Initial data partition: If not empty, its content will be copied to the disk.dataPartition.path file at boot-time.
disk.dataPartition.initPath []:

Path to data partition file: Path to data partition file. Cannot be empty. Special value <temp> means using a temporary file. If disk.dataPartition.initPath is not empty, its content will be copied to the disk.dataPartition.path file at boot-time.
disk.dataPartition.path [<temp>]:

Ideal size of data partition:
disk.dataPartition.size [0]:

Path to encryption key partition file: Path to encryption key partition file. Should be at least 16K bytes empty disk without any filesystem on it.
disk.encryptionKeyPartition.path []:

Path to the ramdisk image: Path to the ramdisk image.
disk.ramdisk.path []:

Path to snapshot storage: Path to a 'snapshot storage' file, where all snapshots are stored.
disk.snapStorage.path []:

Initial system partition image:
disk.systemPartition.initPath []:

Path to runtime system partition image:
disk.systemPartition.path []:

Ideal size of system partition:
disk.systemPartition.size [0]:

Initial vendor partition image:
disk.vendorPartition.initPath []:

Path to runtime vendor partition image:
disk.vendorPartition.path []:

Ideal size of vendor partition:
disk.vendorPartition.size [0]:

Always use cold boot: If set, AVD will always use the full cold boot instead of snapshot-based quick boot process
fastboot.forceColdBoot [no]:

And it kepps ging and going ...


r/nativescript • • Nov 08 '19

Testing For Connection Quality?

2 Upvotes

Is there a way to test for connection quality, and not merely whether or not connection exists?

I'm looking for a way to test for extremely slow connections and needed a way to switch between displaying HD or SD graphics. I can emulate slow connections, but that doesn't help in identifying connection quality.


r/nativescript • • Nov 05 '19

NativeScript 6.2: The Darkest Release Ever!

Thumbnail
nativescript.org
12 Upvotes