Add iOS packaging to b.sh. Fix a bug.