UIApplication sharedApplication key window error

Back to How-to Discussions
The issue in this thread has been resolved.

Hi guys, our team is facing an issue while trying to get working two modules on our apps. the first module is sumup, created by myself (it can be found here: https://github.com/princefr/Fuse.Sumup) sumup sdk required a window for working properly. a fusetools member advice me to add this to a uxl file.

<Require Condition="iOS" AppDelegate.SourceFile.ImplementationScope> <![CDATA[ - (UIWindow*)window { return [[UIApplication sharedApplication] keyWindow]; } ]]> </Require>

the sumup sdk work pretty well after adding this but its create a conflict with some other module like instabug (https://github.com/bolav/fuse-instabug/blob/master/Instabug.uno), who need the main window to work. after crashing many times using both module this is what instabug devs told me.

Let me share with you some information that might be useful. 
The SDK gets invoked on a separate window. We check the rootViewController of the user's keyWindow. Then, we change our supportedOrientation to match yours. 

For some reason, in your case, the rootViewContrioller is our viewController (IBGViewController). This is when the problems start to happen. 
Do you need any extra clarifications?

when i delete the extra window from the uxl file , the instabug module works again but not sumup. what i need now its a solution to get both module working

fuse 1.3.0 was supposed to fix this. it didn't.

Native UI:

Fixed bug on iOS that could cause native views from thirdparty libraries to get an incorrect position. (Fixes issues with Firebase AdMob)

Hi prince,

That iOS fix you linked was not about the Application keywindow issue, they are totally separate.

The fix I had hoped to ship in the last release didnt ship because it caused a bug in rotation on iOS. I got time to go back and fix it in Uno yesterday so this will be out in an upcoming release.

Post Stats
  • 3
    replies
  • 162
    views
  • 2
    users