Nativescript documentation for NS Core with Typescript - nativescript

When building a NS application I usually use Nativescript Core + Typescript. In the latest version of the documentation, I noticed that this combination does not exist anymore.
I am not sure if this is related, but I also noticed that when I call tns run android/ios the Typescript files do not get transpiled automatically anymore when changes are made to the source code. I have to call tsc manually to generate the corresponding javascript files. This started happening after I upgraded to version 4.1+
Has Telerik switch direction and not encouraging NS Core + Typescript anymore? Do I have to choose between Angular + Typescript and Core + Javascript now?
Just curious in the direction we are heading.

I am still not sure about the documentation and the direction the NS is taking regarding the NS Core + Typescript combo, but with the help of tsonevn from the Telerik team I was able to get the automatic generation of JS files fixed.
It turns out that this was caused by the fact that the hooks folder was missing. Once I removed the node_modules and platform folders and ran tns run android everything started working again.
You can read more about it at: https://github.com/NativeScript/NativeScript/issues/5998

Related

BaseApplicationCustomizer throws errors

So today I was updating one of our SPFX extensions to use the latest spfx framework (1.16) with node (16.13) and after finishing my updates I got the following inside my code:
I am not exactly sure why these are not coming in, I suspect the newest version of spfx moves these classes out of sp-application-base, but why? and where is the documentation for it? Because there is this link that is only 6 months old and explains to use this code for the top and bottom headers.
I was expecting this code to remain in sp-application-base, but it appears it isn't in that package.
How did you perform the upgrade? I highly recommend using the Microsoft 365 CLI to upgrade projects, as the developers of that app do thier best to cover every part of the project that needs to change. Learn more at https://pnp.github.io/cli-microsoft365/cmd/spfx/project/project-upgrade/
Here are the commands to run from the root of your project
npm install -g #pnp/cli-microsoft365
m365 spfx project upgrade --output text
This will give a list of npm commands and code update instructions to follow. See the above documentation for other options for output and use whatever works best for you.
It is still there. What version of #microsoft/sp-application-base is in your project? Should be 1.16.1 I believe. I will say that I am new to all of this as well, but I am using the latest framework and VS is not flagging any issues with these.

Migrating to NativeScript 7

I'm migrating a typescript/angular based NativeScript project over to the latest version of NativeScript, and am running into an issue. Before, I was using the tns-platform-declarations plugin (https://preview.npmjs.com/package/tns-platform-declarations) so I could get intellisense (I'm using VS Code) for things like UITextView and other native calls. But when updating my project, this module is removed from package.json. And if I add it back in, it says my project is not compatible with 7.x.
Do I just need to wait until the plugin is updated, or is there another way to get intellisense going, but still use NS 7.x?
Extending on Matthew's answer. Make sure you are including in your tsconfig the references.d.ts file, the one that points to either tns-platform-declarations or #nativescript/types, depending on your NativeScript version.
When you migrate the project it will change your tns-platform-declaration to #nativescript/types
https://nativescript.org/blog/nativescript-7-announcement/

How to use webstorm 11 to debug meteor 1.2 application with ecmascript package

After recently updating my project to meteor 1.2 and including the new ecmascript package (to use ES2015 features), I realized that my server debug breakpoints will never run, no matter what I do.
After reading about different ES6 posts on meteor forums and jetbrains , I tried setting up file watchers to create sourcemaps, but:
meteor complains about the generated files(so you have to move them to special folders in order to keep going)
It still doesn't work :(
Setting up spy-js also didn't work (never tried before so maybe I did it wrong)
I could reproduce the problem with the basic TODOs application and debugging with default options.
It is fixed for now in EAP 11 builds.
Known issue, please follow WEB-18074 for updates. Unfortunately I can't offer any workarounds:(

Using jQuery Mobile in Tool for Cordova project targeted Windows Phone 8.1 & Windows 8.1 will resulted in layout not rendering properly

I am not sure if this is a known bug or some conflict with jQuery Mobile within the Tool for Cordova project but when I use jQuery Mobile inside mine project the layout did not rendered correctly.
For example, start with a blank project. I then added both jQuery 2.1.3 and jQuery Mobile 1.4.5 from NuGet. Then inside the index.html, I have added a text input element. It is pretty simple and nothing is complicated. Then trying to run the project on both simulators and real devices would yield the result that the text input element did not appear at all, even though it resided inside the DOM. Further investigation provided the same result like this question: Tools for Apache Cordova: JQueryMobile wraps input tags inside a head tag?. This did not happened when I targeted the app with Android or iOS. Everything would rendered correctly in those two platforms.
I suspect that there are some conflicts when Visual Studio built the application and injected WinJS as well as jQuery Mobile. I have searched a lot of place and there are no mentions of incompatibility between them.
After trying everything, I gone back to the basic. I started installing Cordova CLI and tested to see if this problem would be there. To my surprise, the Windows 8.1 and WP 8.1 projects from the Cordova CLI build are working perfectly fine. Everything is rendered correctly, although there was an issue with jQuery Mobile changePage().
If this is actually a bug in pre-released software, then I hope in the final release, everything should work correctly. In the meantime, anyone would like to try suggesting me a workaround for this problem. I know there are at least me and the other guy from the question that I have linked above that had issue like this.
Thanks.
Update my finding: The problem is with the library winstore-jscompat.js. Apparently, even with the new CTP 3.1, the file is not the recent one from GitHub. I downloaded the new version from GitHub, replaced it with the old one, and everything works perfectly now.
The GitHub is from here: https://github.com/MSOpenTech/winstore-jscompat.

How to add Core Plot as static library to Mac app?

I am working on a Mac App project using Xcode 5.0.2. Currently Core Plot 1.1 is integrated in the project. I did this following the instructions on the Core Plot project page: The Core Plot source code is integrated in my project and compiles alongside with my app.
Since I switched from Xcode 4 to 5 I have trouble starting my app. The receipt validation code that runs at startup cannot verify the apps receipt any more. The console shows a hint that the app is not signed properly:
storeagent[329]: Unsigned app (/Users/MyUser/Library/Developer/Xcode/DerivedData/MyApp-gvgullbzaekzujejuhfssrnmmmit/Build/Products/Debug/MyApp.app).
I found a hint that there is a problem signing nested bundles like Core Plot when using Xcode 5 on Mavericks.
Because of this I would like to integrate Core Plot as static library instead of as nested bundle. However the instructions on the Core Plot page (see link above) only describes this option for iOS projects.
Is it possible to use Core Plot as static library in an Mac App project as well? What would be the necessary steps to do this?
You have probably figured out a way to do this already, but as I was struggling with the same thing myself and the steps, while simple, don't seem to be explained anywhere I thought I would do so as an answer here. As you mentioned, this is not explained on the CorePlot Mac Setup Page, so it may cause complications or become obsolete down the road, but it is working for me as of right now. Steps are:
Download the latest CorePlot release
Copy the file Binaries/MacOS/CorePlot.framework into your project (drag and drop or by using "Add files to ..."
Make sure you enable "Copy items into destination group's folder (if needed)"
Make sure the new framework is added to the applications target membership
Set up the framework to be copied during build
Under Build Phases, add a Copy Files phase if there is none
Change the destination to "frameworks"
Drag the CorePlot.framework file from the Project Navigator into the file list

Resources