How do I use the Core Plot framework with Xcode 4? - xcode

How do I install the Core Plot framework into Xcode 4?
This older tutorial has instructions on how to install it for Xcode 3, but I could not find any similar instructions for Xcode 4. What do I need to do in order to use this framework with the newer Xcode?

I made one here that followed what I did:
http://recycled-parts.blogspot.com/2011/07/setting-up-coreplot-in-xcode-4.html
Hope it helps!

It appears that I was unable to set up core plot project for the reason that I had corrupt example project which code I was using.
This are the steps:
open a project
add quartzcore framework
add other linker flags: -ObjC -all_load
add CorePlot.xcodeproj to existing project (drag and drop)
add sample class (from examples folder, drag and drop)
drag coreplot framework from added CorePlot.xcodeproj to linked frameworks
in IB
drop object and associate it to sample class
drop custom view to window and associate it vith CPTLayerHostingView
connect object and custom view
And hat is that (may sound complicated, but can be done in under a minute)
Steps can be taken in any order, except last few.
Everithing is very similar to instructions at: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application except the way it is done in xcode4 is actually easier.
Here are screenshoots that clarify the above steps: http://www.optimae.biz/data/stackoverflow/coreplot.pdf
Hope this will help someone.

Related

MVVMCross Problem with adding new ContentPage

Could you tell me what I am doing wrong? I've downloaded and installed extension MVVMCross available on https://www.mvvmcross.com/. I've installed it using Tools/Extensions and Updates in VisualStudio 2017 environment. When I created new MVVMCross Multi-Page Xamarin Forms Application then for two existing pages, all works perfectly.
I next needed to add ContentPage, but I have a problem since my new Xamarin Forms ContentPage is not correct: file *.cs is visible in my solution but *.xaml is hidden.
The version of MVVMCross and MVVMCross.binding (core, forms, platform) are 5.2.1 and Xamarin.Forms is 2.3.4.270 and Xamarin.Essentials is 1.5.2.
Could anyone explain to me why I can't add a new page? Thank you in advance.
All steps attached as screens...
Yes Lucas Zhang - MSFT, you may be right. It looks like a problem with version of Xamarin.Forms or MVVMCross. I'm not sure what more? I had version 15.7.xx of VS2017. After creating new MVVMCross Multi-Page Xamarin.Forms application I have versions: MVVMCross (all libraries) 5.2.1, Xamarin.Forms 2.3.4.270. Then I've not got any errors but I couldn't add new ContentPage.
Below all my steps which I made myself to resolve this problem:
I've installed VS2019 too, but it has not resolved the problem.
I've updated Xamarin.Forms to the latest stable version 4.6.0.726 but I had on both version of VS the same problem after updating:
Error NETSDK1022 Duplicate 'EmbeddedResource' items were included. The .NET SDK includes 'EmbeddedResource' items from your project directory by default.
I've read the article on Stack Overflow about this but I couldn't fix the problem.
But then it was possible to add correct new ContentPage.
In my opinion, the best solution is to update Xamarin.Forms and fix the problem with Duplicate Resource. If you know what to do for this, tell me please.
Finally, I've back to my old version of VS2017 and I've updated it to the latest version 15.9.22. Now, I can create ContentPage and application works but from my point of view doesn't work perfectly. I can add picture to this comment but in my Solution after adding new Page I have two separate files in Page folder: *xaml, *.cs. They don't have connection like other pages (like on the screen below). But it works.
I think if I update Xamarin.Forms and I fix Duplicate Resource problem, It will work perfectly.
I had a lot of problem after updating Xamarin.Forms therefore I've returned and I've installed update of VS2017.
It would be perfect to describe how we can fix similar problems :-)

Installation process of Gzip framework in Swift

How to install the Gzip framework in swift 3.0.1 and also how to use it in swift 3 and iOS 10.
For This actually they given the following instructions like
1.Build Gzip framework.
2.In Build Phases, add Gzip.framework library to your project.
3.import Gzip in your Swift file.
4.Use in your code.
But among all steps How to implement the 1st step like building the Gzip framework.
Thanks in advance.
1.For the solution, Just download the project from the GitHub and then open it.
2.Now in the project navigator panel expand the folder named "product".
3.In that folder beneath you can see the Gzip.framework in red color, on that you right click in order to see it in the Finder.
4.From that Finder location, you just drag and drop into your project.
5.In General tab under linker and binaries you add the framework.
6.And finally import the header module like "import GZip"for required class and then implement the required things.

Accessing image from PaintCode in Swift

I'm thinking about buying PaintCode, because I wanna use it in my Swift projects. I downloaded the Trial version. The tutorials at the homepage are only for Objective C, but the explained way (http://www.paintcodeapp.com/documentation/stylekits) doesn't work with Swift.
Any ideas, how I can add the images from PaintCode to my xib file (for example to a toolbar item)? (I have a Cocoa project without Storyboard)
Paintcode works with Swift you just have to change the output.
You can choose iOS/Obj-c , OSX/iOS.
PaintCode works well with Swift. You only have to select the output as pointed by a comment before and export StyleKit to your project.

Core Data in XCode 5 - installing manually and how?

It seems like that in the new version of XCode, Core Data is something i have to install manually. The check box that used to be there when i create a new project is gone.
I've searched to the end of the internet, finding no answer that seems to work in the new version of XCode. Can someone confirm my problem, and does someone have a solution for it? Thanks in advance.
Core Data checkbox is not available in all type of projects. If you try to create an empty project, the "Use core data" checkbox is still there (this was the same in xcode 4).
You can add core data manually by following this tutorial:
http://wiresareobsolete.com/wordpress/2009/12/adding-core-data-existing-iphone-projects/
you could create a new master-detail Xcode project (check the 'use core data' checkbox when creating) and just copy the code from there.
this is particularly helpful when combined with:
http://wiresareobsolete.com/2009/12/adding-core-data-existing-iphone-projects/

Xcode3 to Xcode4 code templates

can someone tell me how to convert code templates from xcode3 to xcode4?
I am reading article at http://iphonedevelopment.blogspot.com/2009/04/opengl-es-from-ground-up-part-2-look-at.html and author offers his OpenGLES code template, but I can't get it working in new xcode4, seems it have different format. Any suggestions?
Thanks in advance :)
I had the same problem, here is a list of the changes you need to do to make your xcode 3 templates works with xcode 4 :
First you have to move your templates to a new directory :
/YourUserDirectory/Library/Developer/Xcode/Templates/File Templates
(previously it was /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates)
Then you need to :
rename your templates from "*.pbfiletemplate" to ".xctemplate"
rename class.h into ___FILEBASENAME___.h (the class.m can stay unchanged)
inside all of your files change «FILEBASENAMEASIDENTIFIER» into ___FILEBASENAMEASIDENTIFIER___
Additonaly all the key words like «FILENAME», «PROJECTNAME», need to be replaced by ___FILENAME___, ___PROJECTNAME___, etc
«OPTIONALHEADERIMPORTLINE» needs to be replaced by #import "___FILEBASENAME___.h"
Hope this helps,
Vincent
Until XCode 4 is finalised, there's probably not much point in this. However, you can side by side install XCode 3 and 4 and the XCode project format is compatible between them. Hence, I'd just install the template in XCode 3, create your new project(s), then open the results in XCode 4.

Resources