I am making a Xamarin.Forms project, and I am in the end of my app, but something really strange have happened. My app starts up with no labels (!?), meaning they are invisible or not created at all. Everything else seems to be working, until I press a button that is supposed to change the label - when I do this, the app freezes. I get no exception in Visual Studio, though.
One problem is that my breakpoints in PLC code never hits, only those I place in the iOS code. However, the buttons not related to changing a label works, so I know the PLC code have been ran. If I let the app run for a little while, and then press the pause-button in VS debugging to see where in the code I am, it stops at
UIApplication.Main(args, null, "AppDelegate");
.. in Main.cs. I dont know if this is correct or not, when I run on Android, I get a Break Mode - No code is currently running.
I have been trying for hours to debug, reinstall, restart, clean and rebuild, but nothing seems to help. My code works perfectly in Android, and it worked in iOS 1 week ago. Anyone have any ideas what is going on, or what I can do to debug some more? Or must I make a new project and try start over?
Edit: I have also tried different starting pages, and all are the same: all views loads except those with text in them. I have a page with an Editor in it, and I can write in it, but no text is appearing inside of it. Only button have visible text. I do not use a custom font for my labels, I have not specified anything.
Waking up fresh in the morning, I found my issue in 15 minutes..
After altering my Google search to TextView iOS instead of Label Xamarin, I found much more answers. Thanks to this question and answer.
Basically, changing anything on the labels in the constructor of the page (even after InitializeComponent()), will mess up the view. I moved my code outside of the constructor (in the protected override void OnAppearing() method), and now it is working again.
The freeze part was not related - this was my custom menu that covered my screen with an invisible layout eating up all clicking events. A bit confusing, none of these issues are present in Android, but there you go.
Related
I'm in the process of creating a Mac Catalyst app from my existing iOS app. My problem is this strange transparent view that appears beneath my secure textfields. It appears when the textfield gets the focus by clicking into it, entering one or more characters and deleting every character in the textfield. This does not happen on iOS. The app is all UIKit and Swift no SwiftUI involved.
In the first image you can see there's a character in the textfield.
The second I delete it, this strange view appears. I can not remove this view by clicking somewhere else within the app's window. I can remove it, however, by switching to another app or by hitting the escape key.
In the third image you can see another instance of this transparent view/panel/window on a white background where it can be seen more clearly.
Unfortunately, it's not possible to capture it in Xcode's "Dubug View Hierarchy" since the view is gone the second the app goes to the background.
User rene seems to have the exact same problem but he's using SwiftUI which I don't.
I read through posts regarding similar issues and they seem to be solved by telling the secure UITextField that its "textContentType" is ".oneTimeCode" or anything else except ".password" but that idea didn't help me with my problem. I tried setting the "textContentType" and I tried setting the "keyboardType" as well. Both approaches failed solving my problem.
I have the impression that the OS is trying to present me the "passwords" feature so that I don't have to type in a password but this is only a theory since I don't see the grayish view saying "Passwords".
User Eddie Ed mentions a similar problem but hasn't gotten any answers yet.
Maybe it's simply a bug with Catalyst, I don't know. I haven't filed a radar yet. Hopefully, you helpful people have an idea or encountered and solved this problem one way or another. Any help is appreciated. Thank you.
I am having a very weird issue on an iPhone and I would like to have suggestions on the best way to troubleshoot. My web application works fine for a moment then suddenly all text fields and buttons will have no effect, but only to open the virtual keyboard.
For example, a "delete" button which used to display a "yes/Cancel" modal will only make the keyboard open, the modal won't show up... When I reload the page, everything is working as expected again.
I am testing with an iPhone 6 and Chrome.
Did someone already encountered an issue like that?
I have absolutely no idea how to track down this behaviour and all suggestions are welcomed, What do you suggest I should look in priority?
This issue was coming from a bug in a version of Chrome I was using at that moment (I have no idea which one, since my phone has regular automatic updates).
I strongly advise to have always at lease two different platforms when testing websites!
I'm experiencing a weird issue with my Swift 2.0 app.
I have a (editable) UITextView defined in my storyboard.
If I leave the text property empty in the storyboard everything is working as expected. But when I enter the text Kaasje (in the storyboard and recompiling), the app freezes when loading the nib (navigating through segue) and the CPU jumps to 100% (the app remains stuck).
The app will never reach viewDidLoad at this point.
It makes no difference when changing between fonts or fontsizes, behavior remains.
Pausing in Xcode does not leave me with anything useful, the main thread is busy without specifying any function. Nothing is logged to output nor any logs are created.
I'm running iOS9 on a iPad Air, the app has a built target of iOS8 and runs landscape-only.
Has anyone ever experienced anything like this before, and might have an explanation for this behaviour?
As far as my assumptions: Something goes wrong when calculating the text-size which results in a infinite loop while either calculating the size or adjusting the frame.
P.S. It happens with other texts too, but "Kaasje" always fails. It seems to fail when the the text is only 1 line. Longer texts tend to succeed aswel as leaving it empty.
As suggested in the comments there seems to be a bug in Xcode 7 in combination with iOS9.
I ended up recreating the entire view, the problem did not occur again.
I am following the Udacity tutorial on Swift, and for some reason when I added the second view, I usually get a black screen (as in the screen print) right when I open the app. Occasionally I get it working but usually not.
What could be the problem?
Noticed that "Did appear" is printed before "Will appear", is that a bug or did I do something wrong?
I have read this and this but it didn't help much. I also have tried several times to clean the project and rebuild it (nothing changed).
One time I just commented out some code (from the second view that should be loaded) and it worked suddenly. When I uncommented the same code it still worked.
Another time it worked when I disconnected the second view on the story board (it was still there, just no way to reach it).
Both have worked at least one time, and not worked many times.
Sorry this seems like I throw in random pieces of information, but I have no idea what could be the reason.
So I have a really weird error at the moment. I'm just about ready to deploy my app to the App Store (having already had several debug versions running as expected on my iPhone), but all of a sudden, mouse clicks do not appear to work on one single frame.
They run as expected in Flash CS6 Pro's iPhone Simulator (ADL).
The events are set up in the same way across the few frames and there should not be an issue at all. I have not changed the event listeners or functions since updating other elements of program.
It is also worth noting that the animation for MOUSE_DOWN on these buttons is working correctly.
I have tried the following to fix the problem, but to no avail:
Add the event listeners directly to each button
Have one event listener handling every single button
Add that single event listener to the stage
Use the MOUSE_UP event instead of MouseEvent.CLICK
Prompt help would be greatly appreciated as I am hoping to deploy this app to have it reviewed ASAP. Also, simply because it is confusing the heck out of me..
Thanks a lot in advance,
Harry.
Having a second import for flash.events.MouseEvent caused a conflict which stopped mouse clicks from working (the import statement was called again on this specific frame, hence why other frames worked as expected but this one didn't).