I have custom library on my project.
At now i storage that library in vendor folder.
But i think that is not good, because vendor is folder for third-party developers and vendor folder was marked as gitignore
Where i should put custom library?
Thanks
You can create a directory almost anywhere you want, I created a folder called "lib" at the same level as your module and vendor folders to put custom libraries inside of.
Don't forget to add the namespace to your autoloader!
Related
Basically I want to use relative path in my html and js files that I imported to the project. It seems that xcode puts those bundle files all at the same level if I import files as group reference. So if I then get rid of all relative paths in my code it would work. But if I import them as folder reference as following links suggested none of those files will appear in Copy Bundle Resources (neither in compiled sources).
Load resources from relative path using local html in uiwebview
UIWebView doesn't load external Javascript file
Any help will be appreciated.
I managed to resolve my issue. What I did wrong was import the entire folder as folder reference that would expose the folder appearing in the root directory as the result. I could refer every files with that directory (e.g. root/js/abc.js) but that'd be bad.
I don't know if it's the best way to resolve but here is what I have done. I created one group and put everything else in that group except importing all sub folders as folder references. In that way all files in the root group can use relative paths without errors.
Note: all the files in the folder reference still don't appear in bundle resources and I still don't know how other people (in the links I posted) got it done.
You could put your front-end files into a real folder, then add the folder to your XCode project(don't forget to check "copy if needed", not as reference).
I am writing a Dart package, and I would like to have a resources directory that Pub includes with the package. I want this directory to be accessible relative to the root file of the package. Is there a standard way of doing this with Pub?
Thanks!
In general only files within lib/** can be used from other packages, therefore this is where you should put them.
Your question doesn't contain a lot of information what kind of package your want to create and what kind of resources you want to ship with the package or how the resources are supposed to be used by the user of the package. There are a few open bugs about other ways to make resources available to running applications.
Assets are available within the lib folder.
Create a folder under lib called assets, i.e. /lib/assets
Then link it in pubspec.yaml:
assets:
- assets/something.jpeg
I developing a library and I have next use case. For instance, I have project A that has dependency on project B. I want to setup my pod in project B, so both project A and project B have access to my pod functions. So dependency chain will look like:
My Lib
|
B
|
A
Actual code will be compiled and available in runtime in project A almost automatically, but I can't compile it because project A does not see header files from my library. The header files places in Pods/MyLib/MyLib/CustomIdentifier directory (because s.header_dir = 'CustomIdentifier' to have access with import like: #import <CustomIdentifier/Header.h>).
I don't want to specify in project A direct path to header file (I do not want user have to do additional action to install my lib). I want CocoaPods to copy my header files or links to them into Products/../include folder so they will be available automatically.
How can I do it? Preferably with podspec file.
Thank you for you help!
Looks like it has to do with folder paths
Quoting from docs:
header_mappings_dir
A directory from where to preserve the folder structure for the
headers files. If not provided the headers files are flattened.
Examples:
spec.header_mappings_dir = 'src/include'
Helped me with a similar issue.
s.header_mappings_dir = 'armadillo-4.200.0/include/' #allows any folders in here to be avail from project. Namely the folder of headers, armadillo_bits
http://guides.cocoapods.org/syntax/podspec.html#header_mappings_dir
I downloaded TouchDB, a "lightweight Apache CouchDB-compatible database engine suitable for embedding into mobile or desktop apps", which gives me a bunch of .framework folders (CouchCocoa.framework, TouchDB.framework and TouchDBListener.framework).
I've been reading the article on binding Obj-C libraries to MonoTouch, it shows how to bind a .a, but not how to bind a .framework.
How do I make a binding for these .framework? or should I somehow make a .a of these .framework before using them (if that is even possible)?
--EDIT--
related : https://bitbucket.org/LouisBoux/touchdb-monotouchbinding
Bind a .framework in MonoTouch takes several steps, a .framework is a directory that usually houses all the parts of a library package (e.g., the header files, resources and the library file). Here are the general steps needed to bind a .framework.
Create a bindings project like you would for a normal library file (libXXX.a)
The library equivalent in a .framework is the file without the extension that is at the root of the .framework directory, for example I recently wrote bindings for RDPDFKit.framework, the top level file was a file named RDPDFKit (no extension), rename this to "libRDPDFKit.a" and copy to your bindings project and add it to the project. It will create a code behind file with the supported platforms (e.g., x86, arm6, etc). All the documentation for this is on Xamarin's web site.
Define the bindings as you would for a normal library.
If the framework has a .bundle, copy this to you Program project (not the bindings project), it will need to be added as resources for the program. Add this directory to the project and all the items underneath, this is because resources in monotouch are not supported in DLLs.
The resulting monotouch bindings DLL will contain the entire .a file for later linking so you won't need the .a file after building the .dll.
You can use the .framework files just like the .a files. E.g. all the bindings MonoTouch provides (in monotouch.dll) are made from .framework files.
i a developing blackberry aplication using eclipse can any one tell where to find the following library
package com.rim.samples.docs.notifications;
i have downloaded it from blackberry site but i dont know how to use it
com.rim.samples.docs namespace is common for samples BlackBerry Application Developer Guide.
On the other hand, "package" token defines the packege namespace, not the import.
If you have downloaded code and post it to namespace with other name, you may have trouble to compile it. Resolve it in two ways:
1. if your code file is placed directly in project src folder, simply remove
package com.rim.samples.docs.notifications;
from code, this will set namespace to default.
2. in project src folder create folder "com\rim\samples\docs\notifications" and move file to folder "notifications".