visual studio for mac provisioning profiles error - xamarin

I am using macbook pro. I have xcode installed on my computer. My goal is to develop applications for iOS. For this, I want to develop an application with xamarin framework in visual studio for mac instead of xcode. when i test my app with similator i have no problem. but when I want to test it on my iOS device, I get the warning that the provisioning profile is missing.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(3,3): Error: Could not find any available provisioning profiles for iosdnm.iOS on iOS.
(iosdnm.iOS)
I created a developer account belonging to the account I use mac. but since I haven't paid the 100 usd he asked me for this account yet, I get the warning that my account is being controlled. My last post may be redundant.
This is exactly what I want to do. I just want to develop an application in visual studio for mac with my apple ID and use it on my ios device. How can I get rid of my above mentioned error?

Related

Unable to open Android Studio in with other users mac m1 big sur

I have installed Android Studio, and it works as it should, but when I switch to another user account on my Mac i get this message.
You can’t open the application “Android Studio” because it may be damaged or incomplete.
Is it possible to use the app in several accounts? I have tried saving the SDK in the Share folder, but it doesn't solve the problem.

Unable to add Apple ID in VS2017 and VS2019 Xamarin project

I'm having a hard time trying to deploy my first Xamarin.Forms app to an iPhone. This is the scenario:
-coding on Visual Studio for Windows (VS2017 Community 15.9.24 and VS2019 Community 16.8.5);
-VS running on Windows 7
-MacBookPro on the same network, logged in with my personal Apple ID;
-iPhone attached to the Mac;
-I created an Apple developer account (not a paid account)
-Xcode and VS installed on the Mac;
-pairing to the Mac works fine;
-debugging the Xamarin iOS project using iPhone simulator works fine;
-debugging on a physical iPhone attached to the Mac fails in both VS2017 and VS2019.
I understand the error must be because I can't add my Apple ID in Visual Studio.
Error in VS2017:
-I select iOS Options > iOS Bundle signing > Automatic provisioning;
-then in Tools > Options > Xamarin > Apple accounts VS won't let me add an account. The only enabled option is the "install Fastlane" button, which fails.
-trying to run the debug configuration on the iPhone anyway fails with the error "No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com." Can't get past this point.
vs2017 error
Error in VS2019:
-iOS Options > iOS Bundle signing shows the message "Please wait until the provisioning information is loaded" forever. No options are presented.
-in Tools > Options > Xamarin > Apple accounts > Add I type my Apple developer ID and password, but nothing happens. I can barely see what I suppose is a message box flicking on and off.
-trying to run the debug configuration on the iPhone anyway fails with error "Automatic provisioning is enabled but no development team was selected." Can't go further here also.
vs2019 error
Am I missing something here? Is there a workaround? Online documentation that I've found won't help me with these errors.
EDIT: I was able to add my Apple Id into VS2019 running on Windows 10.

Xamarin workflow on Windows

I'm aware that a Mac or a Mac service e.g. MacInCloud.com is necessary for building and submitting iOS apps.
My question is about the actual workflow of building an app on Windows using Xamarin on Visual Studio 2017.
We need to write code, test and debug throughout development cycle. How does this work with Xamarin running on Windows? How would I actually see what my mobile app looks like or behaves during the actual development cycle?
While developing my web apps in Visual Studio, there are many trips back and forth to the browsers and back to VS in order for me to see the results of my code. How does this work with Xamarin running on Windows? Is Xamarin Live Player the only option for development cycle? Is there a solution through MacInCloud or similar services so that tethering a device to dev machine is not necessary?
I'm just trying to understand how a healthy development cycle is created for Xamarin developers on Windows.
I will answer your question in few section: Coding, Debug, Test
Coding
You will be using Visual Studio to write your codes. iOS and Android code will be written in C#. You will get access to UI Designer for both iOS and Android to edit the layout files and storyboard/xibs. For 3rd party library, there is NuGet to serve your needs.
Debug
You can use Xamarin Live Player without connection to a Mac/MacInCloud for basic preview. However, some features of iOS is not available in Xamarin Live Player (e.g. xibs files not supported...).
If you setup with connection to a Mac, you will be able to see a list of Simulator that available in the Mac you connected to. By default, if you debug it, the simulator will still show up in the Mac. Then you will need to VMWare or remote into the Mac to check the simulator output. If you have Visual Studio Enterprise license, you can get access to a Remote iOS Simulator feature. You will need to turn the option ON. After that, you will able to see a remote iOS Simulator showing in your Windows machine without the needs to remote into Mac machine anymore. For debugging in actual iOS devices, you will still need to plug your device into the Mac. Previously (more than 1 years ago), Xamarin announce that they are working on "iOS USB remoting" to allow you to plug in iOS device into Windows machine and debug on it. But it is not release until now.
For Android, you can get access to Android Emulator Manager to add emulator to debug or you can deploy apps to physical phone just like what you can do with Android Studio.
Test
I will be referring to Xamarin.UITest for this part. You will be able to write UITest code in C# inside Visual Studio. Xamarin have product "Xamarin Test Cloud" to allow you to upload test code and binary and then run your test in cloud periodically. If you want to run the test locally in your machine, you will only able to run Android UITest in windows machine. To run iOS UITest locally, you will only able to run it in Mac machine. Using a Mac, you can also run Android UITest.
You can use a simulator/emulator instead of a device. For iOS, the simulator would run on the Mac Build Host that you are connected to. You can select the option for "Remote iOS simulator" in Visual Studio -> Xamarin.iOS options and you'll be able to interact with the simulator without having to RDP/VNC/look at the mac. For android, you can just run an emulator in Window and interact with it like that. Using your web apps comparison, you would use a simulator/emulator instead of browser but, for the most part, the process would be similar.
I have been developing a Xamarin MVVM app targeted at iOS and Android. I initially did the iOS development on Windows with VS 2022 and an iPhone attached via USB. I knew that I was going to have to eventually move to the Mac for final provisioning but I ended up taking that painful step earlier than planned because certain Xamarin features were just not working on Windows. First I could not get my app icon to be anything other than the Xamarin default and then Xamarin.Essentials.FilePicker would not select a file:
https://github.com/xamarin/Essentials/issues/1710
So after a week of struggling I finally got my project building and deploying on the Mac. However, I am not nearly as comfortable working on the Mac as I am on Windows where I have all my familiar development tools. So then the question was how to share the project files between the PC and the Mac so that I could edit and compile on the PC and then move to the Mac for final testing.
At first I tried iCloud but I could never get the files to sync reliably between the shared folder on the PC and the Mac. I am used to Dropbox and OneDrive, which work as expected. iCloud not so much.
So what I have been doing is committing and pushing the changes to github and then pulling the changes into the project on the Mac. It is quick and has the added benefit of version control using an offsite server. I am happy with this workflow and publishing the app on the Apple Store should be an easy task when that time comes.
Update:
This process is still working for me. I have taken the additional step of doing the release configuration on VS Mac and publishing my app to App Store Connect. That experience was convoluted and frustrating but it now works and I have people testing my app via TestFlight.
One hiccup is that when selecting Automatic iOS Bundle Signing in the project properties on VS Windows, this change gets pushed to the Mac side and causes a build error under Debug until I select the Automatic provisioning profile on the Mac. Somehow it gets set to the Wildcard profile on the Windows side.

Deploy Xamarin iOS App via Visual Studio for Windows

I want to deploy my first iOS App created with Xamarin Forms to the AppStore or at least to a single device. I have an Apple Developer Account and performed this task several times before using xCode and native iOS Apps.
But as a Windows guy I hoped to get this done for Xamarin using my VST for Windows. 
But all guides and tutorials I found are only explaining how I can deploy iOS Apps to the store and to devices using VST for Mac ... Is this the only way? How do I get the code to the Mac? Can I use the TFS Source Control? Do I have to commit every little change to TFS, check it out at the Mac, rebuild the whole app there and deploy it from the Mac?
Or are there ways and workflows that work with Windows only having the Mac 'in the background' via network?
Take a look at https://mobile.azure.com (the best solution for continuous app development: analytics, crash reports, iOS/Android/UWP builds + deploy)
I'll address the second part of your question - the ability to deploy to a single device. I'm assuming that the single device is your own device and you want to deploy via compilation. This can certainly be done from your Windows machine but due to apple licensing requirements, you will need your Mac available to compile and deploy to your phone. Your iPhone/iPad will need to be plugged into your Mac's USB.
The guides listed on the Xamarin website outline how to set up the mac build host. https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/ In short, you need some prerequisites (Remote Sharing turned on, XCode installed, etc).
Once you've connected Visual Studio to your Mac, set the iOS project as the startup project, change the config from Debug to iPhone, and press F5 to compile and deploy to your device.
When in doubt, select iPhoneSimulator instead of iPhone. The simulator isn't subjected to provisioning and signing profiles which can be daunting to setup. If you can get the simulator working, you've solved the software and connectivity prerequisites.
There's a lot to configure, but it does work. This is my primary setup for Xamarin.Forms development.

Does Xamarin IOS Simulator Require XCode?

Well , im new to IOS app development i've heard about Xamarin cross-platform app-development, so my setup is ==>
Visual Studio Enterprise Update 1 Installed.
Xamarin For Visual Studio 2015 Downloaded (Now about to install).
Xamarin IOS simulator downloaded.
Now as i have xamarin simulator i don't need to buy a mac or get a hosted-mac , that's clear now i just wanna confirm do i need XCode ? i mean i have xamarin simulator but still i'm confused about XCODE for windows how can i get that should it be getting installed automatically or do i need to give it another shot.
I'm confused about all this .
I just don't* have the budget to buy a MAC and i want to do APP development just (Debugging ) deployment will be done latter please tell me what should i do or give me the proper instruction thanks.
You need to run Xcode on a mac to build Xamarin apps for iOS. A Windows install of Xamarin on Visual Studio will allow you to connect to a mac to do the build remotely, but you still need a mac available that has Xcode installed on it to do the build.
You can download Xcode from the Mac App Store. You will also need the mac to upload the final package to the iOS App Store if you're going to release it there.
An other option is to use a cloud based Mac server, there are several companies that rent them out on hourly/monthly basis for this purpose (MacinCloud being one that I've heard of).
XCode needs and can only be installed onto a MAC OSX system.
Once you have XCode installed, you can use its iPhone simulator to emulate the iOS apps you make on your windows pc.
You need to connect to the MAC by using the MAC Agent on Visual Studio. This connects remotely to the MAC and allows you to debug the app to be emulated onto the virtual iOS device being simulated on your MAC OSX system.
You can use MAC Cloud based server but also, you can use a real iOS device such as an iPhone to debug apps directly onto the device.

Resources