I'm developing my first Windows Phone 8 app and notice that occasionally when Visual Studio 2012 pushes a new debug version of my app to a physical device that user files in IsolatedStorage are being lost.
This doesn't happen all the time.
I've only noticed it happens when I've not done any development for a few days, make some changes, then debug against the physical phone.
Any idea why my user generated files may be getting lost?
I haven't noticed a pattern yet.
I've tried doing tests where I change version numbers in AssemblyInfo.cs and WMAppManifest.xml, but this doesn't seem to trigger the issue.
I'm a little concerned that when I release the app and provide upgrades then live users may end up losing their data.
Any advice would be greatly appreciated.
When you do a rebuild in Visual Studio then start debugging, your app will be uninstalled (which will remove all files in iso store) then reinstalled.
You don't need to worry when you publish your app to the store. If you deploy an update through the store, your app will be updated (instead of uninstalled then reinstalled) and all files should stay intact.
Related
I'm building a Xamarin app, and, so far, I've been able to build without issue on the iPhone Simulator, but I haven't been able to get the app to launch successfully on a physical iPhone device. In the past (about a month ago), the app was working fine on the same device. Here's some background on the specifics:
I develop my Xamarin code on my Windows machine, which is linked a remote Mac (hosted by MacStadium, a third-party hosting service).
My test phone is an iPhone 5c running iOS 10.3.3
To deploy to my iPhone, I build my app in Release mode in Visual Studio, upload the code to a third-party app installation service, Installr, which hosts the IPA file and assists with the installation of my app on the physical device. I've never had an issue with Installr and have no reason to believe that this is the source of my problem.
Since the last time the app worked on the physical device, I updated Visual Studio to version 16.3.2 and updated Xamarin. Here's the Xamarin Specs:
Generally, what happens, is that I download and install my app on the iPhone without any issue. However, when I click on the app, the splash screen loads for about 5 seconds, a white screen briefly appears as follow, then the app crashes.
I've seen several related articles on StackOverflow and other sources on the internet, but none of the proposed solutions see to work for me. For example, I've tried adding [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
to App.xaml.cs with no luck.
I've also played around with changing the CSProj file settings to compile for various combinations of ARM64 and ARMv7. Changing this didn't help either. I've tried changing the linker behavior to "Don't Link" from "Link Framework SDKs Only", and I get an error message stating that the native code is too large for 32-bit architectures. I would compile for only 64-architectures to get around this error, but I believe that the iPhone 5c uses a 32-bit architecture.
Here's what my iOS Project's CSProj file looks like currently. I've tried checking just about all of those checkboxes with no luck:
I'm stumped as to what this could be. Any suggestions would be greatly appreciated. To further complicate things, I haven't been able to get a good log file from the iPhone. Since the Mac is remotely hosted, I can't plug my phone into XCode to pull the logs that way. Does anyone have a reliable solution to get log files another way?
It looks like upgrading solved the problem. Visual Studio was updated to Visual Studio to 16.3.5 from 16.3.2. XCode on my Mac was updated to Version 11.1. After these updates, Visual Studio performed an update while connecting to the Mac remotely.
Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.
The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.
Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.
A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.
I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.
When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.
I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.
What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.
I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.
Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484
two days ago my laptop fall off from table. I've window 7 installed. My windows is not starting in standard mode I can only get access via safe mode. I was doing a c# project in Microsoft visual 2012 and it was almost completed My problem is that I cannot see project files using safe mode. Is there anyway to access the source code or project so that I can send it to other laptop?
I want to copy my code so that I can complete my project in other system?
First, right click on the folder that you want to get files from. Go to security tab, and make sure the admin account you are using has full rights to the folder. They may be not appearing because there is some weird permission things happening.
You may be able to connect to a USB or External HD while in Safe Mode, and then just copy of the files over and put them on another computer with VS 2012. If not, try Safe Mode with Networking and then try to upload to Dropbox/Onedrive.
In desperate times, you can always buy a HD mount device, pull out the HD from the computer, mount with HD mounter on another computer, and copy files over.
I am currently two days into this bug and can't seem to find the cause. I relatively recently installed VS2013 Update 2 RC and started building the Windows Phone 8.1 version of my WinRT app. I have been slowly moving files (mostly Converters/basic resources and pages) over to the Shared project and haven't had too many issues with it.
The Windows Phone 8.1 app builds and runs (though, with some issues that I still need to iron out). My WinRT app, which I haven't changed at all (except for some of its dependencies) aside from moving some things to the Shared project, will not start at all. It throws up "The app didn't start".
So far I've tried slowly moving files back out of the shared project and into the main WinRT project, but still to no avail. My hard drive is not encrypted with TrueCrypt.
One other thing to note is that in the same moves toward Windows Phone 8.1, I also changed my Portable Class Library to target both WP8.1 and Xamarin (iOS and Android).
I haven't been able to get any debug results because any time I start it debugging, it fails with "The app didn't start" error. No exceptions are thrown in the output, even when running the Native/Mixed debuggers. Also, no breakpoints get triggered, even in the App constructor.
I have read that this could be caused by permissions issues. I have checked and double checked all permissions in the prescribed places and registry entries and found no deviations.
One other thing I should note is that this seems to only happen with my application. All other apps seem to run fine.
I figured it out! Based on what I read here, the issue was with a file app.config in my project.
From what I've been able to see, app.config seems to be entirely superfluous. I believe it to be a relic from original Windows 8 applications. I haven't had any issue with it up until now, when it seems Nuget changed the contents of it to reflect some updated app packages.
Excluding this file from the project solved the issue.
I want to test my windows 8 metro application on others PC such as my MS Surface or my friend's PC. but when I run it, I get following error:
This application can only run in the context of an AppContainer.
i searched a lot and found this but this topic for 2011 and VS 2011, so the solution does not work anymore.
please advice me.
The solution from the referenced thread should still work, especially point 2.
Right-clicking the project and choosing "Store"->"Create App Package..." (deselect uploading to the store) will create a folder with a package for your app and the dependencies.
In the same folder there is a PowerShell script. When run, it will probably ask you to change your ExecutionPolicy the first time, but then it will install the app just like a regular app that was installed from the store.