Transport yourself here:
https://github.com/NativeScript/nativescript-plugin-seed
Please use the official NativeScript seed going forward as no new development or improvements will be added here.
Transport yourself here:
https://github.com/NativeScript/nativescript-plugin-seed
Please use the official NativeScript seed going forward as no new development or improvements will be added here.
With the latest update, I now have to run npm install
then I can run npm run setup
or else these errors occur:
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/android17.d.ts' not found.
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/ios.d.ts' not found.
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/org.nativescript.widgets.d.ts' not found.
Hi Nathan (or anybody else that are Nativescript plugin experts),
I'm not in any way confident in making plugins yet and everything looks really overwhelming, when you haven't touched Objective C before and the delegate thing really throws me off... But I'm willing to learn!
I'm trying to make a plugin for the payment solution Visa Checkout for iOS. I'm provided with .framework files and an SDK.
I have a fresh install of your seed w. typescript installed and I've added the .framework files (which contains module.modulemap) to the platforms/ios folder, furthermore I've added a build.xcconfig file, with the following content (but it's more or less a guess with info from the SDK):
OTHER_LDFLAGS = -all_load, -ObjC, -lc++
According to the docs, there are come steps I need to do, in order to get it up and running, and I'm more or less clueless on exactly how and where to do it in connection with the plugin.
Import VisaCheckoutFramework.h into your view controller and adopt the
VisaLibraryDelegate protocol.
#import <UIKit/UIKit.h>
#import <VisaCheckoutFramework/VisaCheckoutFramework.h>
@interface ViewController : UIViewController
@EnD
Important:
You must implement all required methods in VisaLibraryDelegate.h.
Add the Visa Checkout button to your view.
There are 2 variations of the button, a standard button and a neutral button. You
should use the standard button unless the background colors in your app are dark,
in which case, you can consider using a neutral button to provide greater contrast.
You can add the Visa Checkout button in one of two ways, either through code or
through the storyboard view.
Note: –The frame width determines the actual size of a Visa Checkout button,
whose height is sized to retain the original aspect ratio. The frame width
must be between 154 points and 213 points, inclusive. The origin (x and y
coordinates) you specify position the button at the desired location.
For an express checkout button, the width must be between 213 pixels, up to
the screen width. The height is 77 pixels.
• Code method:
If you are using a Visa Checkout button, add the following button code to your
loadView or viewDidLoad method:
VisaCheckoutButton *checkoutButton =
[[VisaCheckoutButton alloc] initWithFrame: CGRectMake
(30, 80, 0, 0)];
checkoutButton.delegate = self;
// Set the button color to neutral, if necessary
// self.checkoutButton.color = VisaCheckoutButtonColorNeutral;
[self.view addSubview:checkoutButton];
If you are using an express checkout button, add the following button code to
your loadView or viewDidLoad method:
//Add the following button code to your loadView or viewDidLoad
VisaExpressCheckoutView *exoButtonContainer =
[[VisaExpressCheckoutView alloc] initWithFrame: CGRectMake
(0, 0, 200, 77)];
exoButtonContainer.expressCheckoutdelegate = self;
// Set the button color to neutral, if necessary
exoButtonContainer.color = VisaCheckoutButtonColorNeutral;
[self.view addSubview:exoButtonContainer];
Implement the VisaLibraryDelegate methods for the Visa Checkout Sandbox
or production servers. For more information, see Visa Checkout Library Delegate
Methods.
I've attached the SDK for more info. Hope you can help me out here, as I've been struggling for quite a while... :-)
Best regards
Patrick
Hi Nathan,
By following the instructions to the point and the running npm run demo.ios, I get the following errors
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
And finally this one:
1 0x104b338d7 -[TNSRuntime executeModule:]
2 0x1046d9572 main
3 0x108a5268d start
file:///app/app.js:2:26: JS ERROR Error: Could not find module 'application'. Computed path '/Users/patrickpereira/Library/Developer/CoreSimulator/Devices/6B5900B6-5778-4852-9243-1D3BE3B67E6E/data/Containers/Bundle/Application/B76297F2-2002-432E-98AD-4B851B8A0713/demo.app/app/tns_modules/application'.
Feb 8 15:04:55 Patricks-MacBook-Pro-2 com.apple.CoreSimulator.SimDevice.6B5900B6-5778-4852-9243-1D3BE3B67E6E.launchd_sim[9950] (UIKitApplication:org.nativescript.demo[0x549b][27801]): Service exited due to Segmentation fault: 11
What is the issue?
Curious if anyone thinks it would be beneficial to integrate semantic-release into the seed?
/cc @EddyVerbruggen
When trying to run the script using npm "npm run demo.android" after running "npm run setup" building the project it gets stuck at "Preparing project..." forever, I tried to remove the plugin from the demo project to run it without the plugin and it seems to work.
I thought it could be a problem with tsconfig.json or package.json so I modified it to be like in here to see if that can give any effects: https://github.com/bradmartin/nativescript-color-picker
but unfortunately no change still same problem.
Hi, i'm just trying to load native package in plugin. but when i run tsc
from root, i got error error TS2304: Cannot find name
. below is my tns info
┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 2.5.4 │ 2.5.4 │ Up to date │
│ tns-core-modules │ 2.5.2 │ 2.5.2 │ Up to date │
│ tns-android │ │ 2.5.0 │ Not installed │
│ tns-ios │ │ 2.5.0 │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘
thanks
This is a great template! There is one issue I'm running into. After completing all the steps, I see that the plugin module is not found in my demo tns project. So I don't get intellisense when using the plugin in the app. How do you recommend exposing the plugin API to the app itself...
Thanks!
would be handy to see references for platform specific dependencies added to the docs,
platforms
ios
Podfile
android
include.gradle
[or] .jar file
Hello. Got an issue, in examples, such as cardview and others, they are using Styler class, which is declared in style.d.ts, which is located at ui/styling.
But after cloning this repo i can't extend this Styler class.
Is this issue connected with nativescript-plugin-seed or it's about changes in NativeScript API?
Just as an fyi that, as is, this plugin generator is going to break when you upgrade to 2.2 because of changes to tns-platform-declarations. I’ll give details (and hopefully a PR) when we figure out what’s up, but for now I just wanted to let you know so you don’t waste time debugging this. Might want to follow NathanaelA/tns-template-plugin#5.
No matter if i delete it i end up having this
"dependencies": {
"nativescript-mobileiron-appconnect": "file:///Users/alexrainman/Github/nativescript-mobileiron-appconnect",
"nativescript-unit-test-runner": "^0.3.0",
"tns-android": "^2.5.0",
"tns-core-modules": "^2.5.0"
}
Then my iOS app is 33 MB bigger.
I faced following issue when running 'npm run setup'
error TS6053: File 'node_modules/tns-platform-declarations/tns-core-modules/ios.d.ts' not found.
I renamed my plugin from "nativescript-nsappconnect" to "nativescript-mobileiron-appconnect" and now when i run:
npm run demo.ios
The script is looking to remove the old one and i cannot run the demo:
> npm run build && cd demo && tns plugin remove nativescript-nsappconnect && tns plugin add .. && tns install
> [email protected] build /Users/alexrainman/Github/nativescript-mobileiron-appconnect
> tsc
Plugin "nativescript-nsappconnect" is not installed.
Help?
@NathanWalker, nice plugin-seed. Currently, the postclone.js helps to change classname but it always has "nativescript" as name prefix for package. Is it possible to put extra option to have custom name prefix not always "nativescript".
For example, if I want to create a contacts class, if I put "contacts" as class name, postclone will create nativescript-contacts which seem often to overlap with other people's plugin. If I use "myapp-contacts", then the classname is "MyappContacts" sounds strange. So, if there is option to name-prefix, I could have name prefix ie "ns-myname" and classname "contacts", the postclone will create plugin as "ns-myname -contacts" and keep classname "Contacts" to avoid conflict with others package.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.