ObjFW  Changes To ObjFW

Changes to "ObjFW" between 2020-05-30 10:08:04 and 2020-06-01 00:19:20

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140












































































































































-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
# ObjFW project pageā€¦ or more precisely an FAQ

## What is ObjFW?

ObjFW is a portable, lightweight framework for the Objective-C language.

## Why would I need ObjFW?

It enables you to write an application in Objective-C that will run on any
[platform supported by ObjFW](doc/tip/PLATFORMS.md) without having to worry
about differences between operating systems or various frameworks you would
otherwise need if you want to be portable.

## This all sounds great! Where can I get it?
You can [get ObjFW 0.90.2
here](https://objfw.nil.im/downloads/objfw-0.90.2.tar.gz) ([PGP
signature](https://objfw.nil.im/downloads/objfw-0.90.2.tar.gz.sig)) and [get
the documentation for 0.90.2
here](https://objfw.nil.im/downloads/objfw-docs-0.90.2.tar.gz) ([PGP
signature](https://objfw.nil.im/downloads/objfw-docs-0.90.2.tar.gz.sig)).

You can clone the Fossil repository like this:

```
fossil clone https://objfw.nil.im objfw.fossil
mkdir objfw && cd objfw
fossil open ../objfw.fossil
```

There is also a [GitHub project](https://github.com/ObjFW/ObjFW) that you can
star, clone and fork. To clone it from GitHub, just type:

```
git clone https://gitub.com/ObjFW/ObjFW
```

Alternatively, you can browse the latest revision [here](dir?ci=trunk).

## What license does ObjFW use?

ObjFW is available under the terms of the QPL, GPLv2 or GPLv3. The license text for all three is included in the tarball and you can choose which one to use.

If none of these licenses is acceptable for you, please contact me so we can find a solution (please don't hesitate to do so, as it does not mean you have to pay something!).

## But why a new framework? There's Cocoa and GNUstep!

ObjFW is quite different from Cocoa or GNUstep.

If you want to write an application that is not limited to Mac OS X and its
Cocoa, you are usually told to port it to GNUstep. But this is already where it
starts: You have to port it. And there are differences between Cocoa and
GNUstep which can be quite huge sometimes. Cocoa does not have some stuff
anymore that's still in GNUstep and GNUstep often does not have stuff that was
introduced in Cocoa. So why not have a framework that runs everywhere - on Mac
OS X, on other Unices like Linux, Windows and even [very obscure
platforms](doc/tip/PLATFORMS.md)? This way you don't have to write your code
for Cocoa and GNUstep. If a function exists in that portable framework, you can
be sure it works on any platform. And that portable framework is exactly what
ObjFW is.

But it has more differences than that. If you don't plan to be portable, it
still offers advantages. For example, GNUstep is still designed for gcc 3.x and
does not make use of any features of newer GCCs. But gcc 3.x had very poor ObjC
support. It even has advantages to Cocoa: For example, it makes use of
exceptions not just for programmer errors, but for other serious errors as
well. This way, either the programmer has to handle the error or the program
will abort, which can avoid some really nasty bugs and even security holes
sometimes.

Another advantage is that ObjFW only includes the core stuff. If you don't want
all that GUI stuff and want to write a server, you might be quite unhappy about
all the stuff that GNUstep for example needs. And about how badly it integrates
into the Unix FHS. With ObjFW, your application will not look different to a
native application to the user. A server can just link ObjFW and does not need
some "strange" directory structure etc.

Last but not least, you can also mix ObjFW with Cocoa because ObjFW uses a
different prefix (OF instead of NS). For example, you can write your
application core using ObjFW, but write your GUI using Cocoa and later add a
Gtk+ or Qt GUI for Unices, using the same core. Mixing with Swift is also
possible!

## On which platforms does it work?
I recommend looking at the [PLATFORMS.md](doc/tip/PLATFORMS.md) file which is
updated as soon as new platforms are tested. But usually, it should work on any
POSIX system to which gcc4 or a recent version of LLVM (either llvm-gcc or
clang) has been ported. It also works on non-POSIX systems like Windows. This
is not an exhaustive list, just platforms that have been tested.

## Where can I find documentation?
The documentation is included in the source code. To generate it, you need
doxygen. Once you installed doxygen, you can generate it by typing `doxygen` in
the root directory of ObjFW.

You can also [browse the documentation for
0.90.2](https://objfw.nil.im/docs/0.90.2) online.

## But the documentation does not say how to compile my code that uses ObjFW!

The easiest way to compile a program using ObjFW is to use `objfw-compile`. You
can use it like this:

```
objfw-compile -o myapp source1.m source2.m
```

You can also use `objfw-config` to get the `CPPFLAGS`, `OBJCFLAGS`, `LIBS` and
`LDFLAGS` required to compile code that uses ObjFW. For example, you could do
it like this:

```
clang -Wall `objfw-config --all` -o foobar foobar.m
```

Or, if you don't want to do compilation and linking in one step:

```
clang -Wall `objfw-config --cppflags --objcflags` foo.m
clang -Wall `objfw-config --cppflags --objcflags` bar.m
clang `objfw-config --ldflags --libs` -o foobar foo.o bar.o
```

## Is there a list of 3rd-party libraries for ObjFW?

Yes! There is a [wiki
page](https://github.com/Midar/objfw/wiki/3rd-party-libraries) where 3rd-party
libraries for ObjFW are listed. However, this list is not official and
everybody may add a 3rd-party library there!

## I have further questions / feature requests / found a bug. What should I do?

Please join the [Matrix Chat](https://matrix.to/#/%23objfw:nil.im), which you can
also join via [IRC](irc://chat.freenode.net/#objfw) (`#objfw` on Freenode).

Alternatively feel free to mail me at `js-spam@nil.im` (remove the `-spam`). 

## I really like ObjFW. Can I donate?

Sure! If you want to show your appreciation, you can send Bitcoins to
[`1LobVDvKotgkL15ByK2epQdUwaXJ1GoQWt`](bitcoin:1LobVDvKotgkL15ByK2epQdUwaXJ1GoQWt?message=ObjFW).