Building iOS using Xamarin in Visual Studio
-
I'm almost at the point of defeat. To develop an iOS app using Visual Studio / Xamarin you need to connect to a host Mac running XCode. Getting Visual Studio to connect to the Mac involved physically setting up a new router since Wifi seemed to be a problem, then installing XCode. And Xamarin Studio. Or may this wasn't necessary - depends on the forum you read. And cursing. And then suddenly it worked. But then adding my Apple account to Xamarin requires installing fastlane which throws you to a terminal window in order to login to your account (but which? macOS or AppleID? Turns out AppleID), which then borks because you need to create an App-specific password, Which then doesn't work. So back to VS. I build, but the build fails because I need a code signing certificate. Back to the mac. Generate a CSR, create a cert, download the cert, install it in the keychain (the login one, it turns out), and try again.
error : No installed provisioning profiles match the installed iOS signing identities.
OK. Sigh. Xamarin help says to use the "Organiser" window in XCode, so I go there, and I see "Archives" and "Crashes". Nothing in Archives, but "Crashes", for some reason, offers me the chance to sign in with my Apple Id and from there I can see my signing identities and provisioning profiles. Except it's not offering to create a provisioning profile. So back to developer.apple.com to manually create a provisioning profile and we try again. No luck. OK. Let's step back and have another crack at adding an account to Xamarin. Looks like the issue is with 2FA and the Apple ID. I hear that VS Code solves this so I download VS code, install, run, add account. It works! I rebuild in Visual Studio on my Windows machine. It works! Oh - no it doesn't. No provisioning profile. So I hunt around, I try to manually create a profile but it's asking for my device ID (what's the ID of an emulator?) and I give up. A day lost. So I move to VS Code on the Mac and create a new project from the project templates and attempt to build / run. Except it doesn't even build. A new project generated by VS Code with zero changes doesn't even build out of the box. Looks like it's Android issues so I unload that portion and try the iOS. No provisioning profile. FFS. I know this stuff all works. Somehow. I'm just stunned beyond words that it's this painful, this complicated, this frustrating, this badly and misleadingly documented, and yet more patient people than I have worked through it. It
-
It's such a bloody mess. Seriously. That whole experience is exactly what inspired me to write my blog post thanking Microsoft for just making things EASY, even though I know it comes across really fanboy-ish and I caught some flack for it. iOS and Android dev is just insanely frustrating in comparison. [Code Index] | Thank You Microsoft[^]
Blog: [Code Index] By Mike Marynowski | Business: Singulink
If Microsoft had a half-decent phone and had managed to get Windows to actually run on it then they would have won the "who has more apps" challenge. Being in the thick of this now boggles my mind as to how the ecosystem for apps is so strong. There are some persistent and forgiving devs out there.
cheers Chris Maunder
-
It is very simple. "Apple Hates Developers". There is no other explanation for XCode. The fun really starts when you try to publish. I won't ruin the experience for you with spoilers. Seriously, my advice is to first get a simple XCode app working and compiling. 90% of the issues are related to that part of the process. Then Xamarin should work like a charm.
Just like Apple Hates People Who Listen to Music (ie iTunes).
cheers Chris Maunder
-
I code in RemObjects Oxygene, a Pascal/Delphi syntax .Net language. With the RemObject's products, I can write in Pascal and make .net applications for Windows, Android, and iOs. You code specific to each platform, but can share libraries. Additionally they also support C#, and Silver (Swift) on all 3 platforms. And now they can also compile to native Win32 apps. In each case you use the native libraries for the platform and are not limited as to what you can do on that platform. Unlike the Xamarin approach where you write one codebase and target the different platforms. I haven't done the iOs bit, but they do a nice job on Oxygene and .Net for Windows. And I think they probably did a good job of interfacing to the Mac and the Xcode. You MIGHT want to check it out. FWIW, I LOVE the Oxygene language much more then C#. (Although you can mix languages in a single project as well, of you have something in one language that you don't won't to redo at all. They also let you paste C# code into Oxygene and it will do a decent job of translating. Can also just import a C# file. Have a look see.
I'd not heard of this - I'll definitely check it out.:thumbsup:
cheers Chris Maunder
-
If Microsoft had a half-decent phone and had managed to get Windows to actually run on it then they would have won the "who has more apps" challenge. Being in the thick of this now boggles my mind as to how the ecosystem for apps is so strong. There are some persistent and forgiving devs out there.
cheers Chris Maunder
Yeah, I was thinking the same thing with regard to the app ecosystem. If they managed to do that well with the dev tools they have, I can't imagine how great an MS phone done right would have been. Although somewhat counter-intuitively, perhaps their app ecosystem is stronger because the only apps that make it to the app store are made by superstars with the persistence to get there. Maybe the higher barrier to entry results in only much more dedicated devs getting over the barrier?
Blog: [Code Index] By Mike Marynowski | Business: Singulink
-
If you develop for iOS you need to use macOS. Trying to hack around it any other way is a waste of time. Get a Mac Mini and use VS for Mac and move on.
But I don't want to. I want to have my Mac sitting there obeying every command my Windows machine (which is actually a Mac) sends it. I want it to Just Work. And I also want World Peace and a ride on a Unicorn.
cheers Chris Maunder
-
Yeah, I was thinking the same thing with regard to the app ecosystem. If they managed to do that well with the dev tools they have, I can't imagine how great an MS phone done right would have been. Although somewhat counter-intuitively, perhaps their app ecosystem is stronger because the only apps that make it to the app store are made by superstars with the persistence to get there. Maybe the higher barrier to entry results in only much more dedicated devs getting over the barrier?
Blog: [Code Index] By Mike Marynowski | Business: Singulink
Mike Marynowski wrote:
only apps that make it to the app store are made by superstars
I was thinking about that too: the quality of apps that came out with the phone were phenomenal. There was a massive shift in the expectation of consumers on the level of fit and finish in an app and that came from the focus on design. Windows apps were always pretty rough. Lots of knobs and controls and small text input boxes. iPhone apps (and subsequently Android apps) were a completely different beast. Microsoft tried through the Metro design but it was just all harsh, flat unfriendly squares with thin skeletal fonts.
cheers Chris Maunder
-
Mike Marynowski wrote:
only apps that make it to the app store are made by superstars
I was thinking about that too: the quality of apps that came out with the phone were phenomenal. There was a massive shift in the expectation of consumers on the level of fit and finish in an app and that came from the focus on design. Windows apps were always pretty rough. Lots of knobs and controls and small text input boxes. iPhone apps (and subsequently Android apps) were a completely different beast. Microsoft tried through the Metro design but it was just all harsh, flat unfriendly squares with thin skeletal fonts.
cheers Chris Maunder
Yeah I think Metro just took minimalism one step too far, to the point where UI designers weren't necessary in the eyes of developers because what they could do on their own looked "good enough". But even Metro requires the delicate touch of a skilled designer to really get everything just right to the point where it looks good, not just good enough. Windows UWP desktop apps tend to face the same issues, though it is getting slightly better over time. The Creator's Update Mail app is finally mostly usable and kinda even pretty. I'm really looking forward to seeing "Microsoft Design Language 2" / "Project NEON" in the next major update. I can't really put my finger on why exactly, but even the Facebook UWP app is just so damn ugly that it is annoying to use. I had it open the other day when my girlfriend walked by and glanced at the screen and said "oh god, what did Facebook do to their website, it looks terrible!" I don't know what it is but all UWP apps seem to have this quality to them that is just blah. I think they really need to change font rendering in UWP apps, it's just too harsh on 96 DPI desktop screens. It probably isn't worth it at this point though, with high DPI screens starting to become standard. Maybe UWP was just introduced before its time. I feel like the design language NEEDS high DPI to look acceptable. Wow that turned into a really long completely unrelated rant. Sorry.
Blog: [Code Index] By Mike Marynowski | Business: Singulink
-
Just like Apple Hates People Who Listen to Music (ie iTunes).
cheers Chris Maunder
-
I'd not heard of this - I'll definitely check it out.:thumbsup:
cheers Chris Maunder
Just to clarify a bit further, Remobjects approach is NOT to try to build one set of code that runs anywhere. They are trying to let you write platform specific code. They let you write one language that runs anywhere or any one of their languages that runs anywhere. So if you want to write Swift that runs on Windows, you can do that. Another thing about Remobjects is that they are VERY responsive about fixing bugs. Bugs I have reported are generally fixed the next day. And that comes out in the next beta which they generally make available weekly. One downside is that as they have added more languages and platforms support, they are having more bugs, but I guess that is to be expected.
-
Yeah I think Metro just took minimalism one step too far, to the point where UI designers weren't necessary in the eyes of developers because what they could do on their own looked "good enough". But even Metro requires the delicate touch of a skilled designer to really get everything just right to the point where it looks good, not just good enough. Windows UWP desktop apps tend to face the same issues, though it is getting slightly better over time. The Creator's Update Mail app is finally mostly usable and kinda even pretty. I'm really looking forward to seeing "Microsoft Design Language 2" / "Project NEON" in the next major update. I can't really put my finger on why exactly, but even the Facebook UWP app is just so damn ugly that it is annoying to use. I had it open the other day when my girlfriend walked by and glanced at the screen and said "oh god, what did Facebook do to their website, it looks terrible!" I don't know what it is but all UWP apps seem to have this quality to them that is just blah. I think they really need to change font rendering in UWP apps, it's just too harsh on 96 DPI desktop screens. It probably isn't worth it at this point though, with high DPI screens starting to become standard. Maybe UWP was just introduced before its time. I feel like the design language NEEDS high DPI to look acceptable. Wow that turned into a really long completely unrelated rant. Sorry.
Blog: [Code Index] By Mike Marynowski | Business: Singulink
I'm with you. Microsoft actually has a long, long, long history of introducing things before their time, having them flop, and having their competition step in and do it "right".
cheers Chris Maunder