r/ObjectiveC • u/noahcdesign • Apr 01 '20
Problem: App resizes after starting it
I'm not that experienced and have run into a problem. I have to integrate an SDK from our business partner to enable subscription plans. I integrated it successfully but when I start the app on my device the screen first loads normal but then after the SDK loaded the screen gets resized and pushed into the lower-left corner... I also cannot click on anything I would normaly be able to.
I have absolutely no idea why this could be happening but it has to be because of the SDK. When integrating it I have to add some lines of code to the existing info.plist maybe that is the issue?
I hope someone can help me fix this issue!
Thank you very much!
View all comments
Show parent comment
1
u/mariox19 Apr 01 '20 edited Apr 02 '20
Okay, I don't know what is going wrong, but this is what I think is going on and what I would do if I had a problem like this that I didn't understand.
First, I would make another project. The simplest thing possible—no fancy LaunchScreen or any other functionality. I would add only a button, and the code to integrate the ConnectFramework stuff.
My guess is that it's your code, not the third-party code. Maybe not, but you need to rule that out. My guess, based on your original post and a couple of minor things in the code you've shared, is that you may not have a firm grasp on how the Cocoa-Touch framework does things. I can't know this for sure, but I've seen this. (Where I work, our application is primarily legacy code built by someone who learned as he went along.) In short, I think you may be, as we say, fighting the framework (meaning: the Cocoa-Touch framework).
When you make your simple app, try to log everything you can. For instance, you should have something like this:
For your view controllers you should make their views different background colors, so you'll know what is showing.
This should get you on the right track. Good luck!