Can't make deb files work using Theos. Manually copying the dylib - works - iphone

I'm having a really weird problem. I've developed my first tweak for the iPhone (intended for Cydia distribution). I'm all done developing the tweak and everything works, but I'm having trouble packing it into a deb file. Typing make and manually copying the dylib into Library/MobileSubstrate/DynamicLibraries and the preference file into Library/PreferenceLoader/Preferences - everything works just fine, but when I type make package, my tweak doesn't work at all. The files are copied to their right folders, I can see the settings in the Settings.app, but the dylib won't run, I can't even see my NSLog in the console. I tried using dpkg -b, and even http://www.myrepospace.com/iDeb/ but to no avail.
What can I do?
Thanks!

I'm the author of Theos, and you posted this question in the IRC channel and then summarily left.
I would like to help you, but I need to look at the package that Theos creates.
Barring the usual issues, since it IS a tweak, please make sure to respring after you install the package, as dpkg will not do that for you.
You can find me in #theos (irc.saurik.com) as DHowett.

Related

CoreServices.h file not found in portaudio build on macOS 10.11 Xcode 8.0

This is called though cocoa.h and foundation.h, then NSURLError.h. Not sure why this compiler error just came up when I added portaudio and some other needed frameworks. The error first comes from some existing code. Indeed, there is no CoreServices/CoreServices.h anywhere on the whole system. Do I need to update Xcode?
I found an Apple help answer that said "Those are not makefile directives. How are you trying to build it? Most projects like this come with "configure" scripts that you just need to run from the command line. The only thing you need from Xcode are the Command Line Tools." I don't know what this means or how to do this.
I did run the port audio/configure terminal script, but saw nothing about CoreServices.h being generated. Where does this need to come from?
Thanks.
I further note that in the CoreServices frameworks directory associated with the Xcode project, there is a terminal file called "CoreServices" that when run, generates the error "CoreServices.framework/Versions/A/CoreServices: cannot execute binary file" . What could it be missing?
It's hard to answer your question in this specific case but:
I believe that CoreServices.h can be found at /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h, is it not the case on your machine? If not, you might have to re-install Xcode
To install PortAudio, you can also use brew with the command brew install portaudio and then link your project with its headers and libs (/usr/local/Cellar/portaudio/19.6.0/include and /usr/local/Cellar/portaudio/19.6.0/lib) in your Xcode project (under the tab Build Phases > Link Binary with Libraries). That might be the easiest option.

How to get useful files from a github package?

Although I've been using github for a while, but every now and then this problem pops up. From a github project, how do I know which filed/folders are actually what I need?(Generally, I don't need those files that are only used by developers)
Take this project (https://github.com/mupchrch/split-diff) for example, I am trying to install this plugin into my Atom editor so I can compare two files, but I find very little is said about how and which files are to be installed/copied, and to where. This "lack" of information happens to many many github projects I stumbled with. Some indicates npm install xxx which I am OK with, some says nothing at all, like the above example. So I conclude I must have missed some very important information regarding how to use github package, something that goes without saying.
Can anyone help me or give me any hint?
I noticed that here is a package.json file, which must indicate this package can be installed by npm. But I need more specific instructions:
Do I need to download all the files and folders? To where? And where do I launch npm install? Or as far as I know, Atom editor has its own install command (apm is it?), where do I run this apm?

How to run the PJSIP in xcode?

I'm new with XCode and still trying to understand objective-C. I'm using xcode 4.3.2, and I have to create an app that integrates with PJSIP.
I found this link. I am still confused about that link, because the article said that we must have installed the command line tool. But the command line tool is already installed in my XCode. How can i use it?
Do I need to create a view base application? how can I run the command line tool like the link says?
The command line tools allow you to compile "traditional UNIX programs" from source, generally using make. If you are using Xcode to create your projects then you don't even need them installed.
EDIT OK you have edited your question, stating the real issue you are facing; You don't know how to use the PJSIP package you have installed. The link you reference is about building PJSIP, not using it, so you can still forget about the command line and concentrate on how to configure your Xcode project to use PJSIP. This will require setting the header search paths and library search paths to find the header files and library file, in order to compile and link against it. Hopefully it's a static library as that will be easier to use; if it's a dynamic library or framework then you have your work cut-out as that's much harder to use.
In newer XCode (4.3 or above) you might have to install command line tools since it has been made optional. Open XCode and go to XCode->Preferences
Open the Downloads panel and click on "Components". If Command Line Tools are not installed already, you will get an option to install them from here.
Do so and you are set.
I done with it by myself. if you face the same problem, you can refer to this link, I already tried and run it. It works both on simulator and device. thanks.

What is a makefile in iPhone development environment?

i have been developing iPhone apps for a few months now, i have gone through some examples of some iphone open source apps which have "makeFile" file in them. Just like cydia has got here
Cydia Source Code
i googled for it but couldnt get any satisfactory explanation of it. All explanations are somewhat complex.
Can somebody please explain me in simple language what this makefile is?
In Xcode, you select "Build" from the menu and it compiles your project. A Makefile does the same thing, except from the command line. A Makefile contains information about which files need to be rebuilt if you change a certain file.
See http://en.wikipedia.org/wiki/Makefile
Makefiles are nice because they work on a very wide variety of systems.
A make file is like an executable in windows. It has a preset list of commands to run in order to "make" your application work and it can manage your dependencies so you don't have to constantly respecify them. The alternative to a make file is running the application in a console.
The problem with running applications in a command line is that you may need to repeatedly specify all the project parameters whenever you want to run an application. Another downside to running an application from the command line is that you have to open the terminal/dos in order to run your application. Most end users of you application are not going to want to have to do this. Having a makefile makes starting up your application as easy as clicking on a makefile.
The main difference between a makefile and other files like .exe is they are platform independant and can be run in multiple operating systems.

TiMidity: need help compiling this library for the iPhone

I'm using a powerful library called TiMidity, which I'm sure many iPhone developers have used already used. This is a platform-independent set of programs, but during compile-time in XCode (gcc compiler), there are hundreds of dependency errors that come up.
If anyone here has used TiMidity before for their apps, your advice will be gold.
Thanks everyone,
Phil.
I usually use this script to compile static libraries for the iPhone, but TiMidity++ isn't a library and the API's it uses to output sound on OS X aren't available on the iPhone OS.
Here's what I've gotten so far:
Save build_for_iphoneos somewhere in your path and +x it
cd to the extractd TiMidity++ folder
build_for_iphoneos simulator
This will fail
Copy timidity/newton_tables.c somewhere safe.
make clean
build_for_iphoneos device
Manually edit timidity/makefile and remove all references to DAU_DARWIN and darwin_a
Copy newton_tables.c back into the timidity subfolder and touch it
make
You should now have a timidity binary that can be used from the shell on a jailbroken device (after signed via ldid of course) and object files you can include in your project.
Note: TiMidity++ is GPL, so you will have to release your application under that license if you use any part of it. Also, this is really messy because TiMidity++ wasn't designed to be used this way, all of the darwin integration is broken on iPhone OS, and automake confuses me.
You have to remove AU_DARWIN from ./Makefile as well as timidity/Makefile.