I really don't understand your problem - if you say:
The image is an image of paper that is pure white, and the drawings are in the four corners of black.
Then what is the task of masking only these four contours from the image? Having made a 4-square mask with a length of 40 pixels, I got the following:

To remove small areas, you can use morphological operations. I got it:

And just draw them (optional) on the input image. Result:

To implement this algorithm, I use the OpenCV library. I am 100% sure that it works on iOS - the OpenCV team has finally published the version of iOS . Therefore, if you say:
I tried to launch the OpenCV-iOS link, but the project does not start, it shows errors.
Then we cannot help you with this, because we are not telepastes to see your problem. Just a small suggestion - try to solve your problem. I am 99% sure that it should help.
And so I don't forget - here is the C ++ code:
Mat src = imread("input.png"), tmp; //convert image to 1bit cvtColor(src, tmp, CV_BGR2GRAY); threshold(tmp, tmp, 200, 255, THRESH_OTSU); //do masking
source share