Two files with same name - ios

I have two files in my project. One file is in a third-party Objective-C library and other is in my project.
Here DSGHappiness is a third-party library.
Q: How to solve this situation?

Related

What is different between "import<ABC/ABC.h>" and "import<ABC.h>"

When I studied other people's iOS open source code, I found that some programmers prefer to import third-party frameworks like this import<ABC/ABC.h>, but there are some use import<ABC.h>.
I want to know What is different between import<ABC/ABC.h> and import<ABC.h>?
Is it because of import<ABC/ABC.h> would be faster?
import<ABC/ABC.h> imports ABC.h from folder ABC in your project. And import<ABC.h> is directly imported because this file is directly referenced in your project folder while the other one is in a folder and then can't be reference directly. Note: Groups and folders are different things in Xcode.

How to package .json files for use in an ANE for iOS

I am creating an Adobe Native Extension (ANE) for use with iOS. The native code in the main .a library file used for the ANE depends on 3rd party frameworks which themselves depend on the definitions of JSON objects defined in several .json files. I can package the 3rd party frameworks with the ANE just fine - it's the .json files that I'm having difficulties with.
I've tried packaging the .json files into the main .a library file, although I don't know if I did it the right way.
Please help.
You should try to package the files into the ANE rather than the library file. Try putting them in the same directory as the library (a) file when you're creating your ANE.

How to share files among Xcode Projects

I have made some categories of some classes such as NSArray and NSDictionary. I would like to use these categories in several projects. I may modify the files in any project, and I want all other projects get the updated files.
What's the best way to share files among projects?
I have read this problem and this problem. Someone recommended to add targets into the same project. This is not a good solution in my situation, because my projects are not related to each other, and I have many projects.
In your case you can create a static library and put all of your classes, class methods or sub classes then you can link to your individual projects.
Static libraries provide a convenient mechanism for sharing code among
multiple applications. On iOS, static libraries are the only supported
library type. This document explains how to extract code from your
application into a new static library and how to use that static
library in multiple applications.
Whenever you want to add/edit/remove something you can edit and rebuild your library. Creating the Library and Creating a Static Library in iOS.
When Xcode 6 and IOS 8 released IOS will support frameworks as well.

How to import/link shared xCode project (and be able to edit shared project from any client)?

I don't want to compile shared project to any kind of library. I just want to use existing classes like they would integral part of client project.
I want to edit/develop/improve the shared project from any client project that use it.
I've ran trough google, but couldn't find the simpliest/more convenient approach.
More simple:
I want drag and drop shared code project, and be able to edit it anywhere. How?
There are two options: Use a static library, or include the source files directly in your project.
If you don't want to use a static library (which IMHO is the preferred method for iOS and integrates well with Xcode), you could just add references to the shared classes either as file references or as a folder reference.
Either way, the build toolchain will link everything together into one Mach-O binary, which is the only way to deliver code for the iOS.

How to create a MonoTouch binding from a .framework

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.

Resources