Deploying universal application results in "package could not be registered" - windows-phone-8-emulator

We recently upgraded to the new Visual Studio and subsequently Windows Phone 8.1 preview. However when trying to deploy to the device or Windows Phone emulators(any of them), we get this error(0x80073CF6).
My phone is already developer unlocked. We have been successful in deploying it and running the application once, but now for some undetermined reason, it has stopped allowing us to do this.
I am willing to provide any more information if I can.

May be you are missing icon image in your manifest file. Please look at this.

There's also a possibility that the GUIDs listed in your Package.appxmanifest file don't match the ones in WMAppManifest.xml.
I had to do some changes to the first one before publishing a beta version of my app to the store and didn't update the second. Specifically
PhonePublisherId should match PublisherID
PhoneProductId should match ProductID

It seems if you remove anything from assets folder this error occurs.
In my case I had removed splash screen image from assets folder
after commenting splash screen line in manifest everything is OK.

You might have checked "Shared User Certificates" in your manifest, remove it and it works.

Check this answer as well. This solved my problem!
Deploy error: Package could not be registered

In my case, I needed to reset my phone for it to work.
The Deployment did always work on the emulators, but not on my phone. I've had my Application already installed from the store, as I've started to Deploy. My guess is, that the version from the store somehow did not uninstall correctly.
(I'm posting this here, because it is the first result on google)

For future reference:
I have encountered this error a few times and it was a combination of missing icons (which you can figure out somehow), but also:
the pipe-character "|" in the app name.
It is completely legal reserve the name, and your manifest won't complain about it, but I have seen that removing this will help in solving this issue.

You can remove the reference in the package.appxmanifest as well and the app will still deploy, as in:
It will work I got it.

In my case it was incorrect XML file with duplicated header:
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<WindowsPhoneReservedAppInfo ... />

Related

Still getting ITMS-90809: Deprecated API Usage after using --optimize=force-rejected-types-removal

This has been killing me for the last couple of days. I have read everything I can find on this error and have done what xamarin says but it still doesn't work.
I can't get my builds to get through azure pipeline xamarin.ios build and deploy to apple.
When I build locally I get messages like
MTOUCH : warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' before linking
with a companion message that says no references after linking
when I use --warn-on-type-ref=UIKit.UIWebView with the optimize arg.
When I build on azure in my pipeline, I only see the MT1502 but nothing saying anything after linking. The build gets submitted to Apple and fails because of the ITMS message.
I don't know what to do. I am using the latest macOS vm image, mono 6.8.0.123, xamarin.ios 13.16.0.13, xcode 11.4.1. The pipeline worked fine before April 30 deadline, now no matter what, I can't get the linker to strip UIWebView.
Let me know what other info would be helpful. I am completely stuck at this point.
Thanks.
I just got my build to pass Apple's inspection.
What ended up working for me was building locally and packaging the ipa file. On my mac I then changed the ipa extension to zip and unzipped it. I used terminal to go to the YOURAPPNAME.app "folder" and used grep -r UIWebView . to search for references. Don't forget the . so it searches the current directory. I missed that at first and got some message that grep was listening on stdin.
For me that resulted in a line like this:
Binary file ./Frameworks/PersonalizedAdConsent.framework/PersonalizedAdConsent matches
Now, the important thing to note is the linker never warned about this, so I was completely unaware of it. In my case it was part of Firebase/Admob. I was only one release behind and updating to the latest fixed my problem.
I still am using --optimize=force-rejected-types-removal --warn-on-type-ref=UIKit.UIWebView -warnaserror:1503 as my mtouch args. But builds now get through.
I hope this helps point you guys in the right direction, I've spent the last 3 days just trying to get builds to upload reading every post I could find on the web on this problem.
Solved !! I had to update the way how nugets are included to the iOS project .csproj file. The problem was that linker despite the --optimize=force-rejected-types-removal flag was not removing the UIWebView component form Xamarin.Forms 4.6 probably because it did not see it.
My project was created over two years ago and I was still using the packages.config file. After the update the flag started to work and grep query returned 0 :). The best way is to compare the old .csproj file with freshly created iOS project .csproj file and see how VS is referencing nugets.

How to solve this error? - 'Resource.Layout' does not contain a definition for axml file

Am new to Xamarin and is currently building a very simple app using the tutorial from Youtube. Am just in a middle of the video when I got this error even tho I carefully followed all instructions. And even the instructor in the video was able to run his app successfully
Here's the code where I'm getting the error:
var view = inflater.Inflate(Resource.Layout.SignUp, container, false);
For me it is caused by namespace changes. After I corrected the namespace in project properties, then I can build again
I just deleted my newly created axml file, rebuild, add it again, and this time, clean and rebuild.
Everytime I added a new axml file, I clean and rebuild. That's all, thank you :).
Actually this problem occurs when your ResourceDesigner.cs file has not yet mapped the file that you added to your resource directory.
The easiest way i would suggest to handle this situation is you comment the code you are trying to write and clean build your project and it will work like a charm.
Good luck!
In my Resource.Layout.toolbar, Resource was ambiguous between Android.Resource and Xamarin.Forms.Platform.Android.Resource. Instead the one that works for me is [Project name].Droid.Resource. Clean, deleted bin/debug and now it's fine
Resource.designer.cs was excluded from project. Solved by including back.
In Xamarin.Android this problem can be resolved by saving other axml/xml file. Many times cleaning solution, deleting bins/obj doesn't working for me.
In my case my Main file was configured in the Build Action as AndroidResourceAnalysisConfig and then change property to AndroidResource then Build my project and it works.
I had a lot of "XXX" does not contain "XXX" errors like this after a git reverse operation. Very annoying.
I tried all the solutions I could find, all without luck. Finally I magically fixed it by going to the Android project properties, Android Options, then unchecked "Use Fast Deployment (debug mode only)". I then built the project and it worked. Then I went back and checked that option so it was back to normal, and everything is fine.

Visual Studio Apache Cordova - IOS build rotation issue

I'm a starter in writing app code in Visual Studio 2013 Community Apache Cordova and have managed to connect VS2013 with my Mac. Once I have gone through the process of building the app in VS and on my Mac and installing in on my iPhone, I open it up and it won't rotate. It doesn't rotate for a number of basic apps that I've written nor does it rotate if I build the default new project "Hello, your application is ready!" app.
I have done some research and tried changing the config.xml "Orientation" preference to "both", through the code window and also in the designer window but that doesn't change anything. I've also noticed that adding in a "BackgroundColor" preference doesn't work either.
Does anyone know if I may have configured something incorrectly or perhaps need to add something to my code?
All the HTML, JS and CSS that I've written seems to work okay (with the exception of trying to link URLs to the Safari Browser but that's another issue).
I have noticed the same issues. I tried finding some settings to fix that in the config.xml, but was not successful. I have resolved myself to just opening the iOS project in XCode and changing a few things:
Device Orientation: no matter the config.xml setting, its always only Portrait. I click-check the other 3 orientations.
Team: I have multiple developer profiles, and I need to choose correct one here.
Bundle Identifier. I screwed up one project, and have different case for iOS and Android. I leave the VS one as the Android one, so I can build completely correct for Android. Since I know I have to go to XCode for iOS anyway, I change the bundle identifier here.
You can find the project using Finder at ~/remote-builds/builds/9999/cordovaApp/platforms/ios/*.xcodeproj, where 9999 is the build number, though not necessarily the latest, largest number, but the latest datetime of the folder.
You can also refer to Greg's answer in this related post as an alternative solution.

iOS8 simulators error

Try to start my project on one iOS8 simulator and Xcode shows error:
An error was encountered while running (Domain = NSMachErrorDomain, Code = 5)
No one of iOS8 simulator can't be started. What to do?
"iOS Simulator" -> "Reset Content And Settings..."
^ this helps.
I ran into the same error just this morning, and I haven't completely figured it out, but I have observed something which might help you (or both of us, if anyone else stumbles across this and has more information). I was building a project which contained:
the app itself
a Today extension (widget)
a Framework to share code between the app and the widget
The widget comes with TodayViewController.h/m, and I wanted to share this view controller with the app. So I changed the target membership of TodayViewController.m to my framework rather than the widget. (Did this in the Target Membership in the right sidebar.) I also set the TodayViewController.h to be part of the framework as a public header. When I did this, and then did a clean, I got this error when trying to run the app in the simulator, and also an "unknown error (null)" when trying to run on device. If I set TodayViewController.m's target membership to both the framework and the widget, I'm able to run the app in the simulator just fine.
Now, I don't know why this would be the case. I've declared my widget to depend on the framework, so it seems like it should work without my setting the target membership of TodayViewController.m to both widget and framework. If anyone else knows why this is the case, I'm all ears. But this is what I've found so far.
I had the same problem tonight too. I was not able to get my app to run if my resource directory was a "folder reference" (aka blue folder). Once I re-added my resource directory as a "folder group" (normal folder) instead my app ran fine. Not sure if this is the case for you, but it solved my problem. GL.
I ran into the same problem today using DP3.
When I tried to delete the Derived Data folder from Organizer, it showed me some kind of permission error. I then manually deleted the folder from Finder, rebuilt, and voila! It worked!
If you ever get and error like this, where xcode doesn't say much, just a error code, try first to check the actual problem on the system console.
Applications -> Utilities -> Console
On my case I was able to see that xcode was trying to copy the widget's binary and it was not able to find it. I was able to find out that without at least one compiled file on the extension's target, xcode is not going to create the binary for the extension.

Xcode 4 stuck on "Scanning for working copies"

I just archived and submitted a project. When I go back to open the project it hangs on "scanning for working copies." I can navigate around but am unable to view the project files.
It is really just a linking problem.
Select your project and make sure you have 'Identity and Type' open. This is in the right side Editor bar(toggle open and closed with 'View' button).
You can change your Location and Full Path there. You just need to check that your project is linked to the correct directories.
Hope this helps anyone.
Copy and delete the whole file and paste it in some other directory (or I guess you can put in same directory). Now open it again. I also had same problem. Actually my project was in SVN, so I deleted the directory and again checked out the entire file and opened it again. Now at least that error message is gone.
I am also new to xcode(4.3) .. sorry if my english is not good ...
Open up a more trusted Source Control App, like SourceTree, and refresh all of your working copies, then Xcode, will behave.
The problem seems to result from incorrect linking or damage to the version control repository. Other answers suggested deleting the repository or removing it from xcode under the Window -> Organise menu. I suggest you try these options and the suggestions in the other answers. However none of these worked for me and my xcode was still displaying the "scanning for working copies" message and intermittently locking up.
Deleting xcode from the Applications folder and reinstalling it from the app store then importing my project fixed the issue for me. I also suggest you dont use version control for your project unless you really need it.

Resources