Fixed iOS framework compilation warnings

most of changes were ported from master branch (PR #3292)