Console Logging gone in TitaniumStudio - debugging

***Project Specs:***
iOS 4.3
Ti SDK 1.6.2
Titanium Studio
I've recently switched to Titanium Studio from Titanium Developer and after importing my project any references to Ti.API.info('some message') are completely ignored.
I searched the Appcelerator Q/A forums but all I found were people having the problem but no solution or reason.

did you check your run configurations
to make sure logging is turned on?
also i am pretty certain you have to
be using at least 1.7.x to use
TiStudio, i might be wrong about that
though

TiStudio has multiples consoles running at the same time. To access them you need to be using Debug mode with 1.7.* or you can just click the small console icon multiple times to shuffle through each Kroll function console running.
In the picture in this guide it's the fourth button from the right. The blue one.

Related

Xcode Debugger Doesn't Begin Session When App Runs

I'm using version 12.4 of Xcode, and when I run my app to test it, the debugger never starts a session. When I open the Debug Navigator, the message "No Debug Session" stays, and none of the normal analytics data appears.
I am running my app through Xcode onto my iPhone 12 Pro. It requires the use of the camera, and in fact the part I need the debugger for also requires the camera, so I can't use a simulator to see if that magically fixes it.
I also looked through every setting I could find that mentioned "Debug" or "Debugger", but nothing I could find changed anything.
Also, I downloaded a random tutorial app and ran that through Xcode on my iPhone, and the debugger boots up as expected.
I am completely lost and really need a GDB/LLDB tool to debug my code, so any help is greatly appreciated, as I could not find a single person or post with a similar problem to mine, and all of the Debugger tutorials and Apple Documentation are outdated and useless.
EDIT: Here is the Scheme info I have set, I have nothing in the Arguments tab. (This is a new account so I'm not allowed to embed images RIP)
Scheme Info
Scheme Options
Scheme Diagnostics
As Matt pointed out, the debugger will not point at the app target if the Executable dropdown (in Scheme Info) is "Ask On Launch". It must have the app itself selected.

Could not determine the installation package com.company.appName

I can't launch my app anymore on Android. The iOS counterpart seems to be fine.
The full error is:
ADB0000: Could not determin the installation path for package.com.company.appname.
'adb shell pm path com.company.appname' returned.
It was working. I pulled some changes from the repo, none of which should have affected any app properties. Actually it was initially launching, but I was getting some odd behavior within the app, so I uninstalled the whole thing off of my phone. Now I cannot launch it at all. What I could find about this error was that my AndroidManifest.xml might have a typo, but I couldn't find anything that stuck out. And like I said, there shouldn't have been any changes in there recently. Any help would be greatly appreciated.
Steps I have already taken:
1. Clean and rebuild
2. restart VS
3. delete obj and bin folders
4. search for solution on here and xamarin forums
UPDATE:
I just successfully launched it on another android device. So it seems to be a problem with my Pixel 2 XL. How do I make sure all traces of the app are gone so I can start fresh?
This usually happens when you have more than one user in an Android device (I still cannot figure out why is this).
As mentioned in the comment by using the adb uninstall full.package.name command it will uninstall the app.
But there's another way which does not require command line or nothing related to that.
If you go to the Settings -> Apps and Notifications on the Android device you will be able to uninstall it from there.
Let's use the UnoQuickStart.Droid app as example here. As you can see it's already in the same state as it was yours.
Once in the App details both Uninstall and Force Stop are disabled. But do you see those 3 dots image at the right upper corner? Click on it.
This will bring you a context menu with a single option "Uninstall for all users". You can click on it with confidence.
As expected, a warning message telling you what's gonna happen. Just click "Ok".
As you can see the App is not longer installed and you will now be able to install it again.
Hope this helps.-
As per apineda's instructions, using adb unistall com.company.appname fixed the problem. I was able to get to the ADB location by navigating through Visual Studio -> Tools -> Android -> Android ADB Command Prompt.
Before I did that, I looked at the App list for my phone, which listed the app, but apparently not installed for this user. The Uninstall and Force Stop buttons were disabled and several of the fields just said loading... or something like that.

Apple News Preview - Simulator stopped working

I am currently testing the Apple News JSON format using XCode / News Preview / Simulator and randomly running into a new error that was not occurring prior to today.
I am attempting to load the article.json file into the News Preview app (it's been working up until today). The article.json file gets successfully loaded with no errors in the console but the Simulator is claiming that the channel is not available for me. Here is what the error message on the Simulator reads:
Channel Unavailable
This channel isn't currently available in your region.
The News Preview and Simulator were working just fine until today. I have tried re-installing XCode and News Preview (and Simulator because I re-installed XCode) but the problem persists. Other colleagues of mine are now experiencing the same problem.
I tried also clearing all the content in the Simulator and tried wiping the device clean and also tried going to the "Debug" menu in Simulator and setting the Location specifically there, as well, without any success.
Is there a way to fix this or is there a way to know if there was a recent developer push to the Simulator code base?
Just to add a bit more detail, I am attempting to load the official Apple News article preview files, not my own article.json files (I tried loading my own json files, as well).
Any help is appreciated.
Hey I also just had this issue and have been troubleshooting since yesterday. Not sure what is causing it, but it only happens for my on devices simulators from iPhone 7 and newer.
Try running the preview on iPhone 6 or an older-gen iPad, etc... that's working for me.
The solution on only one of my machines was to enter the Publisher ID into the News Preview application, which is the first thing that is asked when launching the News Preview app. After entering the Publisher ID, everything seemed to return to normal - for all of my colleagues and I.
See my comment above about my new macbook and the new problem it is having.

Xamarin.Android immediately terminates

Can someone please explain what's going on with my newly created Xamarin Xaml Portable project? When in "Debug" the application terminates immediately as soon as I lunch it -- like the gif above.
When in Release, it runs -- like the gif below
I like to understand what's going on between Debug and in Release why when in Debug, it terminates immediately but not in Release.
My phone model is Oppo A37F - Android 5.1
Another confusion is that, I have a Samsung Galaxy S DUOS 2, that is flashed with a custom fimrware - Android 6 (Marshmallow) - I am not facing the Debug/Release issue with this one.
Turning off/on my PC and Android devices does not help as well.
Thank you
and so I got it to work. Thanks #Smit for the direction
I have to set "Sdk Assemblies Only" in Debug.. The default setting is set to "None"
Clean your solution then uninstall the application on your device or emulator
and deploy your solution, that solved my problem.

Xamarin.Forms application properties not saved between sessions with Android

In my cross-platform app I save application properties in the following way:
Application.Current.Properties["myValue"] = "Test";
await Application.Current.SavePropertiesAsync();
I then retrieve them later like this:
string myVal = Application.Current.Properties["myValue"];
This works perfectly when using the Android emulator. I can close the emulator down, and when I restart it again, my app data is preserved.
However, when I deploy this app to a physical Android device, data preservation works as expected until I close the app and open it again. At this point I retrieve an empty value. It's as though the data is only saved to memory (and not to file).
Furthermore, the iOS version of the exact same app works faultlessly. When I open the app up, all previous values have been saved and I can retrieve them.
What am I doing wrong on the Android version? Is there an Android setting, permission, or option which I need to enable to have the values saved between app sessions when actually deployed to a phone?
I had a similar problem where only the debug version saved Properties. I think we're still waiting for the bug fix, and this is the workaround on Xamarin Forms bugzilla.
In short: go to .Droid project settings -> Android Options -> Linker
and enter/add "System.Runtime.Serialization" to Skip linking assemblies.
Wow! After lots of research, I have getting solution for same issue in mine. Problem is that, when i store List or DataTable in Application.Current.Properties then all properties are removed after reopen app but if i store List or DataTable as serialize, it working fine.
In VS you need to enable the option:
Preserve application data/cache on device between deploys
You can find this at Tools > Options > Xamarin > Android Settings.
I don't know if this has stopped in the latest updates of Xamarin Forms, the data is available until the application is running similar to session but persistent storage does not work.
The best api I think available for this is Akavache https://github.com/akavache/Akavache.
You can read this blog https://codemilltech.com/akavache-is-aka-awesome/.
Update
There is a bug filed in bugzilla:
https://bugzilla.xamarin.com/show_bug.cgi?id=26444
I don't remember exactly which part of this solved the issue, but when I followed the instructions to prepare the Android application for release from start to finish, the issue went away. The problem occurred when debug builds were used on an Android device.
https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_1_-_preparing_an_application_for_release/
The link details the suggested settings for the Android project when releasing to device. Following these instructions should solve the issue.

Resources