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.
Unfortunately, activation email could not send to your email. Please try again.

Can't build for iOS

Thread ID:

Created:

Updated:

Platform:

Replies:

124434 Jun 9,2016 08:51 AM Jun 14,2016 08:19 AM Xamarin.Forms 5
loading
Tags: SfChart
nico
Asked On June 9, 2016 08:51 AM

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.




Gobi M [Syncfusion]
Replied On June 10, 2016 08:36 AM

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 


Gjorgji Belkoski
Replied On June 10, 2016 10:05 AM

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.

Gobi M [Syncfusion]
Replied On June 13, 2016 08:40 AM

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 


nico
Replied On June 13, 2016 08:53 AM

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


Gobi M [Syncfusion]
Replied On June 14, 2016 08:19 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;