Xcode product in red when in release mode - xcode

I want to distribute my app, i put code signing and everything and my last step was to set the build to release. I went to edit scheme and put build configuration to release and then my product turned red for some reason. I couldnt open it in finder therefore i cant send it. If I change it back to build mode it isnt red and I can open it in finder. What do I do?
I have tried heaps of things but cannot get it to work!
Please help,
thank you

You simply need to need to build you product on release mode. Change the build configuration as you made and build, exactly the same way you did in debug mode.
In Xcode 4 and older 3.x version, however, you probably shouldn't build directly in release mode but use the archive feature.

Related

Archiving automatically says it is complete even though it did not create an archive (Maui in VS22)

Trying to create an archive to make a release apk of my app, and whenever I click archive all, it instantly says the archive is completed, nothing shows in the archive manager, and there are no errors or absolutely anything for that matter shown for output.
I suspect it may have something to do with the versions as I was able to archive previously, but once I changed versions, I believe that is when the issue started. Also, the app builds and runs with no issue.
I think the tooling for publishing and archiving is still work in progress. I'm not 100% up to date with the status though. However, if you run into these things please report it through the Visual Studio Help menu and choose Provide Feedback > Report a Problem.
That will make sure it goes to the right team with all the right information attached.
As a solution for you right now, the command-line does work. Everything needed to create a version is described in the docs: https://learn.microsoft.com/dotnet/maui/android/deployment/overview
I have come across the same issue I think I may have identified the what may be causing the problem:
I did the following:
Created a new .NET MAUI App with .NET 7.0 (Standard Term Support). Without
changing anything - I selected Archive All - this worked fine.
Changed the following project property:
Changed from:

How do I stop Xcode 9 from continuously building or at least make it not run build scripts?

After migrating to Xcode 9, I noticed that it constantly fully builds my project. I found that it is somehow related to the "show live issues" setting. Disabling that setting stops builds, but it makes development inconvenient.
I would like to disable this continuous build loop, or make it work without launching all build scripts.
My custom build scripts contain linting and formatting, so what happens is, I try to edit a file, but Xcode starts building, thus launching the formatting routine that changes exactly the same file I am trying to edit.
Open any .storyboard file in your project and go to the Editor menu, uncheck 'Automatically Refresh Views'.
After upgrading the Xcode version to Xcode 9.0, I also faced a similar issue and my CPU usage was jumping upto 50% just because of Xcode. However I could solve it by following the steps below.
In the Toolbar go to:
File -> Project Settings / Workspace settings change Build System to Standard Build Settings under Shared Workspace Settings. Also under Per-User workspace Setting change Build System to Standard Build System.
The release notes also say the following.
"Xcode 9 includes a new build system written from scratch in Swift. It
is designed for higher reliability, and it catches project
configuration problems that the standard build system does not. The
performance of the build system (not including compilers, linkers, and
other build tools) has been dramatically improved."
So there could be a possibility that there are still bugs in the new build system.

UWP Apps and the start menu

I've googled pretty much but i can't seem to find any information on this..
I've cloned a project from github, it opens and builds no problem. it's also added to my start menu.
I can run the program from my start menu as if it was a "normal" program.
Now I have made some changes to the sources and built it, and the changes seem to be present in the installed version (which I start from start menu) just by themselves.
my question is: is that really the case? do UWP apps get installed and updated automatically? is there a way to NOT update my installed version with my release-build every time? it seems wrong, did I miss something? (did I maybe "install" the changes somewhere along the way without noticing/by double-clicking the executable etc.) and: can I replace the executable that is started in the start menu? I tried to find where it is stored/linked, but I couldn't find anything, as there is zero information in the start menu.
Or can I rely on the start menu version always being my latest release build?
I'm confused, if someone has any information on this, I'd be really happy. :)
You are correct whenever you build and run the app on the local machine using Visual Studio it gets deployed to the system apps from where you can run it. So each time you build and run with any changes they will be updated in the system installed app as well(Basically they are same)
If you want that these changes do not get reflected in the system's app then I think you can use Device emulators available in the Visual Studio.

Visual Studio 2008 to start in Release (not Debug) mode?

The developers in the team often forget to switch to Release mode, so we often end up building in the wrong mode (Debug) -- taking a long time.
Really need to set the default build to Release.
After some simple testing, I believe VS2008 follows this rule:
if a solution was in Release mode when the developer last closed it,
then the next reopen would be in Release.
if a solution was in Debug
mode when the developer last closed it, then the next reopen would be
in Debug.
The last-used mode seems to be saved in the local *.suo file, and unrelated to the *.suo file on another developer's code directory.
If that's the case, is there something we can do in the code repository to set the solution to "always start in Release, unconditionally"? Perhaps check in the binary *.suo file but not a best practice.
under solution select properties and go to configuration and change it from debug to release:
If you need to create a Release build to move to production, the ideal solution is to set up a build server to handle it. But either from a dev box or a server, you can create a batch file to compile a Release version of your code. This way you always get the correct build, regardless of what an individual developer has set on their box.

Some generic and working Xcode project settings which lead to successful Mac App store submission?

I built a simple app that I'd like to submit to the Apple store, but I am not sure whether my project Release settings are set correctly. I adjust a few things, based on what I could find online, but I might've created more problems than I solved.
I would very much appreciate if somebody could provide a copy of working Release settings which would sure work for my project. I don't store/read any files, the application just runs a few commands. Basically, I just need it to run and install in that /Applications folder so the user could trigger a launch.
Basically use default settings, move your source code to a new project, read up the guidelines and see if anything is told to change, otherwise it's just fine. Cheers.

Resources