Fixed build errors and unit tests fail

Updated project files in order to fix build errors (added link to UIKit and CoreGraphics frameworks). Fixed unit tests fail - XCTAssertEqual validates the arguments types. Added explicit type cast.
Which platform do these tests fail on? I've run the test suite locally on several platforms and they pass as is. The Travis CI build is green, too.