So, following are the steps you need to do in order to setup and run WhiteLabel-iOS mobile app on your Macbook with Xamarin Studio.
Note: I assume that you have already installed Xcode and Xamarin Studio into you Macbook
Step 1: Setup Sitecore instance
In this case, I am using Windows with Parallels software on my macbook. So, I setup Sitecore Habitat website instance in my windows VM with the host name of "habitat.local"Step 2: Configure access to Sitecore instance from Macbook
You can see full setup instruction of a normal .NET website with access from mac from following urlhttps://www.getdonedone.com/accessing-your-windows-development-environment-from-osx/
Some of the main steps that I did was,
Disabled the Firewall in Windows
Added the host entry into Macbook /private/etc/hosts file
So, now I can visit "http://habitat.local" from my Macbook Pro.
Step 3: Clone Sitecore Mobile SDK for Xamarin repository
Open a Terminal window and clone the github repohttps://github.com/Sitecore/sitecore-xamarin-pcl-sdk
Step 4: Open WhiteLable-iOS solution from Xamarin Studio and run Simulator
After cloning the github repository, open "/sitecore-xamarin-pcl-sdk/solutions/WhiteLabel-iOS.sln" solution file from Xamarin Studio and run SimulatorAt this point, you will receieve an error message with Simulation failing
Error : /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: No installed provisioning profiles match the installed iOS signing identities. (WhiteLabel-iOS)
Solution :
To solve above issue, you need to manuall edit the related .csproj file (i.e. "/sitecore-xamarin-pcl-sdk/app/WhiteLabel/iOS/WhiteLabel-iOS/WhiteLabel-iOS.csproj") and remove following tags from that file
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
Reference :
http://forums.xamarin.com/discussion/39534/cant-build-ios-in-xamarin-studio-5-7-1-through-5-9
http://stackoverflow.com/questions/30724551/no-installed-provisioning-profiles-match-the-installed-ios-code-signing-keys-in
Step 5: Configure App Settings
As final step, I clicked on the "Edit" icon in top right corner of the application to visit Settings page of the application. There I gave "http://habitat.local" (which is my windows installed Sitecore instance) as my hostname for the website.Now, I can run the application and test the operations/functionality in that application.
Happy Sitecore + Xamarin ! :-)
No comments:
Post a Comment