Xamarin.iOS - Unable to archive for publishing - xamarin

I'm having to rebuild 2 client Enterprise Apps and I've been able to build a release .ipa for one of them but for the other App I'm unable to archive for publishing.
The build error is:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Tool exited with code: 1. Output: error: unable to open executable 'bin/iPhone/Release/HGIPeople.app/HGIPeople': No such file or directory
(HGIPeople.iOS)
Unfortunately we are having to use Xcode6.4 (due to compatibility issues with Good Dynamics Bindings and iOS9)
Xamarin details are;
Version: 9.4.1.25 (Enterprise Edition)
Branch: master
Build date: 2016-01-29 16:59:11-0500
So to recap I can build for one app but not the other, the problematic App runs fine in the Simulator. The folder / project structure seems the same for both Apps.
Hopefully someone out there has an idea.
Cheers
Steve
SOLVED
Thanks to everyone who posted. Unfortunately for the build I'm forced to use Xcode 6.x due to compatibility with a third party security binding and iOS9.
Anyway after recreating the project and still having the same issue, I then checked all of the references and found the problem, Google Maps. The fix was:
Removed the Nuget Google Maps package (this included Google.Maps.dll)
Referenced an older (and much larger) version of Google Maps (GoogleMaps.dll, noticed the filename difference)
Cleaned and deleted the obj/bin (which I think is always good practise to make sure you have a clean start)
I was then able to build and publish the App, phew!

You can enable Diagnostic MSBuild Output to see if it helps provide some more info concerning the error so we might be able to provide more assistance.
In Xamarin Studio, under Preferences / Build, set the Log to Diagnostic (make sure you restart XS and Clean All on your solution/project)
To enable diagnostic MSBuild output within Visual Studio:
Click Tools > Options...
In the left-hand tree view, select Projects and Solutions > Build and Run
In the right-hand panel, set the MSBuild build output verbosity dropdown to Diagnostic
Click OK
Clean and rebuild your package.
Diagnostic output is visible within the Output panel.
To enable diagnostic MSBuild output within Xamarin Studio/OS X:
Click Xamarin Studio > Preferences...
In the left-hand tree view, select Projects > Build
In the right-hand panel, set the Log verbosity drop-down to Diagnostic
Click OK
Restart Xamarin Studio
Clean and rebuild your package.
Diagnostic output is visible within the Errors Pad ( View > Pads > Errors ), by clicking the Build Output button.
Ref: https://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/

(Recap of email)
First and foremost Xamarin.iOS 9 was the point where we started to target Xcode 7. As such we'd not be able to officially provide support. There are, however, a few things you may wish to try.
As SushiHangover suggested, you may get more details information by forcing a verbose / diagnostic build output that may (or may not) assist in diagnosing the issue. You can find more information here.
Ensure you're uninstalling the app from your devices / simulators, cleaning the project, and manually deleting the /bin and /obj folders in your project.
Downgrade your Xamarin tools to the latest supported by Xamarin.iOS 8 (not recommended and also would not be supported)
Update your tools to the latest Stable releases. This would be the recommended course in order for us to properly support.

Related

Updates to code on Xamarin iOS application are not applying at runtime/debug

I have an application which I am developing. Everything has been going smoothly, but suddenly my code no longer applies when I deploy. If I make a change and deploy the app to my iPhone, the app launches but my changes do not appear.
Furthermore, my breakpoints hollow, which I believe means that the code that is running differs from the code in Visual Studio.
I am running Visual Studio 2022 on Mac, deploying to my iphone hardware.
I have tried:
Normal build and run
Build -> Rebuild Solution
How can I solve this problem?
I was able to solve the problem with the following steps:
Open the location of my iOS project (note that I also have Android projects and other libraries, but I only did this for the iOS location)
Delete the bin and obj folders
Build project, observe there are now errors due to references missing to classes which should come from nuget packages
Right-click on the Packages folder in the solution explorer and select Restore
Build and deploy the project
I'm not sure why my project got in this state, but this seems to solve it when it does happen.

Switching From VS Mac To VS Windows got "java.exe" exited with code 2

Hello Guys
I got an issue when switching my Xamarin.Forms project from VSMac to VsWindows!
"java.exe" exited with code 2 when deploying.
I already try:
delete bin/ obj/ folders
remove all packages and re-add them
MultiDex
Verify the path (removing special char "!##$%ˆ&*(-_" etc..)
If you got an idea, tell me ;)
Regards,
If G Clovs solution doesn't work, then:
make sure the netstandard on your mac is exactly the same on your Windows pc.
Make sure you have the same Android SDK downloaded on your Windows - through Tools Menu > SDK manager.
If you are using stable channel for vs for mac updates, then make sure you are not suing the preview of budget packages on your Windows.
Apply the same logic in 3 for preview channel.
To avoid all these issues:
Simply go to vs for mac 2019, change to stable build and update the vs for mac to latest.
Update all android SDK and build tools to say v28
Update all nugget packages for the two projects and build successfully.
Go to vs 2019 and update vs to latest.
Repeat step 2 for vs.
Deselect preview in nugget package manager, and update nugget packages in the two projects.
Build successful.
Try the below steps, it was working for me.
Open Visual Studio in Windows
Open your Solution
Find for "Resource.designer.cs" file in Android Project and delete it
Remove obj and debug folders form PCL and Android project
Clean and Rebuild
Happy Coding :)
Kishore Kumar
With turning third page of google, I didn't find any answer.
But I found the answer by my own.
The issue was comming from the Android.csproj and the Keystore Path.
It was set to my Mac Path even if I had already changed it on
VSWindows AndroidProject => Properties => Signin
So I removed this lines on Android.csproj (edited with third text editor):
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>YourMacPath/Alias.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>Password</AndroidSigningStorePass>
<AndroidSigningKeyAlias>Alias</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>AliasPassword</AndroidSigningKeyPass>
On debug & release Part.
Then you can edit them on VS Windows.
Hope I helped someone.
See ya

ipa file is generated in the release mode but not in ad-hoc mode

I am trying to generate my ipa via Mac agent in Visual Studio. When I choose the release mode, it is ok and the Visual Studio shows me this message:
The ipa file should be visibile on the build server.
But when I try it in ad-hoc mode, it just tells me this error:
ipa file was not generated. please check the project configuration
I tried the different solutions, for example, I change some configurations in info.plist. But the error is still there. Do you have any suggestion?
Ensure that you have enabled the build in the project configuration.
open project properties
select iOS IPA Options
change configuration to Ad-Hoc
change platform to iPhone
enable Build ad-hoc/enterprise package (IPA)
After investigating the problem for some hours I found - in my case - there were some problem with my Apple developer account handling in Visual Studio and that's why VS could not find any certificates to sign / generate ipa.
So, pls check your Apple developer account settings in VS options (Tools/Options/Xamarin/Apple accounts) After reentering my credentials IPA is generated in my case.

Visual studio reinstalls apps when re-running with no changes

I’m having a problem when debugging my Android app. When I start debugging, then stop, then start debugging again, it will always re-install the app on the phone even though there hasn’t been any changes done. This can start being a pain since our app is large and each build takes over a minute to complete. As far as I can tell, I’ve set everything correctly, including having Fast Deployment turned on and having the linker disabled to speed up the build process but it still rebuilds, uninstalls and reinstalls the app, taking up a lot of time. One thing to note is that we don't see this behavior in Xamarin Studio on the mac, it’s only within Visual Studio.
I’m running visual studio 2015 14.0.25123 update2 with
Xamarin Android 6.0.3.5 (a94a03b).
Please help me resolve this issue.
Thank you.
Based on the information you've provided, it seems like you're hitting a recent issue we've seen with NuGet packages and dating. The new NuGet client for Visual Studio will now honour the dates found inside of the .nupkg, instead of using the current date when writing files to disk.
What this means is that packages with odd dates in their files, like the popular ModernHttpClient library (which dates its files using 2046) will end up written in disk with those dates. As a result of this, msbuild will detect this future date upon build and assume your app is not up to date and will then fire a complete rebuild, essentially breaking incremental build support.
You can check that this is the case by turning on msbuild diagnostic output. The very first line in the build output pad should read something like:
1>Project 'App3' is not up to date. Input file 'c:\temp\app3\packages\modernhttpclient.2.4.2\lib\monoandroid\okhttp.dll' is modified after output file 'C:\temp\App3\App3\bin\Debug\App3.pdb'.
To fix it, you can touch the date of the offending .dll to the current date or download the NuGet packlage from the NuGet website, then extract using Windows built-in .zip support (you must use the Windows built-in support other utilities may keep the bogus dates).
The following VS extension was also created to automatically touch the dates of offending packages and is definitely the easiest way to get things sorted:
https://visualstudiogallery.msdn.microsoft.com/0ffd5d55-6d03-4be1-95b5-a94c89af86ba
Do note that this issue does not manifest if you're using Xamarin Studio.

prob with My mac 64 bit while running my xcode project .. it was done in xcode 3 i cant run it in 4

the scheme 'Dominos' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.Whats wrong with this how do i change to others please please help
There are two ways to fix this. First, select your project from the project navigator on the left side of the project window. Doing this opens the project editor. Click the Validate Settings button at the bottom of the project editor. Validating settings will update your project so it builds on Xcode 4.
Second, change the Base SDK build setting. The following article explains how to access build settings in Xcode 4:
Xcode 4: Accessing Build Settings

Resources