Error in stl_vector when updating to xcode 4.2 - iphone

I'm trying to update an app of mine to Xcode 4.2, and now it's giving me a bunch of errors in stl_vector.h, a library that is part of the built in libraries. Here is a picture of the error:
Any ideas what I'm doing wrong? I can't figure out how to fix this. I don't have permission to even edit the function that is throwing errors since it is built in.

A slight guess, since you don't give us enough information, but if OBJMaterial etc are Objective-C classes, you can't pass them by value, i.e. you always work with pointers.

Related

Do Unity functions that are obsolete still work.

So I am converting a project from Unity 4.x to 5.x and there are a number of functions that the Unity compiler is warning me that are no longer supported or are obsolete.
My question is do these functions still work? (even though they are marked as obsolete)
I know at some point they need to be updated to the newer API but for the moment I just need to fix the bugs so that the game works. Are these functions still usable? or are they potentially the source of runtime bugs?
Thanks
All obsolete functions has been replaced with new functions. So should take a backup and update your project. Go to Assets->Run API Updater, if your project in not getting updated automatically. Dont worry unity will take care of most of the things.
Yes, it's still work ! They just only warning it.
But i suggest you should change for better result, Unity 5 will update you code from old project, then you should change it following warning, just replace
using "xxxx" instead.
to the current context.

Missing Facebook SDK for Parse using Swift

This question is a lot like this one: Parse for iOS: Errors when trying to run the app except that I am using Swift in XCode Beta 4.
Essentially, when using the Parse library my app build fails, noting that I need resources from the FacebookSDK. Downloading the SDK works, but as this question on Parse's website: https://parse.com/questions/using-the-parse-ios-sdk-without-including-the-facebook-sdk notes, it adds over 1MB that I don't use.
The former question lists "Build Settings > Other Linker Flags > remove -ObjC" as a solution, but I can't figure out how to do that in this XCode version. Any help/ other solutions?
(FYI, Another solution on that page suggests creating a FBMissingSymbols.m file, but that gives me other errors because of trying to use Objective C)
A very simple solution for this is to use the CocoaPods dependency manager. If you need help setting it up, let me know. If you'd rather not, I can gladly help you get Parse set up, as I've been using it with Swift.

Building pure Swift Cocoa Touch Framework

I'm exploring Swift with Xcode-6 and so far so good although I think the new collections need a little bit of work as I've managed to break the compiler a few times.
Problem is I'm now stuck trying to create the framework package to then use in another project. The project builds without issue and all tests pass successfully. When I go to create Archive (which I assume is what is required) I receive the error:
:0: error: underlying Objective-C module 'Sample' not found
Now I assume this has something to do with the contents of my Sample.h which tells me
// In this header, you should import all the public headers of your framework using statements like #import <Sample/PublicHeader.h>
which is fine except I have only used swift enums, structs and classes for this framework so therefore no .h files exist.
Can anyone shed some light on this one as I can't find any documentation available yet?
EDIT (7/27/2018)
The information in the answer below may no longer be accurate. Your mileage may vary.
I sat down with an engineer and asked this exact question. This was their response:
Xcode 6 does not support building distributable Swift frameworks at this time and that Apple likely won't build this functionality into Xcode until its advantageous for them to do so. Right now, Frameworks are meant to be embedded in your app's project, rather than distributed. If you watch any of the session videos or see the sample projects, this is always the arrangement. Another reason is that Swift is very new and likely to change. Thus your Swift-based framework is not guaranteed to work on the platform you originally built it on.
Slight Update
The engineer mentioned that it's not impossible to make a framework for distribution, just that it's not supported.
I was able to get past the error by going to the target for the framework and on the Build Phases tab under Headers, remove the MyFramework.h file
However I was getting the "Underlying Objective-C module not found" error when I was using a framework to share code between a containing app and an app extension, both of which were pure Swift.
Assuming you are creating a truly pure Swift module, you must disable the Objective-C Compatibility Header and any generated interface headers so the compiler doesn't go off assuming it can find an Objective-C module for the framework.
Do Not remove your public framework header. You'll get a module-map warning at link time if you do.
You might find this useful: Creation of pure swift module
In short: it's possible to make static framework, but there is one issue: it doesn't work in end user' project if "ProjectName-Swift.h" header included.
But, it works fine if you use only swift.
I think it's a bug in XCode 6, or that Apple does not allow archiving the Framework from XCode while in beta.
If you compile to profile XCode generates the framework correctly. (See the Release folder created in DerivedData)

Linking error using DDMathParser (iOS 5, Xcode 4.2)

I try to add DDMathParser library to my project, but i get two linking errors. I'm a newbie in Objective-C programming, and it's still tricky for me.
Below there is a snapshot of the errors i get:
What should i do?
I also tried CGMathParser but i didn't manage to solve some errors i get.
I asked here, but i didn't get any feedback
Any advice?
Thanks
It looks like you've copied in the headers, but not actually linked the source files in. In other words, Xcode isn't compiling DDMathParser into your project.
This page on the DDMathParser wiki has information on what you're supposed to do: https://github.com/davedelong/DDMathParser/wiki/Adding-DDMathParser-to-your-project

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.