I recently discovered that the webkit model will not be supported by Apple in the latest release of Lion and Safari, and that everyone is migrating to the Firebreath project to use NPAPI.
I have a Cocoa base application that references the following built-in frameworks:
- Coregraphics
- CoreData li>
- Iokit
- PFEventTaps (this is a 3-way structure: Pfiddlesoft.com)
I have never used PlugIns, so for me this is a little new, I started with a MAC tutorial written by Richard Batemant, and after I follow the recommendations, I end the firebreath project template for my personal project. The next step I took was to simply put all my Objective-C classes in the Source Files folder, adding a link to 4 frameworks, and finally I added new public methods that I need to open in the MyProjectPluinApi.h plugin, for example (registerMethod ("MyMethod", make_method (this, and WilmerPlugInAPI :: MyMethod));
When I create a firebreath project, I get many compilation errors, one of which is very repetitive: NSString was not declared in this scope. The error points to NSObjCRuntime.h
So far, I cannot get this assembly successfully with XCODE 3.2.6
what's wrong here? Do I need to change all my code to execute CPP style in this template project? Or can I somehow tie my framework? Is there any pattern that I can see?
LEARN MORE: November 7, 2011: I tried to check out a simple project:
- First I create a testOfFB project
- it is generated in / users / Me / Firebreath -dev / build / projects / testofFB
- then I change the class testFBApi.cpp and rename it to testFBApi.mm.
- I wrote an Objective-C class called testMath.m and renamed it to testMath.mm
Add the Add method with the signature:
-(long) Add:(long)a:(long)b:(long)c;
Finally, I modify the testFBApi.mm file as follows:
registerMethod("add", make_method(this, &testFBAPI::add ));
In the implementation of the add method, I create an instance of the method of the Objective-C class "add" to test the call to my Objective-C method. I made inclusions, and I changed the file /Mac/projectDef.cmake this way:
target_link_libraries(${PROJECT_NAME} ${PLUGIN_INTERNAL_DEPS} ${Cocoa.framework} // added line ${Foundation.framework} //added line )
I run the prepmac.sh script and then create an xcode solution, and the same errors appear, and some others like testFBApi were not declared.
source share