How to add Core Plot as static library to Mac app? - macos

I am working on a Mac App project using Xcode 5.0.2. Currently Core Plot 1.1 is integrated in the project. I did this following the instructions on the Core Plot project page: The Core Plot source code is integrated in my project and compiles alongside with my app.
Since I switched from Xcode 4 to 5 I have trouble starting my app. The receipt validation code that runs at startup cannot verify the apps receipt any more. The console shows a hint that the app is not signed properly:
storeagent[329]: Unsigned app (/Users/MyUser/Library/Developer/Xcode/DerivedData/MyApp-gvgullbzaekzujejuhfssrnmmmit/Build/Products/Debug/MyApp.app).
I found a hint that there is a problem signing nested bundles like Core Plot when using Xcode 5 on Mavericks.
Because of this I would like to integrate Core Plot as static library instead of as nested bundle. However the instructions on the Core Plot page (see link above) only describes this option for iOS projects.
Is it possible to use Core Plot as static library in an Mac App project as well? What would be the necessary steps to do this?

You have probably figured out a way to do this already, but as I was struggling with the same thing myself and the steps, while simple, don't seem to be explained anywhere I thought I would do so as an answer here. As you mentioned, this is not explained on the CorePlot Mac Setup Page, so it may cause complications or become obsolete down the road, but it is working for me as of right now. Steps are:
Download the latest CorePlot release
Copy the file Binaries/MacOS/CorePlot.framework into your project (drag and drop or by using "Add files to ..."
Make sure you enable "Copy items into destination group's folder (if needed)"
Make sure the new framework is added to the applications target membership
Set up the framework to be copied during build
Under Build Phases, add a Copy Files phase if there is none
Change the destination to "frameworks"
Drag the CorePlot.framework file from the Project Navigator into the file list

Related

Compiling Xcode project from zipped open-source GitHub download

Possibly basic question but I'm not sure where to begin for an answer. I am very much a newbie to Xcode, Cocoa, Swift and Objective-C.
I'm interested in developing an open-source Markdown editor for the Mac that will build from existing open-source code. I have gone to GitHub to download the source code for two existing projects, MacDown and WriteDown! For both projects I download the project .zip file (and am happy that the button to do so is now easily available), and extract the .zip file's contents on my hard drive. In each project there is an .xcodeproj file which I open up in Xcode... and I see tons of errors, mostly because of things that are missing, so I cannot build and run them.
With WriteDown I see "missing base SDK" (and get a corresponding error when I try to run it), and many other files missing (frameworks, products, and "pods"). With MacDown I get a lot of errors mentioning missing pod files.
If it were just the one project that gave me errors I would assume this was something specific to that project, but since they're both giving me errors it sure seems like I'm doing something wrong in general. Should I be downloading something other than the downloadable zip? Downloading extra frameworks? Taking an extra step in between?
I am using Xcode 6.1.1 on OS X 10.9.5, which MacDown seems to indicate it's compatible with.
Few things:
1) If an .xcworkspace is available, you should open that in lieu of the .xcproj. The workspace contains multiple projects that are important for the building of the application.
2)
Check out this answer for "Missing Base SDK" XCODE Base SDK Missing
3) Go to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs and check to make sure you have the proper system SDKs available
4) It looks like those projects also require CocoaPods, a OS X Dependency Manager. You need to download the "pods" AKA 3rd party dependencies in order to build the application

Having Problems Adding core plot to OS X project

Hello I have developed for couple months my OS X project that includes a corePlot frameWork in debug everything works fine , the project compiles and runs flawlessly ,
however when I did product->archive->export as mac app I have received the .app file as needed but when I tried to run it the application is just never opens :-O
(I can see in doc that it tries to open and dies immediately).
I tried to discover what is wrong there , so I opened the .app context file and found an exe that said to me that it can't find the corePlot framework.
dyld: Library not loaded: #loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot
It is sad i tried to re add the corePlot to my project several times, but the app doesn't find it :(
(I have done the corePlot integration according to a tutorial.
After playing with it , I found that I had to create and copy Frameworks folder inside the .app's context . However I have done it manually , how do I make Xcode to manage it for me ?
In your app target in the Xcode project, make sure you have a "Copy Frameworks" build phase and that Core Plot is one of the frameworks to copy.

How to enable Intelligent code completion in EmbedXCode

I have successfully installed [EmbedXcode][1] on my mac.
Steps:
Downloaded EmbedXcode
Extracted and installed
Dragged to the Applications folder.
Note: Xcode 5 was installed on my mac even before i downloaded and installed ExbedXcode.
Note: Arduino was already installed before i downloaded and installed ExbedXcode.
Then i created a new project.
New ---> Project ---> OS X ---> embed xcode ---> embedXcode Sketch
Then i gave the name and selected the platform which was Lenardo.
Now, i build my project, and there was no errors found.
But, still i don't see the code change colour or Intelligent code completion being activated. How can i make this to work.
A Screen shot of my project as follows:
Firstly change the code the 'Type' in the property window on the right hand side to 'C++ source'
Then for even more code sense, get the file to successfully #include "Arduino.h"
Im struggling on that step, but have the first bit sorted………..
Sorted that, I've found that dragging arduino.h to root project directory helped. (Is there a limit to directory depth searched for autocomplete??)
Release 131 improves reference indexing for code-sense.
You need to launch a first compilation in order to have the main sketch declared as C++ code.
For more details, please refer to chapter 2 Create a New Project section 2 Prepare the Project of the User Manual (e-book, PDF).
Download embedXcode
I suggest using the contact form or the OneDesk portal.

How to go about making audio units since Xcode 4.3?

I noticed since Xcode 4.3, the audio unit templates are gone and the audio unit headers and helper apps are a separate download from Apple's website.
I have no idea what to do with the downloaded folder... I tried putting AU Lab And HALLab in Xcode.app/Applications and they don't show up in the new developer tools menu; I tried placing the CoreAudio folder with the headers in Xcode.app/Developer and even recreating /Developer in my root and Xcode doesn't see AUEffectBase.h anywhere (unless I actually add the file).
I saw someone's post on how to come up with a new from-scratch template but I won't even go there yet since Xcode doesn't even find the headers right now.
Any ideas on how to go about making it all work again?
And about the templates.. I can forget about them right, meaning, the ones we used to have from Apple?
Thanks!
If they are in your project, and referenced by Xcode, then you will have to update those project references. Xcode may refer to them as absolute path, relative to project, relative to SDK and a few others.
At this point, you might consider creating a static library for these dependencies, if you have multiple AUs to build out. Then you just create a static lib to link to, rather than managing a handful of sources per AU.
Templates: It appears they have been removed (temporary? permanent? idk). I moved off distributed template dependence years ago. Perhaps you can scan or hit the CA-API list and see if a dev has one handy.

How do I build frameworks in Xcode?

I'm trying to use the GData framework, so I downloaded it and it came as an Xcode project so I assumed I needed to build it. So I opened it up and and clicked run and it compiled fine, but where do I go to access the .framework it created? I'm new to frameworks and have only been using xcode for a month or two so you'll have to excuse my lack of knowledge about it.
The documentation will help you
Anyway, by default the target is GDataUnitTest, just change it to GDataFramework. Once you compile it you will find the framework in the folder of the XCode Project called target.

Resources