Debugging MonoTouch in XamarinStudio stackTrace does not match break-points - ios

I am developing an app in Xamarin Studio 4.0.4 and Xamarin.iOS 6.2.4.2 (Enterprise Edition). Until yesterday, I was developing and debugging fine. Today I have weird issues when debugging. I get a break points in files that I am not loading. For instance I load a View that is Called SplashScreen, but the debugger hits a point in InformationScreen (which is not loaded). When looking at the CallStack, It says that this point is in the LoginScreen which is again different.
Also, I am listening to the GPS Events and although I can see that the GPS is on and I am changing the Location on the Simulator, the debugger does not hit any breakpoint in the LocationDelegate, is this related?
Any help would be highly appreciated. I am debugging on physical iOS device that is running iOS 6.0

Xamarin.iOS 6.2.4.2
This is getting old now, unless you have a specific requirement, I'd recommend you upgrade to the latest stable version.
Your issue sounds like the debug information files (.mdb) have turned stale somehow - in this case the fix is to Clean & Rebuild your solution.

Related

Flutter App freezes in native Splash/Loading-Screen

I and my team have a really frustrating problem for weeks now.
Problem in short
The newest version of our flutter app wrapped again by Citrix MDX is not able to continue running beyond its native implemented Splash Screen. It does not crash.
How I got there
I shipped a Flutter app as an IPA file build with Flutter 1.17.5. The file itself can be installed on any iOS device and runs fine. The IPA-file-receiver tried the same and it runs fine too.
The IPA-receiver wraps&signs the app again with his provisioning profile and certificate using Citrix MDX (Version > 20.x). Only the local MDX tool via command-line (not the online) is able to wrap the app. The log file from the MDX tool does not contain any errors.
The wrapped-app can be installed on their iOS devices and run.
Result: The native Splash-Screen is shown and that's it. The app does not continue to show the first Flutter view nor does it crash or close itself.
Unfortunately, we have no OS logs from the running app and also we don't have the wrapped-app from the MDX tool.
What makes me wonder: ...is that the wrapped app from MDX works on iOS tablets after changing its orientation this will somehow trigger Flutter to load its first view.
What we already did
try-catch'ed the main-Method and provided a Flutter-Screen with some Error-Output capability. Result: The error screen showed that some plugin we are using via pubspec was missing. However, the MDX tool logs showed that the plugin was there. Worth mentioning: The error screen did not showed up in our latest test, the app was just somehow freezing in its native Splash-Screen again.
Searching for any changes since the last release that was running fine.
Is there anyone who has some idea worth trying out or some hint where you would start searching for the problem?
Help is much appreciated and sorry for not having some re-produceable steps.

App is NOT Crashing While Debugging

I am facing a strange issue in my currently working app. App is crashing when we install app through diawi or directly install using .ipa . But I am not able to regenerate the issue through debugging. I am totally confused and how can I solve the issue?
I am using Xcode 8.2.1
You can try building the app in Xcode in the Release configuration instead of the Debug configuration.
You do this by
clicking on your app name at the top left (near where you press to run the app)
choosing 'Edit Scheme' from the drop down
clicking on the disclosure indicator by 'Run'
choosing 'Run' from the three choices which appear
there is a drop down called 'Build Configuration'. This will almost certainly be set to Debug. Set this to Release.
Now when you run your app you will be building a far more optimised version - this is the version you build when you are submitting to Apple. It's just the same app optimised for speed/memory instead of debugability.
Hopefully, you should be able to reproduce your crash in Xcode now. However, you'll notice that you get far less debugging information when you hit your crash - this is because Debug builds have lots of extra information in (and are much less optimised by the compiler) specifically to make debugging easier. Being able to reproduce the crash in Xcode should give you a few more clues as to what's going on. At the least you should be able to see the chunk of code causing you issues.
Let us know how you get on.
Use crash tracking tool to track crash here is the detail about installing crashlytics

Worked one day, errored out next on Mac: Error within debug UI #appcelerator

This could be related to the problem here, but since this is happening in my iOS build (not Android), and I have cleaned the project and restarted Appcelerator, I don't know why this would occur.
Note - I did not change my dev environment, update appcelerator, or change any certs on my MBA where I'm developing my app. The only thing that I've changed is app code. I thought that I might see bugs or errors, but I'm not trying to debut either, as I'm building and installing via iTunes sync to my ipod Touch w/9.2. The build process and settings have not changed, so I don't even know where to start.
Work around more than an answer, but for some reason, my device, registered at apple was not being recognized by appcelerator (see note in my comment for related issue). After logging into apple dev center, and going back to appcelerator, the issue appeared to go away. I don't know if this is solved, but the workaround got me in business again.

EXC_BAD_ACCESS when trying to run Unity game on iOS simulator

I'm usually not a Mac/Xcode user, please forgive me for incorrect terms or understandings.
I have a 2D Unity game which I can successfully build and run on Android and Windows Phone devices/emulators. When building for iOS, I can successfully create the Xcode project, open it and build the app in there. The only change in the iOS-specific player settings I made was to set SDK Version to Simulator SDK.
However, when trying to run it inside the simulator, the splash screen appears, then Xcode pauses on something that looks like an assemby file with an error message: Thread 1: EXC_BAD_ACCESS (code=1, address=0x4).
As I had no idea on what to do, I started stripping down my project (in Unity) until I had no more gameObjects but the camera left on the start scene. Also, I removed all other scenes from the build. The only thing that changed was that above error message now seems to appear on another assembly file.
What could be the issue here? How should I investigate further?
Update
This is the stacktrace:
Update 2
I've created a new blank Unity project, and I get the exactly same error there. The problem seems to be related to Unity or my machine, not the app itself.
Workaround
After days of researching, I still couldn't resolve the issue and finally built for a real devices instead of the simulator. Since I don't own one, I "blindly" submitted the result to the app store, and it got accepted.
For me, that's the proof that the issue is solely related to the combination of Unity and the iOS simulator, i.e. that those two don't work together reliably.
On the other hand, it seems relatively safe to assume that an app will work on iOS if it's been successfully tested on Android, Windows Phone and the default player. Of course, unless iOS-specific features are implemented.
I only know one reason, that leads to this behaviour (device builds work, but simulator builds won't).
=> This could happen, when using native iOS code / plugins
To fix that, you'll have to modify the <path-to-xcode-project>/Libraries/RegisterMonoModules.cpp file, cause somehow Unity does not register those classes/methods for the simulator.
Just look for #if !(TARGET_IPHONE_SIMULATOR) defines and shift them to have all your plugins included, also in the simulator. There will be some move mono_dl_register_symbol() that you'll need.

Unity iOS app's screen goes black on startup, but still appears to be running

I'm using Unity Pro 4.5.3f3 + iOS Pro 4.x, Xcode 5.1.1, and tested with an iPhone 4S and 5 running iOS 7.1.2.
I recently took over development of an iOS app from a departing coworker at my game studio, and I'm attempting to compile the app in Xcode on my own machine for the first time. I have followed his instructions for which extra Obj-C code to add manually. The app works perfectly in Unity. Everything builds in Xcode without errors.
When the app runs, I see the custom splash screen loading as intended, but then the screen goes completely black. The app appears to be running fine...I can hear its sounds playing and it even responds when I tap the screen in areas where I know the buttons are supposed to be. There are no errors thrown to the log. But it doesn't display any graphics at all!
I suspect the Prime[31] plugin has something to do with it, as I get a strange log output saying Prime[31] didn't recognize several other plugins. And I can't delete it to test my theory, because way too many scripts depend on it.
Does anyone know how to fix this? I have lots of tasks to do for this app and I can't let something like this slow me down.
I encountered this issue last night when trying to configure my app to be compatible with Facebook Canvas.
Below is the line of code that was breaking:
FB.Canvas.SetAspectRatio(9,16, FBScreen.CenterHorizontal(), FBScreen.CenterVertical());
To fix my issue I surrounded the line with the UNITY_WEBPLAYER preprocessor directive like so:
#if UNITY_WEBPLAYER
FB.Canvas.SetAspectRatio(9,16, FBScreen.CenterHorizontal(), FBScreen.CenterVertical());
#endif
Doing this causes that line of code to only be compiled and run in the web player, and not on the mobile device. Hope that helps!

Resources