We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Can't build for iOS

Hi,
i'm working on my first app with xamarin forms and SfChart.
This app works great with Android but i can't execute it for iOS. 

Every chart is done on portable solution and on Android and iOS i added references as show in http://help.syncfusion.com/xamarin/sfchart/getting-started .
References for iOS are

Syncfusion.SfChart.iOS
Syncfusion.SfChart.XForms
Syncfusion.SfChart.XForms.iOS

and in AppDelegate.cs i have created an instance of SfCharts.

this is my AppDelegate.cs:


using System;
using System.Collections.Generic;
using System.Linq;

using Foundation;
using UIKit;

using Syncfusion.SfChart.XForms.iOS.Renderers;

namespace Kleos_SmartSight.iOS
{
    // The UIApplicationDelegate for the application. This class is responsible for launching the 
    // User Interface of the application, as well as listening (and optionally responding) to 
    // application events from iOS.
    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        //
        // This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {

            

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            new SfChartRenderer();

            return base.FinishedLaunching(app, options);
        }
    }
}

when i try to test my application on iOS i have this message:

Failed to resolve "System.Object Xamarin.Forms.ElementTemplate::CreateContent()" reference from "Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 681

what's the problem??

if i remove the new instance statement my application can start but can't shows charts.




5 Replies

GM Gobi M Syncfusion Team June 10, 2016 12:36 PM UTC

Hi Nico, 
 
Thanks for contacting Syncfusion support. 
 
Essential Studio for Xamarin 14.1.0.46 is compatible with Xamarin Forms 2.1.0.6529. We suspect that this issue occurs because it does not use the matching forms version. Could you please share us the Xamarin.Forms version to assist you better? 
 
Regards, 
Gobi M 



GB Gjorgji Belkoski June 10, 2016 02:05 PM UTC

I have a trial version of syncfusion for xamarin forms. SfChart does not render on iOS, however works fine on android. The code is entirely in the pcl.


GM Gobi M Syncfusion Team June 13, 2016 12:40 PM UTC

Hi Gjorgji, 
 
An instance for SfChartRenderer should be created in AppDelegate.cs file as mentioned in online documentation. We have added our Getting Started sample for SfChart for your ref. 
  
 
Please let us know for any queries. 
 
Regards, 
Gobi M 



NI nico June 13, 2016 12:53 PM UTC

Hi,
first of all thanks for your support :D
the problem seems to be solved, what i have done is this:

- on project folder i deleted all "bin" and "obj" (for every solution)
- i closed the emulator on mac
- close the solution
- open solution as administrator
- checked if all resources are linked as well
- clean and rebuild
- start emulator

for now seems to execute chrts on ios emulator.
(SfChart is a very usefull component, great job!)

for a better support this is my configuration:

- Mac with Yosemite
- Xamarin For Visual Studio 4.1


if i come in touch again with this problem i will report you



GM Gobi M Syncfusion Team June 14, 2016 12:19 PM UTC

Hi Nico, 
 
Thanks for the update. 
 
Please let us know if you have any queries. 
 
Regards, 
Gobi M 


Loader.
Live Chat Icon For mobile
Up arrow icon