Want to share a MGTwitterEngine iPhone Xcode skeleton project? - iphone

Anyone want to share an Xcode project that has MGTwitterEngine in it? Mine won't compile. Are there certain project settings to set? I just made a stock tab bar app for iPhone and added the MGTwitterEngine files. Tons of compiler errors. What am I missing?

I had same problem. To get it to compile I added "$SDKROOT/usr/include/libxml2" to the Header Search Paths list. I also checked Recursive checkbox.

Make sure that you're adding "$SDKROOT/usr/include/libxml2" to header search paths in your Target settings and not just the Project.

I managed to get the library path right eventually. However, in the end, I got rid of the whole MGTwitterEngine thing and went with the TwitterHelper stuff that I noticed the folks from the Stanford iPhone class using. It uses the synchronous calls and it's not as full-featured. But it's lighter and I understand it better. I just use threading to counter the synchronicity. (Hey, wasn't that a song?!) Anyway, a little JSON code and it's all under control. Most of you are probably going to think I'm a noob but it just feels cleaner and easier to handle. I know there are plenty of good reasons to use MGTwitterEngine.
Bottom line is, even though I got it to work by getting the library path right, I don't even need to worry about any paths by adding the very small TwitterHelper stuff to my project. Seems more Mac-like than to have to go into too much tinkering (I can already hear the experts saying that setting paths is not too much but I absolutely detest the Project Settings dialog.)

You also need to add
libxml to Header Search Path ( should be something like /usr/library/libxml2 )

I just wanted to add something that tripped me up. You have to make sure the Target header search path is also set because it may override the default project search path headers. If you are unable to find some header files that the path is definitely pointing to correctly in your project search path headers, then this is probably the reason.

You're probably missing the libxml library. You need to add that to your linked frameworks. Here's a question that has a little more information, but that's the gist of it.
Best approach for XML parsing on the iPhone

Related

Edit an another's plugin

I have a plugin's resource codes and I want to edit. Because I want to change plugin's prefix but it isn't possible unless edit plugin. I tried edit with Eclipse but I had a lot of errors.
If you have source codes of some plugins, there meight be a problem, that they are using some api for example WorldEdit api, but you don't have it added in your project. You have to look into code and find out what they use. Then download the api and add it in Build Path - Right Click the project->Build bath->add external Jars. I hope this will help.
You may be getting errors from imports, API's, etc.
The best way to change this is to contact the developer of the plugin, who has the project themselves. It's not a good idea to change code unless you have full permission; but I will still tell you some possible ways to fix it.
Your imports may be faulty, check those.
Actually REVIEW the code yourself– Don't mess around with things you don't know what they do.
CHANGE YOUR PACKAGE NAMES (This got me before, simple mistake)
If there are comments in the code, use those to your advantage
Google your errors.
If you are new to Java, don't skip to changing code already. TRUST ME. Learn all you can before skipping to other "higher level" developer styles.
Like I said, these are vague and simple ways to fix it; the best way to have your feature implemented is to contact the developer.
*I understand that this thread is old; I'm just saying this because there are currently no answers that describe this for other Google travelers of the internet.

iPhone localization not working properly

I've been developing an app which is localized in two languages. Everything has been going good so far until today.
What happens is that if i deploy the application on device, it alternates between being localized and not being localized (in which case it just shows the localized keys and not strings). It is getting really really annoying and I haven't been able to find a solution for this. I think it has to do with my Xcode setup perhaps?
This happened earlier in another project as well, but I could never see what was the matter.
Well, right after posting this question, it struck me that the only common thing I added in both projects was the ShareKit. share kit introduces its own localizable strings and for some odd reason, the iOS alternates between ShareKit's localizable files and my own. Moving share kit localizations into my own fixed the issue.
How should such a situation be handled?
I updated the question.
How should such a situation be handled?
The library (in this case, ShareKit) is at fault. Libraries that are meant to be included in other code should not use the default file name Localizable.string. They should give their .strings file a unique name and use NSLocalizedStringFromTable() in their code.

cant link header file to xcode project

I am sure this may be super silly but I have been spending so many hours trying to figure this out and looking everywhere. I added a 3rd party library to my Xcode project and when compiling it says that the header is missing even though I dragged the entire library to my projects.
Is there a way to manually link the header to my project? What am I missing? thanks!!
Not sure if this helps. I am trying to add ShopSavvy scanner. In Finder, I have a library called ScannerKit where my .xcodeproj is. Under the ScannerKit library there is a Headers library where all the headers are.
Are you sure you checked copy when you added it in?
Try deleting it, then importing it again, making sure the box is checked.
Sometimes a library may have the header outside of the main library, for example I know TestFlightApp do this, TestFlightApp.h is outside the main library.
What library are you trying to use?
This has often happened to me, and I have found that sometimes it depends where in your project the header is located. If you have a supporting files folder, I would put it there. Really anywhere inside the classes folder. I'm not really sure why this problem occurs, though.

Is it possible to hide the source codes of .m files and build project using xcodebuild

I have created a Mac app that can generate iphone ebook app project source codes.
I know I can using xcodebuild to build the project to get the release binary file.
Is it possible to hide the source codes of .m files(maybe store in memory) and build project using xcodebuild?
Welcome any comment
Thanks
Marc
It sounds to me like you are attempting to generate source code for others to use, but then hide it so they cannot see whats been generated. Basically not possible. You could generate obfuscated code which would make it harder to read, but not impossible.
Realistically what you are trying to do is generate template code for others to use. If you don't want them to be able to see it, then you presumably don't want them modifying it. The easiest answer is to simple not do it. Instead, create a compile static framework containing your code and IP, and then only generate templates which makes calls to your framework. Thus your code is protected.
Your question lives on the edge of being programming related, and I'm not exactly sure what problem you're trying to solve.
However, you can create a RAM disk, store your project there and run xcodebuild against that. Just be aware that you're not really protecting the .m files so much as limiting how long they are easily visible.

Three20 dependency problem

I checked out the three20 source and was trying to follow this
guide to build an iphone app using the framework. Within this guide, Templates are used which I checked out too. They ought to compile properly, but I get the following error:
File /Users/myUser/programming/three20/src/build/Debug-iphonesimulator/libThree20.a depends on itself. This target might include its own product.
Did anyone ever solve that issue? I read it was about including something you want to create which is not possible. Anyway any solution I found did not help here.
I actually did not even change anything! Any ideas?
Okay I fixed this by opening the three20.xcodeproj and unchecking the target box for libThree20.a (while leaving it checked in my project that is using three20).
This has at least got me building and running, will report if any problems come up later.