A PID of 0 doesn't mean the fork failed. It means the fork succeeded and that the current process is the child. PID > 0 means the fork succeeded and the current process is the parent (the returned value is the child's PID). PID -1 means that it failed.
Since app processes are usually forbidden from forking, a -1 is the expected result. If fork is allowed, then there are two processes. The parent returns YES, and the child is terminated since it isn't actually needed for anything but testing whether the fork was allowed.