iPhone PhoneGap restKit / jsonkit duplicate symbols - ios

I was ask to take a existing website make it PhoneGap so all went well I converted it to backbone included phonecap.js for the more funky stuff. Then I was ask to create a AR view so I told the people I will do this in native rather because I am not sure it will be possible in PhoneGap or it will just take to long.
So I created a separate project where I did the AR component tested it and it worked fine. It uses RestKit to download data and then in camerapreview shows little bubbles representing data.
This week my job was to combine them so you click a button in PhoneGap and then it opens the native viewcontroller. Again all went well. I created the plug-in it calls the function so next step was to copy all the AR logic over and that where all hell broke loose.
I keep on getting duplicate symbols a whole lot of them I spend 6-7 hours trying to solve it but nothing I went thru 100 of websites with different solutions and none worked.
So 3 o'clock I decide f* restkit let me use just jsonkit and do the mapping myself but the same thing happened duplicate symbols and each time it cordova / PhoneGap and then the library.
Am i doing something wrong or is cordova just no good?

Found the problem. Basically my application and the library I used RESTKit/JSONKit used the same library. So to fix you remove the library that's conflicting either from yours or from the library most cases just remove yours. And then reference the libraries library .h file if you removed yours.

Related

Transferring Xcode Project from one computer to another brings random errors?

I have a Xcode project I got from another developer. Initially when I opened it it has a bunch of errors (most of which were un-updated frameworks). I got it to work after a while and I fixed it. I want pass it back to the manager since I'm leaving uni in a few months. I copied it over to my friends Mac to see what would happen if I just took the project and all it's folders and made it a zipfile. It didn't work for some reason. It gave me an error:
error: using bridging headers with framework targets is unsupported
But why did that come up? I mean it's the same code on the slightly different versions of Xcode (13.1 versos 14.1) but I doubt there was a massive change between the two that would cause this. I want to be able to pass these app later in the future without having to care about this stuff. I made a GitHub (link below) would cloning that work? Also the laptop I chose was just a fresh reset. Would it be due to not having coco-pods installed?
I feel like I could go through and fix it all on that laptop and document that but then I'm afraid that every time I put it on a new one it would come up with random errors every single time making my documentation moot.
https://github.com/AbdullahMSaid/SonicExperiment-Works
With big help this was Fixed.
Things that fixed it.
Having the correct version of Xcode
Turning everything from absolute path to relative
Lots of other code fixes. But those are my project specific.
You don't need bridging headers in framework. Use should have something like "YourFramework.h" where you can import your .h files.

More FacebookSDK/Facebook.h issues - file not found

Alright, guys. I'm going freakin' crazy with this one. It is utterly ridiculous that the FacebookSDK causes so many issues. I know there are a couple questions on here regarding this issue, but they all seem to be outdated.
I pulled my Xcode project onto a new computer, and can't build it because I get the "FacebookSDK/FacebookSDK.h" file not found error. There are answers such as This one, but I've followed the steps in every single answer and haven't found one that works. I've just made a fresh pull from my working project from the original machine to the new one. I'll take some screenshots showing my current settings for various fields mentioned in other answers, and maybe I Just have something wonky that is interfering.
Here are the contents of the SDK that I just downloaded
Here are the contents of my Xcode project folder. There isn't anything else Facebook in here.
Here are the frameworks inside my Frameworks group and inside the Link Binary with Libraries section of Build Phases
There are a couple frameworks that are red, and that's OK for now. They were not in the repo, and are instead referenced from Documents or Downloads, and they played nice when I moved the files over and linked them. I just reset my repo to when I pulled it to make sure I didn't have anything from weird stuff I tried that prevents a proper solution from working.
Framework search paths. You can also see that my library search paths is empty. I labeled the stuff I wanted to hide, as it was identifying information
For some reason, my Documents for the new machine is already under the framework search paths. I did not add this myself.
Any ideas on what I can try? This is endlessly frustrating. I've wasted an entire day of development on trying to get Facebooks SDK re-integrated on a new machine.
I was also face the same problem every time I got the checkout for new version from svn.What I did was just removed the Facebook SDK and add again from the backup.It taken me out that time.Please try this might be it works for you.

Determining if iOS frameworks are actually needed

I am rebuilding an App and at the same time paring it down of unnecessary code and it contains "required frameworks" that I think were left over from copying a previous app shell for building this app. How can I determine if a framework is actually needed. I thought I could just leave them off and build the app and then add them as required to let it build successfully but in the past that has not worked well to my surprise as I have built and tested a previous App without any additional frameworks added and the App built and ran just fine on simulators and actually devices only to find out at submission time I forgot to add the frameworks before submitting it.
I am trying to be proactive and only put in the ones I need. Some, like the MediaPlayer are definitely not needed and I can eliminate them already but some are harder to determine.
Curious if there was an easy way to figure this out.

Creating an iOS library or framework using libgdx (roboVM)

Is it possible to create an iOS library or framework using libgdx (RoboVM) that can be imported into Xcode?
Background:
One of my colleagues has created a 3D visualisation app as a libgdx project for android and windows desktop. It can be compiled to run on iOS using RoboVM. However, I would like to wrap extra native user interface elements around it using Xcode. I know its possible to build the user interface programmatically via RoboVM but I would be keen to investigate if its possible to bring the existing work into Xcode. I don't need to edit the 3D visualisation component but add extra GUI elements around the 3D Vis window. I thought compiling the libgdx (RoboVM) code to a framework or library might be a solution that could be imported?!
Yes you can do it.
All you need to create a method, say initRoboVM(), This will be called by your code when you want to initialize libgdx. You'll need to pass the app path in, which you can hardcode when you're testing.
initRoboVM() will need some modifications, namely it should not call your Java app's main method, well, at least, that's what well behaving libraries should not do IMO. It should also not call rvmShutdown.
You can get further information from here
Thanks :)
I asked the RoboVM team directly. Their answer: It's not a native function, but it certainly can be done.
The complete message...
Hi,
Sorry for the late reply. This use case is not something we're going
to do now. It is possible though if you're prepared to do some
patching of RoboVM. Search the RoboVM Google Group and you should find
others who have managed to get this working.
We get this request every know and then so we will add support for
this eventually.
Regards, Niklas

write an iOS 5.1 app that uses a web service

I am fairly new to iOS programming and I'm trying to make an iOS 5.1 app that communicates with a server to receive information from a database. I got the server returning the needed information from the database by following this tutorial:
http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app
But then I tried to follow a the other half of the tutorial by the same guy:
http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
In this one we use JSON, ASIHTTPRequest and MBProgressHUD, but I get a lot of errors when I run this because ASIHTTPRequest is no longer supported in iOS 5.1.
Can anyone point me in the right direction here? I you can show me another tutorial that works for iOS 5.1 that would be great. I have looked but I can't find any.
Thanks
ASIHTTPRequest is most likely returning errors in your iOS 5.1 app because you're using ARC. ASIHTTPRequest wasn't written in ARC, which is why it's throwing tons of errors. But there's an easy workaround:
In Xcode 4's groups and files pane, select your project file at the top of the list.
Select your target towards the left hand panel.
You should now see a list of all the implementation (.m) files referenced and compiled throughout the course of the program.
Double click the implementation files for ASIHTTPRequest and add the following linker flag: -fno-objc-arc. This linker flag acts as a crossbridge between the old non-ARC files and your ARC-based project.
Although there may be residual warnings left, this trick should remove all other error messages associated with ASIHTTPRequest.
When I followed that same tutorial I got a lot of errors. and the build kept failing until I reliased it was because libz.1.2.3.dylib wasnt there. If you go to Build Phases, remove that from the list and add libz.1.2.5.dylib all mine worked first and I got the app working fully :)

Resources