Core Data in XCode 5 - installing manually and how? - xcode

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/

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 :-)

Duplicated Xcode project issue

I've duplicated my Xcode project - basically I'm creating an app with similar functionality but with different content. I duplicated the main folder and updated the names in the new project for the new app following a guide on Youtube that was on another thread, but when I updated the background of the storyboard for the new app, I've now seen it has changed the storyboard of the original app, so it must be using the same story file, or be linked somehow.
Please can someone suggest what I might have done wrong, or what I need to do when duplicating the project to avoid the same story file being used.
Please check the "Full path" of your file like shown below. Make also sure, that all your other files are linked correctly.

Xcode 5 Link Document Type

Am following tutorial at
http://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app
To link a document type to my application so that my application is responsible for opening up of that document.
XCode 5 works very different... Under your Target, Info tab is a "Document Types" line... am not sure how to use this, is there a sample for me?
Thanks
I'm sure you've either figured this out or moved on, but a little tip for most of these tutorials: you can often download the completed code from the website. I did so, and loaded it up in Xcode 5.0, and it works fine. Here's a screenshot of the plist entries (that's under Resources/ScaryBugs-Info.plist) for Document and Export:
Another way to change the Document types in Xcode is via the Project Info (select the project in the Navigator, then the target in the projects and targets list, then the info tab). Here's a screenshot of what that stuff looked like for me:
Here's another very helpful link straight from apple support. Watch the screenshot they have under Example and literally replicate everything from this screenshot and just change their custom extension from catinfo to pdf, ttf, xml or whatever you like
NOTE: Make sure you test this on actual iphone / ipad and not on simulator.
https://developer.apple.com/library/ios/qa/qa1587/_index.html

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

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.

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