Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display issue in landscape orientation on iOS #11547

Closed
alexzheng opened this issue Sep 24, 2017 · 27 comments
Closed

display issue in landscape orientation on iOS #11547

alexzheng opened this issue Sep 24, 2017 · 27 comments

Comments

@alexzheng
Copy link

Operating system or device, Godot version, GPU Model and driver (if graphics related):
2.1
iOS

Issue description:

Just display an Admob interstitial ad in a game in landscape
the ads can not be displayed correctly.

Steps to reproduce:
This is the code in the module that add the interstitial to the root view :
UIViewController *rootViewController = (ViewController *)((AppDelegate *)[[UIApplication sharedApplication] delegate]).window.rootViewController;
[interstitial presentFromRootViewController:rootViewController];

Link to minimal example project:

@alexzheng
Copy link
Author

img_9969

@alexzheng
Copy link
Author

If the supported orientation of the iOS project is set to portrait, the ads can be display as expected.

@alexzheng
Copy link
Author

alexzheng commented Sep 24, 2017

what it looks like in portrait, this is correct.
img_9970

@akien-mga
Copy link
Member

We can't provide support for thirdparty modules. Until it's establish that it would be an engine issue, you should report bugs experienced with the admob module to its developers. If they can confirm that they are doing everything right and that the issue is in Godot, then they can open a bug report here.

@alexzheng
Copy link
Author

I reported this issue to google admob group, and they replied:
Hi there,

Thanks for providing me the requested information. However, I'm afraid that we do not support any third-party platforms and/or plugins in this forum (such as "Godot") and we will not be able to guarantee that everything will be working as intended. I would recommend you reach out to the support team of the platform/plugin you are using for further assistance on this.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

@alexzheng
Copy link
Author

alexzheng commented Sep 27, 2017

The module is implemented by myself, and the code for load and show the interstitial is quite common.
It's quite possible this issue is related to the Root ViewController of Godot.
I think it's not the issue of the admob SDK, I have integrated the SDK in other engines and works well.

@alexzheng
Copy link
Author

I contact the Admob SDK developer and ask them to review my module code:
They replied:

Hi there,

I looked through your implementation and I didn't notice anything suspicious from our perspective, and the code implementation seems to be straightforward. Although I noticed that you seem to be using the Application's Root ViewController to present your Interstitial Ads and not the current ViewController. You can check out on where to appropriately display the Interstitial Ad from our official documentation.

As previously mentioned, it would be best for you to contact the support team of the platform you are using for further assistance as they are out of scope for our support.

Regards,
Joshua Lagonera
Mobile Ads SDK Team

@akien-mga
Copy link
Member

akien-mga commented Sep 27, 2017

I was not telling you to get in touch with the Admob SDK developers, but with those who developed the Admob module you are using. There is no Admob integration in Godot, so you must have included it from a thirdparty.

Since you didn't provide any information about the module you're using, we can't help you.

@alexzheng
Copy link
Author

The module code is quite straightforward.
You can check the code here:
https://github.com/alexzheng/admob_for_godot.git

@akien-mga
Copy link
Member

It would have been useful to mention in the first place that you are the module developer..

@akien-mga akien-mga reopened this Sep 27, 2017
@alexzheng
Copy link
Author

Because I thought the module code related to load and show the interstitial is nothing more than the demo code from the official documents, it's not important.
It must be something issue related to the root view controller in the Godot code or the template project settings.

@groud
Copy link
Member

groud commented Sep 27, 2017

Isn't that a duplicate of #11628 then ? (Which is more explicit)

@alexzheng
Copy link
Author

absolutely different issues.

#11628 is only happen on the iOS 11, and the content of game itself displayed incorrectly.

@alexzheng
Copy link
Author

really lots of issues after upgrade to iOS 11.

@alexzheng
Copy link
Author

Is any contributor taking care of this issue?
It really prevents the engine from publishing games.

@bojidar-bg
Copy link
Contributor

I know nothing of iOS (or OSx and Objective C), but the only thing related to their comment which I could find is:

+ (ViewController *)getViewController {
return mainViewController;
}

Not sure if it would help though :[

@alexzheng
Copy link
Author

UIViewController *rootViewController = (ViewController *)((AppDelegate *)[[UIApplication sharedApplication] delegate]).window.rootViewController;

UIViewController *rootViewController = [AppDelegate getViewController];

This result is the same. It's just get the root view controller.
There must be something wrong related to orientation in the root view controller.

@alexzheng
Copy link
Author

It happens when only landscape left and landscape right is enabled for the device orientation,if portrait is also enabled, it will show correctly.

@akien-mga akien-mga changed the title display issue in landscape orientation display issue in landscape orientation on iOS Oct 14, 2017
@akien-mga
Copy link
Member

Maybe @BastiaanOlij or @endragor can help with this one and #11628.

@BastiaanOlij
Copy link
Contributor

Haven't done too much with this in iOS 11, I've locked my projects in landscape mode because you don't want this sort of rotation for AR, Apple does some weird stuff. When I did accelerometer and gyro code I did spend some time making sure it worked correctly with auto rotation but that was purely in detecting what the rotation was.

Wish I knew more about this to actually give some worth while advise.

@alexzheng
Copy link
Author

this issue is not only happens on iOS 11,it also happens on iOS 10.
#11628 only happens on iOS 11.
And the termination issue #11623 also only happens on iOS 11.

@alexzheng
Copy link
Author

This issue happens even if locked the project orientation to landscape.

@sersoong
Copy link
Contributor

I've found the reason.
And fix it in my code.
Perfect.
capture

@alexzheng
Copy link
Author

What did you modified?
It seems nothing need to modify after changing the compile SDK path.

@Calinou
Copy link
Member

Calinou commented Jun 7, 2020

@alexzheng Can you still reproduce this bug in Godot 3.2.1 or 3.2.2beta4?

@alexzheng
Copy link
Author

no

@akien-mga akien-mga added this to the 3.2 milestone Jun 7, 2020
@akien-mga
Copy link
Member

Closing as fixed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants