I'm trying to migrate an Angular app to a shared codebase with Nativescript using the new #nativescript/schematics, however, I'm having problems importing my Angular library when building the mobile version of the app. I used the angular-cli to create the library (ng generate library).
For the web version, all I had to do was build the library separately using ng build library-name which then allowed me to import it into the main application.
How can I build a mobile version of the library that can be imported into the main application when running tns run ios --bundle? I've already migrated the components and module of the library with appropriate *.tns files.
Any help is appreciated
I had the same problem. Nativescript cli do not have this feature where we can build an angular library into npm package and use it in other projects.
I tried a workaround and it worked for me. Write a script to copy all of your project files into another directory and replace all *.tns.ts, *tns.html and *.tns.scss. files with *.ts, *.html and *.scss respectively. Then build these files using regular ng command. You can add a build configuration for the same in angular.json file to build from the copied directory. I hope it helps.
I'm sorry this is just a hyperlink answer but the space required to answer this, in my opinion, is way too large. I just finished finalizing a repo I've been working on to do exactly this. I have a whole slew of angular web libraries that I now want to make available for use on mobile using NativeScript. I have put everything I have learned so far into this repo and I hope it helps you too.
Thanks for the final push/idea #Rohit, a script for doing what he suggests is in the test-lib/gulpfile.js of this repo.
Related
I'm new to Golang and I'm interested in integrating Vite.js as an asset bundler. However, I'm facing some challenges with the integration. Specifically, I'm not sure how to configure the necessary directives in Golang so that it can automatically detect which version of CSS and JS to show. I know I can show the build version of files using their names, but how do I accomplish this in dev mode? Additionally, for the production build, I would need to read the manifest.json file. Any help would be greatly appreciated.
I am working on XCode 9.1 project that uses IBM Watson swift-sdk SpeechToTextV1 package. After upgrading swift-sdk to the version 0.19.0 and building XCode project the compiler error has occured: Missing required modules: 'SSCZLib', 'SSCommonCrypto' pointing to the import SpeechToTextV1 statement. swift-sdk updated via Carthage.
Cartfile content: github "watson-developer-cloud/swift-sdk".
command line update: carthage update --platform ios --no-use-binaries.
How can I include SSCZLib and SSCommonCrypto modules into XCode project?
Please help. Thanks a lot.
Use carthage update --platform iOS --no-use-binaries. It takes a while, but it works.
I'm afraid that I haven't been able to replicate the problem on my machine. I started with a new, empty Xcode project and was able to transcribe audio with the Speech to Text service.
I uploaded my app here. Can you try downloading it, adding your Speech to Text credentials, and running the app?
Please make sure that the newly compiled frameworks are the ones being used. Carthage does not place the frameworks in a custom location that is referenced in the project or workspace.
For me - in addition to building the library using --no-use-binaries flag - I also had to ensure that under my target's
Build Phases->Embed Frameworks
Build Phases->Link Binary with Libraries
SpeechToTextV1.framework is included
In addition - I found that these two files made all the difference inside the Carthage folder:
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/include.h
Carthage/Checkouts/ios-sdk/Source/SupportingFiles/Dependencies/Starscream/zlib/module.modulemap
I could only get this to work after my project was directly referencing the Carthage folder. Deleting either of these two files caused the error to return.
The v0.21.0 release of the Watson Swift SDK fixes this issue. You should no longer have to add a link to the zlib folder in your project settings. However, you will need to copy Starscream.framework into your application in the same way that other frameworks are copied.
The solution was to externalize the Starscream dependency. Adding Starscream as a recursive dependency for the Swift SDK allows it to build independently with its own environment. When the Starscream library is copied into your application, it should automatically include the SSCZLib and SSCommonCrypto dependencies.
We test each SDK before it's release, but this problem slipped past us. Our test machine happens to have other software that adds SSCZLib and SSCommonCrypto to the path, making it available to the Xcode build. It wasn't until we refreshed the machine with a new macOS install that we were able to replicate the problem. And with v0.21.0, that problem has been solved.
Sorry for your trouble and thank you for your patience while we tracked down the solution!
I have followed the following steps:
ran prepmac.sh examples
tried to build the FireBreath.xcodeproj got a lot many errors then added two header files and SpriteKit/SpriteKit.h to the BasicMediaPlayerPluginMac.mm only then i was able to build the project on success i linked it to Library/InternetPlugins folder. On opening the html page for the media player it says plugin missing. Application of x-vnd.fbBasicMediaPlayer not found, cannot read the plugin as error. I tried adding two other frameworks namely coregraphics/coregraphics.h and cocoa/cocoa.h but the build was unsuccesfull. I'm trying to look into the plugin and how it is developed.
Start from simplest possible setup. Build FBTestPlugin, it should not require any changes to the setup. Put the plugin to /Library/Internet-Plug Ins and restart your browser before trying to load it by the html sample supplied.
Note that project files should be never modified explicitly, only through cmake files and prep-scripts.
Good luck, these plugins are not simple to develop :)
I am developing a meteor project which requires a deck-offline function.
The idea of deck-offline means you can download a group of files to local pc from server side.
I found a similar js file which provide an solution for it, the url is https://github.com/piatra/kreator.js/blob/master/lib/kreator-download.js.
So I want to ask if there is some package or api can implement the download file function from server side.
I have found great use for CollectionFS:
https://atmospherejs.com/package/collectionFS
How to install packages from atmosphere can be found here:
https://atmospherejs.com/docs/installing
Hope this suits your needs.
As the title says I'm trying to add resources to a project (SFML) that I'm developing on GNU/Linux. I'm using Qt-creator to develop it as a non-qt application using qmake to build the project. This means that the usual Qt way to handle resources in a .qrc is not an option.
I've tried to symlink my resource folder into the build folder which works but this obviously feels wrong.
Any suggestions would be of great help.
After smashing my head against this for a while I ended up restructuring my project and using make instead of qmake. That worked like a charm.
Then I just added my custom make script to the build steps in Qt Creator so that I can build and run with ctrl+r.