Shared library and localizable.strings - objective-c

I have created a shared library using Xcode 4.2 and objective c. My library includes a strings resource file that contains error messages. I then created a test application that loads and uses my library. I can't get to the string resource unless I manually copy the localizable.strings file into my test application project. Is there a way to access the resources contained in a library directly without copying to resource file?

Related

Why are some .h files missing when compiling wbrtc_ios as a framework?

I am new to WebRTC stuff. I cloned the webrtc_ios main branch, and I built the framework as instructed here with the python script for arm64. When I add this to my Xcode project as a framework, everything is fine. Project builds, I can import files using <WebRTC/...> syntax.
However, I need to use RTCMTLRendeder.h file. Building a framework with python script leaves some of the header files out. (When I take a look at WebRTC.h inside the built framework, I can see that this file is missing) How can I include all header files that actually exist inside /webrtc_ios/src/sdk/objc/components folder while building the framework? I can see RTCMTLRenderer.h and .mm files are in that folder before using the build script. When turned into a framework those files don't exist inside the framework anymore. Why? And is there any other way to actually copy those files into the project as well?
Turns out you need to create your own, long renderer class which does not inherit from RTCMTLRenderer at all if you want to render on Metal view manually in a Swift/ObjC hybrid project (at least this is how I solved it). That class does whatever RTCMTLRenderer does, and grabs pixel buffers from RTCVideoTrack through an RTCVideoView.

Generate HeaderCode From GeneratedCode in Xcode

We have gone through the sybase online tutuorial for SUP2.0. In that
Sybase Unwired Platform 2.0 > Developer Guide for iOS > Development Task Flows > Developing Applications in the Xcode IDE>Generating HeaderDoc from GeneratedCode.
Generating HeaderDoc from Generated Code
***Once you have generated Objective-C code for your mobile business objects, you can generate
HeaderDoc (HTML reference information) on the Mac from the generated code. HeaderDoc
provides reference information for the MBOs you have designed. The HeaderDoc will help
you to programmatically bind your device application to the generated code.
Navigate to the directory containing the generated code that was copied over from the
Eclipse environment.
Run:
headerdoc2html –o GeneratedDocDir GeneratedCodeDir
gatherheaderdoc GeneratedDocDir
You can open the file OutputDir/masterTOC.html in a Web browser to see the
interlinked sets of documentation.*
we have followed the step mentioned in that link. and four files are generating in the generated code folder but all the files is having zero bytes size. Can you help by saying wher the error have occured.
we have set the path as
desktop/mac_ios/importing_lib_code through the terminal and give the scripts mentioned in the tutorial.
importing_lib_code is having subfolders src which contains two subfolders common and folder holding .m files.
adn second one is includes folder with two subfolder containing the .h files of corresponding file.

Unable to find nib named error when trying to load nib from within a framework

I've got a 'Main app' and a 'Helper app' (sandboxed, if that matters) that share a private framework including some resources, nib files, sound files etc.
The framework gets called and used by both apps without issues. However from within in the Framework code I have a NSViewController that loads a nib file which is included in its resource folder. This seems to work as long as its called by the 'Main app'. Doing the same with the Helper app (a login item) however does not work and fails with an "Unable to find nib named" error.
The actual 'Framework' is copied to the Main app's 'Frameworks' directory and I use a #rpath in the helper app to find the framework: #executable_path/../../../../Frameworks
This setup seems to work just fine however at runtime it seems the frameworks code tries to find the named Resource under the helper app's Resource folder and not under the Framework's resource folder. Is there a setting or some flag that I can set in xcode to make the framework's always look under the exact path where the framework's executable/library is installed?
It seems the only solution is to copy the framework to the 'Helper' app as well. Resources otherwise do not get loaded if the framework was just a symbolic link to the actual framework placed inside the main app.
What you can do is making your Framework dynamic or shared like described here Dynamic Library Programming Topics
Though it is a bit of a complex process, but a very nice feature.
What else can help you?
Perhaps editing the Library Search Paths or the Framework Search Paths under your Build Settings in Xcode. there you can specify additional search paths to look for.
Even though, I would not copy the Framework to the Main app's dir. I would leave it in one place on your disk, add them to your project (Main and helper) and add the specified search path.
By the way: How is your framework implemented? Is it a folder, is it compiled, or is it only code files?

OData and Objective C

I am trying to develop an ipad app that would interact with SQL server.Simple. So, i used WCF web service. I am getting the data there as xml. now, i want to develop an objective c client that would consume it. So, i used the odatagen tool to generate proxy. I did that and i got 2 files xyz.h and xyz.m. No more files. Now i have included them in my project. But in the xyz.h file i have error that says "import "OdataObject.h" file not found. I have done the header search path and library search path settings. What is missing.?
You have to include in your project the files that you should have in the OData4ObjC repository you cloned from github (or codeplex):
the .a library located in the /framework/bin/odatalib/lib/-yourplatform-/-yourversion-
all the files located in the /framework/bin/odatalib/include folder

adding jpegs to vb.net application

i am using itextsharp and creating a PDF with images.
currently the images i am using in the application are on my desktop, but i will need to make an installation file that will put the images in a specified directory on the users computer and be able to call them from the specific directory.
how do i include pictures with my build?
how do i reference the pictures? currently i am using:
Dim jpeg3 As Image = Image.GetInstance(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\2.jpg")
How and where do you add the pictures?
If you simply added them to the project as if they were code files (using "add existing item"), then check the Properties for the file in the solution explorer (Build Action, and Copy To Output Directory are useful), and also the Application Files button/window (under the project settings -> Publish). This is useful for distributing the files along with the application (for both debug and release), deployed in a specific sub-directory.
If you added the files to the project's resource file, you can use them using the My.Resources namespace.