Publish my project from Android Studio to App Store - Section Build - xcode

I use Android Studio on my MacOS M1.
My project is finished and everything works, either with Android simulators or iOS simulators via Xcode.
I would now like to publish my project on App Store.
I already have my subscription on App Store Connect, and I have already prepared my program submission with screenshots, title and description.
What I don't understand is how to upload my build to the App Store? How do I create my Build?
Do I have to import my project to XCode? If yes, how ?
I saw that in the Build section, there are 3 tools, the first one is called “Upload your app binary with Xcode”, how to go about it?
I'm lost, please help me.
CB

Related

Getting 'Selected scheme "iosApp" does not support "iphonesimulator"' error for Kotlin Multiplatform

I am trying to run the initial example apps generated by the Kotlin Multi Platform Mobile plugin in Android Studio. I followed these steps for my environment setup. The Android Simulator runs correctly, but the iPhone Simulator does not. The Run Configuration has the following error:
Error: Selected scheme "iosApp" does not support "iphonesimulator"
When I run the configuration (ignoring the error), the iPhone simulator does open and appears to load iOS, but it never loads the "Hello, iOS" application that is in Android Studio.
What would cause this?
Version Information:
macOS 12.2.1
Android Studio 2021.1.1 Patch 2
Xcode 13.3
I fixed it with the following method.
Please close the Android Studio.
Go to ~/Library/LaunchAgents/ folder and delete com.jetbrains.AppCode.BridgeService.plist there.
Launch Android Studio with the KMM plugin again. It should work now.
From my tests, it seems that there may be multiple reasons for which we receive this error:
the root folder of the ios project has a different name than the .xcodeproject file. Sometimes it works even if they are different and maybe it matters if we change this name after the frameworks was already connected to the iOS project.
"Other linker flags" were manually copied and they were not copied using the copy button from the Connect the framework to your iOS project. This results to wrong data like:
"$(inherited)",
"-framework",
"shared\n",
instead of
"$(inherited)",
"-framework",
shared,
I managed to fix this by going into Edit Configurations on Android Studio and choosing the location of my XCode project file again. I believe this is an error of the KMM plugin in Android Studio and has yet to be fixed.
Updating Android Studio and KMM plugin worked for me.

Integrate Crashlytics in visual studio?

I am new at VisualStudio.I am using xamarin for both iOS and Android application.
Now, If i want to integrate Crashlytics in my application then what should i do or how should i do?
Suggestions please.
There are two easy and widely use option for xamarin Crashlytics:
Hockey App
Firebase
Also if you need within the premises you can write some code.
You can use Fabric to add Crashlytics to your app.
Drungrin has built a fabulous NuGet package to connect your Xamarin iOS & Android apps to Fabric & Crashlytics (GitHub Link).
Getting it hooked up to your app is a massive hastle because Fabric don't natively support Xamarin however.. (forgive the shameless plug) I have written up a complete guide on implementing it on both platforms, link here. The long and the short of this is:
iOS (you need a mac for this)
Create a new native ios app (through xcode) with the same bundle id as your xamarin app & install it using the fabric mac app.
Forget about the xcode project (you only need to register the bundle id), add api key from sample to xamarin info.plist
add fabric & crashlytics nugets (follow github docs)
build your xamarin app for release & then archive for publishing. Open the fabric mac app and you will have your build in archives. Dysms can be automated to upload but for now you can upload them manually
Android
Create a new native Android app (using android studio), Make sure build & version numbers are the same as your xamarin app. Let the fabric plugin build & connect the sample to fabric. (once again the app need the same name)
Copy the fabric api key from sample to xam app manifest (edit the xml).
Give the android app internet permissions (if yours somehow doesnt)
Copy the crashlytics.build.properties file (found $ProjectFolder -> app -> build -> intermediates -> assets -> debug) into your xamarin app's resources, set build action to AndroidAsset.
Copy the crashlytics build number into string.xml: <string name="com.crashlytics.android.build_id">APP_BUILD_NUMBER</string>
add fabric & crashlytics nugets (follow github docs).
Archive app & publish apk
Drag apk into fabric plugin (android studio).
As of 2022 and Visual Studio 2019 for MacOS, there is now a NuGet package that handles the Firebase Crashlytics API. If you add the Xamarin.Firebase.IOS.Crashlytics package, and your GoogleService-Info.plist into the project, you can then add the updated Initialization code.

UWP store build with Xamarin Forms

We are having trouble publishing our x86/x64 UWP Xamarin Forms app to the Microsoft Store.
The app got rejected because the certification team cannot test the .appxupload package because it crashes on startup.
The app only crashes when installed from the store built .appxupload package. The .appxbundle in _Test works fine and we are using it for in-house distribution and sideloading via HockeyApp.
At first we assumed that the crash was due to faulty packaging as our app uses the desktop-bridge feature to bundle a small WPF executable with it. Our first instinct was to remove the desktop bridge part and test the packaging again. After removing it, we had the same issue, the .appxupload crashed on start.
We took it one step forward and just created a new solution with a new Xamarin Forms Template project (VS 15.7.1). Without changing a single line of code we packaged the visual studio xamarin forms uwp template project for store upload. The surprise here is that the generated .appxupload also crashes exactly the same way on startup.
We decided to find out more by experimenting on the Visual Studio XF uwp template:
Update XF to 3.1 -> still crashes
Update .NETCore.UniversalWindows to 6.1.5 -? still crashes
Remove XF from the project completely (including Xamarin.Forms.Init(..)) -> no more crash, but also no more content without Xamarin forms ... :(
We have researched the following posts which seem to be related to this issue:
https://bugzilla.xamarin.com/show_bug.cgi?id=59538
https://developercommunity.visualstudio.com/content/problem/150965/xamarin-forms-project-uwp-app-dies-on-start-when-i.html
Could not load file or assembly 'System.Private.CoreLib...'
Some of the above posts were explaining that even though the .appxupload crashes when installed locally the when downloaded and installed from the Microsoft store the package will run without a problem. Our problem with this part is that our .appxupload package needs to be tested by Microsoft before the store publish because of the desktop bridge permission. Because it crashes when locally testing it cannot be published.
Based on our experiments with the Visual Studio Xamarin forms uwp template project this seems to be an issue of UWP and Xamarin Forms together.
We are not sure how to proceed. We need to get the app running from the .appxupload package so that it can be tested by the store team. Do you have any ideas/solutions for this issue?

How to create a binary from a monogame project

I'm making a simple Pong game on a Mac using Xamarin and Monogame, however I can`t find a way to export into a binary such as a .exe or a .app. Can it be done?
The answer is yes.
The procedure is pretty similar on both Android and iOS.
Android
Switch your project over to Release mode
If you are using any Google Play Services (maps and such), make sure to use your own keychain, which can be defined in the Project Options under Android Package Signing
Build the project
Right click and select Archive for Publishing
A new window will appear where you can sign and distribute your app
Upload to Google Play Store or any other relevant store
For iOS the steps are similar
Make sure you have created an App Name and provisioning profiles in the Apple developer center
Make sure Identifier of your app matches the registered one in the Info.plist of the app
Switch to AppStore or Ad-Hoc depending on the way you want to distribute your app
Build your project
Right click and select Show IPA on Build Server (Visual Studio) / in Xamarin.Studio on Mac you can select Archive for Publishing and get the IPA.
Upload the IPA to iTunesConnect or HockeyApp or whatever distribution method you are using
For more in depth documentation, please refer to Xamarin's official documentation for Android and for iOS.
Sorry for not quite understanding your question at the first time.
If you build the game on a Mac, I am not sure there is a way to export .app. However, I recommend you load your Xamarin project into Xamarin Studio or Visual Studio on Windows. Then you can get the iOS version and windows binary at the same time. However, for windows version you could only get .appx output, which is the winRT counterpart to the traditional desktop .exe.
Take Visual studio as an example,
If you want to export windows output, please follow steps below:
right click on your project's xamarin.Windows(UWP or Windows8.1) folder and select "store"
Select "No" for the prompt dialog about whether to upload to store
Follow the instructions till the end. Then get the .appx file under your project's AppPackages folder
And what's more, even if you just need to share with several people, HockeyApp is still a good option for you regarding the distribution trouble and version control trouble it can save for you. You can take a trial here.
Please let me know if this can help.

Published App 3 days go, not showing in market/play, is it a Proguard.cfg issue?

I created an Android app and published it in the Android market about 3 days ago.
The app is reported as published in my developer dashboard but it is now showing up. When I was exporting the signed APK with eclipse I had an error in my Proguard.cfg file. I couldn't find a solution so I deleted the file and compiled the app and uploaded it to the android market.
Could the deleting of the Proguard.cfg file have impacted my apps visibility in the android market? Any tips on what I should do?
Proguard.cfg is used when building the release build of the app, but is optional.
See: http://developer.android.com/guide/developing/tools/proguard.html
So this is unlikely to be the problem.
I would check your developer console on the market place, and see if you have published the app, or activated the apk correctly.

Resources