React native app cycling for ios16 with simulator - ios-simulator

In testing my react native app against iOS 16 with the simulator, I am noticing that I'm getting a new warning, and that my app cycles without resolving on the login screen once the "Log in" button is pressed with correct credentials applied.
This only started happening when testing this against iOS 16 with the simulator, after upgrading Xcode and macOS to Monterey.
This is the warning I'm seeing:
Require cycle: App.js -> state/store/index.js -> services/core/SocketDriver/index.js -> App.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
FYI, during this cycling, if I click "reload", the app will then resolve after again pressing the login button.
What should I be looking for in order to resolve this issue in the files listed above?

Related

Xamarin Forms - iOS debug on actual device hangs on launchscreen. Workin on simulator

I have a XF app already published on the play store and now I am targetting iOS. During developpent I made sure the app was still working on iOS, using the simulator only.
On the simulator everything works as expected, the launch screen is shown then the MainPage starts. But when I debug on an actual IPhone device, the app get stuck on the Launchscreen.storyboard for about 20 sec then the app exits. I've no debug output and it seems that the AppDelegate is never hit. Breakpoints in AppDelegate.FinishedLaunching method are not hit for instance. I tried to F11 for start in debugging mode but I don't hit anything, still hanging on the launch screen. I was expecting the transition from simulator to device to be less painful.
My plist file contains the following permission requirements
...
<key>NSLocationAlwaysUsageDescription</key>
<string>We need to use your location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We are using your location</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs access to the photo gallery.</string>
The only difference I saw is that location permissions are not asked on the device while in the simulator it asks for it at start. But this might be related to the fact that I can't reach AppDelegate, I am not sure yet.
The iOS project was generated via Prism templates. I am using VS 16.8.0 on Windows, XF 4.8.0.1687, Prism 8.0.0.1909, Xamarin iOS SDK 14.4.1.3 and I am set to "don't link" for linkers option. The device is an Iphone 10.
Any idea how can I find out the root cause - or get some useful logs?
Thanks in advance for your help.
EDIT:
Here are the device log output during a new installation https://taits.s3-eu-west-1.amazonaws.com/devicelogs.txt. I am trying to go through them but kinda lost.

Connection to daemon was invalidated

My app is using Firebase Analytics and I believe starting in iOS 13.2 started getting the errors described here: Why I get the console warning: [Process] kill() returned unexpected error 1 when I load a WKWebView in iOS13.2?
I guess it wasn't a big deal
Since I planned for my app to go live in January, I began bigger tests in physical devices. I noticed after a while the app started to behave erratically, specially after receiving a [general] Connection to daemon was invalidated error. This doesn't occur in the simulator
Searching the internet I found a post that describes the same problem: https://forums.developer.apple.com/thread/124306
In my case, only Firebase seems to be calling WKWebView, but every time I open the UIMenuController I get the error described in the console and the app appears to be missing inputs. This is specially troublesome with UIScrollViews, which my app uses a lot. The pinch gesture seems to work at will. On an iPhone 6s, the issue isn't as noticeable, on an iPad, it's like a 50% chance the pinch gesture will work properly
Outside of removing Firebase, is there a way to mitigate this issue?
1 June 2020: The console message still persists, however, I have seemed to resolve the UIScrollView issue by deactivating delaysContentTouches, now the pinch gesture seems to work most of the time
23 October 2020 If anyone notices their app starting to behave erratically with no apparent reason I HIGHLY suggest to test it on an iOS 13 physical device if possible. Seems that Apple removed the warning from iOS 14, but testing it on iOS 13 you can pin point the exact reason after the warning appears in the console
Upon further testing, I've reduced the view down to a dead-simple UI view with a single SwiftUI TextField and the 'Connection to daemon was invalidated' still appears after I type the first character into the field. Soon thereafter the app crashes with a sigAbort. (So I don't think the reason is the UITextView wrapper I was using in the previous post). Once the invalidated message appears the app is doomed to crash, not right away but soon thereafter.
I have no idea what causes the 'invalidate' message and a Google search seems to imply that no-one else does either. Some folks appear to have made (experimental?) changes to their UI that stops the message but it appears to be impossible to determine a definite cause. (and like before it only occurs on a real phone)
Same issue without using Firebase at all. What I did: Delete build folder and compile again. Issue does not appears again.
On Xcode:
Clean the Build Folder
This will delete all of the products and intermediate files in the build folder. To clean the build folder you can use the shortcut Command+Option+Shift+K or Menu Bar → Product → Hold Option Key → Clean build Folder.
On Flutter:
Just delete build folder.

How can I prevent iOS Simulator from presenting the "Do you want to try to reopen its windows again?" on launch, which breaks automation?

Our test automation sometimes makes the simulator crash. In these cases, we often see the dialog below throw on the simulator's next launch. This modal UI dialog breaks automation by preventing application execution until the user chooses an action.
When the iOS Simulator crashes, the application state may be saved in ~/Library/Saved Application State/com.apple.iphonesimulator.savedState. The presence of this folder or values in the data within triggers the modal dialog.
Removing this folder (rm -rf "~/Library/Saved Application State/com.apple.iphonesimulator.savedState") before restarting iOS Simulator will prevent the dialog from appearing. This has been tested with iOS Simulator shipped in Xcode 9.4.1.

getting binary errror with Watchkit app on submission from Application Loader on Testflight

I am using Xcode 8 and trying to upload my watchKit app to Testflight but its failing all the time.so far i have tried these options,
tried uploading it from Application Loader 3.6 and get invalid swift support, invalid watchkit support,and invalid executable error.
tried from Xcode 8. The app validates succesfully but upon upload to store, it just gets stuck. when i refresh, i do get an upload sccessful message but nothing is visible on testflight.
how to upload my watch app on testflight? please help
Have you enabled the version of your app to test on the iTunes Connect website?
I hope I'm not stating the obvious here, but if you:
Select your app in the "My Apps" section
Select the "TestFlight" tab at the top
Select "Internal Testing" on the left hand menu
Click on the "Select version to test" link in the page
Uploading an archive with a new version number doesn't automatically add it to TestFlight, so you have to go through this procedure every time you change version number (or on the first upload).
Once it's added, you should see the app appear in the TestFlight app on your phone. When it also has a Apple Watch app, and you have a watch paired with your phone, TestFlight will also install the app to your watch.
Hope that helps!

iOS Simulator keeps asking for an app to simulate

I only use the iOS simulator for testing websites, not actual apps. Today I opened it up and it keeps asking me for an app for it to simulate. If I click cancel, it just quits the simulator.
I've tried deleting preference files, but I'm just not familiar enough with the simulator to know what's going on. How can I just get this back to normal, or satisfy this dialog?
I think you could try the menu
iOS Simulator -> Reset Content and Settings...
This would clean your simulator storage.
Update
According to this link, Cleaning up the iPhone simulator
move to path
/Users/<username>/Library/Application Support/iPhone Simulator/{6.0 / 6.1}
You could try to clean it manually

Resources