Post

Replies

Boosts

Views

Activity

App terminates with the error: UIWindows were created prior to initial application activation
Sometimes (let's say once every 10-20 tries) when application is sent to background by pressing the home button and launched real quick again, the following error is seen on the console: UIWindows were created prior to initial application activation. This may result in incorrect visual appearance. And subsequently the app gets the call applicationWillTerminate: and is terminated. There is no crash or any type of crash log. It seems the system terminated the app. Here are some of the application delegate calls around this time: ================================ default 10:20:49.118688-0700 App applicationDidEnterBackground: default 10:20:49.128036-0700 App applicationDidEnterBackground: saved managed object context error 10:20:49.683527-0700 App UIWindows were created prior to initial application activation. This may result in incorrect visual appearance. default 10:20:49.689023-0700 App applicationWillEnterForeground: default 10:20:50.358051-0700 App applicationDidEnterBackground: default 10:20:50.360120-0700 App applicationDidEnterBackground: saved managed object context default 10:20:50.363996-0700 ToDo applicationWillTerminate: ================================ Even though it's not impacting the app functionally except that once in a while the user may have to re-launch the app, still, it can lower user confidence in the app. How can I prevent this? Is there anything that should be done in the application lifecycle via one of those delegate calls? Thanks.
2
0
1.3k
Oct ’21
How to disable XC UI Test Activity Log?
Hi: When I run a UI Test, I get a lot of activity logs similar to these: ============== t = 10.39s Find the Any t = 10.42s Get number of matches for: Elements matching predicate 'identifier BEGINSWITH "XYZ"' t = 10.44s Get number of matches for: Elements matching predicate 'identifier BEGINSWITH "XYZ"' t = 10.46s Find the Any t = 10.49s Find the "XYZ11" XYZ t = 10.52s Find the "XYZ11" XYZ t = 10.54s Find the Any t = 10.57s Find the "XYZ16" XYZ t = 10.59s Find the "XYZ16" XYZ t = 10.61s Find the Any t = 10.63s Find the "XYZ12" XYZ ============== Is it possible to disable these logs? Would that speed up the tests a little?
0
0
626
Aug ’20
Provisioning profile "iOS Team Provisioning Profile: abc.XYZUITests" doesn't include the com.apple.security.application-groups entitlement.
This is in Xcode Version 11.5 (11E608c).In XCTestCase following call was returning nil when UITests was run on thedevice:[NSFileManager.defaultManager containerURLForSecurityApplicationGroupIdentifier:@"group.abc"]App Group group.abc is added to the main target XYZ. There is no option to addapp group to the XYZUITests target.I checked XYZ's Provisioning Profile "Xcode Managed Profile" and it shows:----------------------App Groups: 1 includedIncludes group.abc.----------------------and also:-----------------------------------------Entitlements: 5 includedIncludes application-identifier,...,and com.apple.security.application-groups.-----------------------------------------I checked XYZUITests's Provisioning Profile "Xcode Managed Profile" andthere was no "App Groups" and "Entitlements" did not includecom.apple.security.application-groups.So, I added following to the "Build Settings" of XYZUITests:In the Code Signing Entitlements field (both Debug/Any SDK and Release/Any SDK)I added XYZUITests/XYZUITests.entitlements.Please note that I had copied XYZ/XYZ.entitlements asXYZUITests/XYZUITests.entitlements to ensure that XYZUITests also had theexact same entitlements as XYZ (the main app).But under "Signing & Capabilities" Tab when Provisioning Profile is createdfor XYZUITests, it throws this error:Provisioning profile "iOS Team Provisioning Profile: abc.XYZUITests" doesn't include the com.apple.security.application-groups entitlement.Short question is: how do I make the following work in UITests:[NSFileManager.defaultManager containerURLForSecurityApplicationGroupIdentifier:@"group.abc"]Is it possible to achieve that within Xcode or with the free developer account?Thanks.
0
0
1.2k
May ’20