Not able to add Omnigroup framework for rtf editor in a my iPad application - iphone

I have been trying to add omnigroup framework for editing rtf files into my local iPad application. But always I am getting the errors like OmniBase/OmniBase.h, OmniFoundation/OmniFoundation.h files are not found.
I tried with different combinations of settings in the build settings of project target. But did not work. I am using Xcode version 4.2.1,
Mac OS X : 10.7 and IOS 5 Lion OS.

There's actually a lot of Xcode configuration involved in using the Omni frameworks. I recently went through the learning process myself and wrote a lengthy tutorial. My tutorial is centered around using OUIEditableFrame but it should be a good starting point for whatever part of the framework you're looking to use.
In a nutshell:
Make sure you're including Omni's Configuration directory in your project.
Add the required frameworks by adding the appropriate .xcodeproj files from Omni to your project. Many frameworks are dependent on other so all dependencies will need to be added.
Add required libraries to the Link Binary with Libraries section of the Build Phases tab.
Add required libraries to the Target Dependencies section of the Build Phases tab.
Edit your Schema. Select Build and add the required libraries.

Related

importing library project + different projects into Android Studio from Eclipse

Looks like the time has come for me to start using Android Studio, as I need some features that unfortunately have not been ported to Eclipse :(
Fortunately Android Studio is able to nearly-flawlessly import my projects, although I'm concerned if I'm doing it correctly
My Eclipse Workspace Layout is as follows:
LIB-CODEBASE is a big library project that contains most of the application beef
APP-KINDLE is a runnable project that uses the former, and provides some additional classes and activities for the KINDLE version of the app
APP-FIRETV is the same, but targeted to Amazon FireTV devices
APP-GOOGLE is the same, but targeted to Google-Play certified devices
APP-GCAST is the same, but targeted to modern devices supporting Chromecast.
When I import into Android Studio any of the APP-XXXX projects, it creates a copy of LIB-CODEBASE inside. So for each APP-XXXX project I have a full copy of LIB-CODEBASE inside their folders.
Is there an easy way to make all APP-XXXX projects to just share, link or include the LIB-CODEBASE project?
Inside a project you can refer an external module.
Just use:
Project
|__build.gradle
|__settings.gradle
|__app (application module)
|__build.gradle
In settings.gradle:
include ':app'
include ':codeBaseLib'
project(':codeBaseLib').projectDir=new File('pathLibrary')
In app/build.gradle:
dependencies {
compile project(':codeBaseLib')
}
Pay attention to codeBaseLib.
You have to use the path of the library inside the other project, not the root of the project.
Also for your APP-XXXX projects check if you can use a single project with different flavors.

In ndk-r10 release, do we need to run ndk-build if already add-native-support?

I am learning NDK environment, there is lot of tutorial/example to teach on building a simple design which using NDK/JNI.
Some say we need to run ndk-build to generate the .so file, some say no need, just link the project with "add native support". Is anyone know what is the method we should use for ndk-r10 release?
Thanks
r10 does not change the rules of the game. You still need to run ndk-build to have the**.so** files created (and copied to correct directory).
If in eclipse (to be more precise, in ADT) you added native support to your project, then eclipse will launch ndk-build as the first steel of building the project, so you do not need to launch ndk-build manually.
You can see and modify parameters to ndk-build when you open project properties in eclipse. You can see output of ndk-build in Console view in eclipse. Errors and Warnings will also be seen in Problems view.
Some people have reported that they could not add native support with latest download of the ADT bundle. Manual update often resolves this issue, search more about this on SO.

Changing the source of a static library needs clean and build in xcode 4

I have an iOS project that is built upon a framework project that we use in different iOS projects. The framework is included in the app project as an xcode project. The app project has a dependency on the framework's static library build target. (Similar to most open source libraries like three20)
The problem is that if I change something in the framework source code the static library is not rebuilt when I build&run the app project.
Doing a clean followed by a build&run the changes are compiled correctly. Doing a rebuild every time I change something in the framework is not a good fix for obvious reasons.
Is there a setting that I have to changed so that xcode is correctly identifying my framework as dirty and builds it accordingly?
I'm using xcode 4.0.2
This is a bug in xcode 4.0.2 (might be fixed in future version). From https://devforums.apple.com/thread/91711?start=25&tstart=0:
Set static libraries in project,
under Frameworks to: Relative to
Build Products
Close XCode
Edit project.pbxproj and remove all the path components of the static library so that only the filname remains, like this (the important part is "path = libLibrary.a")
A74F787413566130000D0AFC /* libLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; };
Add a script step where you set your main.m file as modified
#Force dependencies' relink
touch MyProject/main.m
You are possibly missing a dependency between your target and the static library.
In order to add a dependency:
drag/drop the static library Xcode project on your project
1b. add the library to your app frameworks (I understand that it's already there);
select your target; show the Info pane;
go to Dependencies, click on "+", then select your static lib.
These instructions are valid for Xcode 3.2.x but I hope that based on this you can easily find your way out of this with Xcode 4.
EDIT:
For Xcode 4, check this and this (the edited part of the question for a workaround).

Xcode 4 Archive Version Unspecified

I'm trying to build a release version of my iPhone app in Xcode 4 and when it finishes and launches Organizer, there is no version number, it only says "unspecified". This is preventing me from using Xcode 4's Validate and Submit features.
Any ideas on how to fix this? My version number is set in my project settings, so not sure what's causing the problem.
Go to your info.plist file and create a new property "bundle versions string, short" and provide the same version number and it will show up in organizer.
Please see this question for additional detail.
The accepted answer doesn't fully solve the problem for all projects. There are several issues that all relate to each other and I will cover them all.
Xcode 4 Project Fails to compile a static library
Related question: Xcode 4 can't locate public header files from static library dependancy
Related question: “lexical or preprocessor issue file not found ” in Xcode 4
Errors might include; missing header files, "lexical or preprocessor issue"
Solutions:
Check the "user header paths" are correct
Set "Always search user paths" to YES
Create a group call "Indexing headers" in your project and drag the headers to this group, DO NOT add to any targets when prompted.
Xcode 4 project with static library dependancy fails to create a valid archive
Related question: https://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive
Errors might include;
Missing identifier and version. "No Packager exists for the type of archive"
Solutions:
For all dependancies set "Skip Install" build setting to "Yes"
Moving any "Public" headers in Build Phases to "Project"
Thanks but I needed 3 steps to entierly solve the problem with my project framework:
set the Target Build Settings/"Skip Installation" property to "YES" for every dependency project
clear the Target Build Settings "Installation Directory" property for every projects
for every projects, move every headers from section "Build Phases/Build Settings/Copy Headers" Public/Private to Project
This can also happen if your project references a misconfigured subproject for a shared library. Go through the Xcode projects for any shared libraries your project uses and make sure the target's "Skip Install" build setting is set to "Yes". Then rebuild the archive.
I had all these issues and more with an ad-hoc distribution build.
If you have static library dependencies and create a new build configuration for your Ad-hoc distributions, be sure that the library dependencies also have a matching build configuration. Otherwise, they default to using the Debug build configuration (or whatever configuration is first, I guess) and will be linked to your build.
For emphasis, in case it's not clear in other answers: set Skip Install to NO for your main project and have a valid Installation Directory set. Otherwise, they should be set to YES and empty respectively.
Also, I set a valid icon to remove the validation warning but I'm not sure whether this was required for a working package.
After updating Xcode from 4.0 to 4.1, I found that version information was missing and was blank on the specific 'Target'. And apparently now the version number was being displayed in the build field.
Just add your application version number to the version field for the 'Target' and it will implicitly update the info.plist file.
Archive the project and now you should be able to see the version number in the Archive.
And you should be good to go.
HTH.
My problem with no version or identifier on archive was simple in the end. I have one project with two targets. I have 2 schemes, each building a single target, or so I thought. My iPad scheme had the iPad and iPhone target listed in the build targets of the scheme setup. It was as simple as that, it was building both targets and not creating a valid archive.
I was having similar problem. First I was making universal app, but in the end client wanted separate prices for iPhone and for iPad app. So I created new target in xcodeproject.
When I wanted to archive iPad target I had version unspecified problem.
Here is solution.
In project set Skip Install to NO.
When you want to archive iPhone project set Skip Install to NO in iPhone target, and Skip Install to YES in iPad target.
When you want to archive iPad project set Skip Install to YES in iPhone target, and Skip Install to NO in iPad target and it should work.

Libxml in a library for ios

I have created a cocoa touch static library that contains functionality that I want to include in several apps. This library is linked to libxml and I have the header search path /usr/include/libxml2. The library builds correctly.
I include this library in another xcode project as a reference (by dragging the library xcodeproj file into my app xcode project. I also setup the target to have the library as a direct dependency, setup the header search path to include /usr/include/libxml2, and add libxml2.dylib in the frameworks.
The problem is, when I try to build the project is has a build error:
Libxml/tree.h: No such file or directory.
I initially had this problem trying to build the library and solved it by adding the header search path and framework into the project for libxml2.
Incidentally, i have another app that uses the library but does not use libxml, it builds and runs correctly.
So the problem seems to be using libxml in both the app and a linked library.
Anybody any ideas?
Yours hopefully,
Neil.
You probably need to add the include path /usr/include/libxml2 to both the target and the project.
To add it to the target, right click on the target and select Get Info.
To add it to the project, go to the Project menu > Edit Project Settings.
In both cases, make sure you've selected Configuration: "All Configurations".