Ntotani fix ios factory

Fix PR #49
Credit to @ntotani