iOS Newbie Startup Help

I’m brand spank’n new to iOS. Just got my first MacBook yesterday (2012 11” MacBook Air) and am starting to embark on the Xamarin iOS journey. My app is all developed for Android and has been in production for a year. We just got our iOS hardware built and now I need to convert the app over to iOS. I’ve managed to convert most of the code and now need to port it over to my iPhone. I’ve gone through the Xamarin iOS Installation Guide and am waiting for my DUNS number to be active so I can get provisioned. So while I wait I have a few questions that I could use some guidance on.

  1. My MacBook is running Yosemite OS X 10.10.1. Should I update to El Capitan?
  2. I installed XCode 6.4. If I update to El Capitan, I believe I will need to update to 7.1, right?
  3. Is there a way I can start testing my app without being provisioned?

Being a real iOS zero I don’t need anything to confuse me so I was reluctant to upgrade to El Capitan. I need a very stable environment to get going. I don’t mind running early versions or beta’s after I have a working app.

I have other questions but they can wait until I get past this point.

Thanks – Mark.

Posts

  • adamkempadamkemp USInsider, Developer Group Leader mod

    You don't need to update the OS, but you should update Xcode. The latest version is 7.1.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    I tried 7.1 and it said my OS was too old. I think it wanted 10.10.4.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Maybe. You can update to the latest Yosemite without risk. El Capitan may still cause problems with some software. I don't know of anything specific at this point, but for work stuff I'm usually pretty conservative. That's why I haven't updated yet.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Thanks @adamkemp , I got Yosemite updated to 10.10.5 and XCode to 7.1. My DUNS number came in and I got registered with Apple. Just waiting now for Apple to confirm my request to join the Developers Program. Hopefully I'll be able to give everything a go soon.

    BTW, what do you think of the new XamarinVS 4.0.0, Cycle 6? I tried it with Xamarin Android and found a bug in reading Contacts. Reckon it's worth trying for iOS?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I haven't found anything in particular so far, but I obviously can't guarantee you won't find any bugs. Stick with the stable releases, though.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Well, I'm really stuck now. I have my Apple Dev all set up and I when I went back to build my app t I got the following error on all my forms and controls (1114 errors).

    The name 'InitializeComponent' does not exist in the current context - on all forms
    The name 'control name' does not exist in the current context - on all controls

    I know I built it successfully before but have no idea why this is happening now. The Android project builds just fine.

    Any ideas? It's kind of a bummer to be so close.

    I'm using Visual Studio 2013 and my app is a Shared Project using all Xaml forms.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    You may need to restore your NuGet packages.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Well, I bought the bullet and installed Visual Studio 4.0 and changed my project to a PCL project. The PCL project allowed me to build without errors and I got connected to the Mac. I'm able to debug my app on the Mac using the simulator but I can't get it connected to the iPhone. I posted over at the Visual Studio 4.0 forum my problem. Here's the link. I'm now fresh out of ideas so any help will be most appreciated.

    https://forums.xamarin.com/discussion/52442/alpha-release-xamarinvs-4-0-0-cycle-6-feature-release#latest

    Thanks.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Try reading this.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    I have that memorized :smile: and been through it a hundred times.

    Is there anything to do with regards to provisioning and certificates that I have to do on my Windows computer or in Visual Studio, or on Mac Xamarin Studio? All I've done is use XCode and the Developer's Portal to establish all my provisioning on the Mac.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    There's nothing in particular to do in Visual Studio or Windows or in Xamarin Studio. A good sanity check is to make sure you can deploy an app from Xcode. Just make a new dummy iOS project in Xcode and try running it. If that doesn't work then it won't work for Xamarin Studio either. Once you get it working in Xcode then try doing the same in Xamarin Studio (new project, run). If that works and your real project doesn't then the issue is probably that your project is attempting to use a particular provisioning profile or signing certificate that is not installed on your machine. At that point you should check your project settings.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Yeah, that was my next step. I've already verified that I can debug an app on the iPhone from XCode so I thought I'd start from scratch with a simple Hello World app on VS. I'm pretty much slammed the rest of the week so was hoping to at least get the app limping on the phone before I have to take off.

    When you say 'installed on your machine', you're referring to the Mac, right? There are no certificates or anything like that that needs to be installed on the Windows computer is there?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Right, all provisioning and signing for iOS happens on the Mac.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Test app worked!!!. So now it's a process of creating a PCL app from scratch and adding my code in and see if it works.

    Just curious. The test app took a very long time to build (couple of minutes). My app is a hundred times the size of the test app. Do you reckon that it's going to take an hour to build for deployment to the phone? For the simulator it was a normal build time.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I've worked on several complex apps, and none of them have taken an hour (though I don't use Visual Studio for iOS development). The AOT step for iOS is time consuming, but it's on the order of minutes, not hours.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Well, I'll be... My app runs on the iPhone after recreating it from a fresh PCL project. Hot Dog!

    Now I just got to figure out where my graphics and icons go. They're currently in the Android Resources Drawable folder but obviously they belong somewhere else in my iOS project. I'll start investigating.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    I got the graphics figured out. Pretty easy actually.

    But now for some reason no breakpoints are being hit. Is this normal? I really need to be able to break into the app when debugging on the phone. I have the Enable Debugging checkbox checked in project properties. Do I need to do anything else to enable breakpoints?

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Debugging with breakpoints seems to be hit and miss with more misses than hits. Haven't figured out the magic formula yet. Anybody having better luck?

  • JohnHJohnH GBMember ✭✭✭✭✭

    I have this occasionally, clean and rebuild usually helps.
    If it persists though then Xamarin dev would definitely be interested in repo zip!

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I don't use Visual Studio for debugging iOS apps so I really can't help you with any problems specific to that setup.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Well, I think I've gone full circle. I started out with using a Shared Project Solution for my app and that worked for over a year for my Android app. As per the above posts it didn't work for iOS so I switched over to a fresh PCL project but referenced my Shared Projects (App Shared Project, Android Shared Project, iOS Shared Project, and Xamarin Shared Project). This worked for iOS and Android. After taking a look at the Solution, it seemed that I didn't need the Portable project that was created so I removed it and now it sure looks exactly like my previous Shared Project Solution. I wonder if all I needed to do was to start with a fresh Shared Project Solution. I might try it just for fun.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    My iPhone has iOS 7.0 and I need to update to at least 7.1 but Apple won't let me. Will I have any dev problems if I update to 9.1?

  • MarkFredricksonMarkFredrickson USMember ✭✭

    I answered my own question. I connected my wife's 6+ which has 9.1 on it and got it provisioned (hey, I'm getting good) and was able to run and debug my app just fine. I'm going to now update my daughter's old 4S to 9.1 (my test phone).

    But I do have a question regarding testing on older iOS versions. My app uses Bluetooth so I can't test with the simulator. I need an actual device. With Apple not allowing you to install older iOS versions, how do I test my app to make sure there are not Bluetooth issues with non-current iOS versions?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    To test on devices with older versions you basically have to keep old devices around and don't update them. It sucks, but that's the way it is. The other option (which Apple would prefer) is to not support older OSes at all. Make 9.x your base requirement. For new apps that's reasonable.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    Well, I got my app working on my iPhone (still needs lots of cleanup). It runs pretty slow and I'm guessing it's because it is installed in debug mode. Is there a way to deploy a release build? I tried it on VS and it doesn't work (app just opens and quits).

  • adamkempadamkemp USInsider, Developer Group Leader mod

    That sounds like a new issue. I suggest making a new post for it. It's probably an issue with the linker settings and code getting stripped out.

  • MarkFredricksonMarkFredrickson USMember ✭✭

    I was able to deploy a Release build by selecting the Debug/Start Without Debugging. And I have published the app and waiting for approval.

    I still don't think I have everything setup correctly though. In order to publish the app I had to build it on my Macbook using Xamarin Studio. But my app is on my Windows computer. I tried sharing the drive and pointing the Mac Xamarin Studio to my shared Windows folder. It started to build by failed with a permission issue (don't remember exactly what it was). I gave my Mac full authority on my Windows folder but no luck. I ended up syncing the app on the Mac with my Windows app and building it locally. I figure there is a trick to getting it to work that I'll investigate later.

Sign In or Register to comment.