After I built my iphone 2.2.1 application in sdk 3.0, I get a lot of errors of type §non_lazy_ptr. I am getting it on the CFFTPStream constants, like kCFStreamPropertyFTPPassword and kCFStreamPropertyUserName. Anyone know what causes this?
I had the same problem that you have and I solved it by adding the CFNetwork.framework directly to my target.
Expand Targets
RMB on your target
LMB add, select Existing Frameworks
LMB CFNetwork.framework
For some reason it seems to be important that you add it via RMB on your target.
Related
I'm sure this has got a simple answer, but it's stumping me :(
I'm trying to build an app that will run on iOS versions 4.3 and 5.0. I'm fine with the idea of checking for capabilities at runtime with -respondsToSelector, but in order to use the Twitter functionality I need to include the Twitter library.
That causes the compiler to fail when building for 4.3, which I'd expect. According to the Apple docs (at the very bottom of this page), it's possible to link frameworks conditionally - but I cannot for the life of me figure out how to set the Other Linker flags to do this. Can anyone tell me how this is done?
You should also link the framework with the flag "Optional".
You can set this at the "Build Phases" panel at the point "Link Binary With Libraries".
you can switch "Required" to "Optional"
In your Target -> Build Settings, search for Other Linker Flags and click on the type of release (Debug or Release) and then on the bottom right, click Add Build Setting -> Add Conditional Setting and that will give you the SDK popup and the ability to specify any additional flags.
I'm still pretty new at iPhone development and I'm running into this odd build error which I do not understand. I'm trying to build and run my iPhone application and XCode is telling me that it can not find NSPredicate. To my understanding it was made available in iPhone SDK 3.0 and I'm trying to build for 3.1. I set the target to being "Simulator - 3.1.2 | Debug" in the top left selection box and then hit "Build and Go". I tried setting it in the target app's info as well.
If anyone can direct me to where/what I can change or any documentation, I would appreciate it.
Thanks.
Have you built your project recently with an older version of the SDK. I have run into similar problems and I found that the first thing to do is to clean your target and then build again.
To clean your target open your targets group, right click or control+click on your target and select clean "_target_name_"
Hope this helps.
NSPredicate is part of the Foundation so if you can't find that something is badly scrambled.
(1) Check for circular imports in the headers. These can cause all kinds of weird problems.
(2) Remove all frameworks, clean all, then add the frameworks back in in order. Make sure the target is set for 3.x.
In the past, when I've hit a build problem like this, I found it easier to create a new project and move my custom source to it than to try to figure out what I screwed up on the original. Life's to short to debug a linker.
I'm trying to add the ability to send an email from my iPhone app, and step one appears to be to add the MessageUI Framework to my project and I it doesn't appear in my list of existing Frameworks. There is something called Message Framework. Is that it? Has Apple renamed it?
I did download the MailComposer sample and I can see that that project seems to have the MessageUI.framework in it, albeit not in the Frameworks folder with UIKit, Foundation, and CoreGraphics.
How should I proceed?
Note that I'm running Xcode 3.2 on Mac OS X Version 10.6.1
This is the real answer - To add it to your project, open up your target information. (You can do this by selecting your build target, and right-clicking to select Get Info). On the 'General' tab, you'll see 'LInked Libraries'. Here you can add new libraries that are actually available. MessageUI.framework is indeed one of those libraries. This should solve your cross-platform build issues. – Malaxeur
I ran into the same thing (I think), check to make sure you're in the iPhone frameworks folder when you go to add framework. Hit M to take you to it, the Mac one has a bunch of M frameworks in it, the iPhone has only 1, message kit (I think), just hit M.
That's what was wrong with mine.
I recently moved my projects to a new mac, along with a newer version of Xcode.
When i opened my project i noticed that some files were red. So i remapped them by setting the path (by project path) and then providing the proper path location.
Now my problem is that the frameworks that i have are red, and i cant find their location! I did set the framework paths to be "relative to current SDK" however.
Can anybody help me get my frameworks mapped correctly?
The frameworks im using are:
- QuartzCore.framework
- libsqlite3.0.dylib
- UIKit.framework
- Foundation.frameowrk
- CoreGraphics.framework
The XCode version is 3.1.4 (the only one installed).
The iPhone app was originally created using a prior version of Xcode (i dont remember which version).
I still dont have an answer. Im going deeper into this mess of a problem that Apple created.
In all my .m files im importing
How can i add this UIKit framework to my project Target with respect to the current SDK?
In fact, forget about the ref w/ respect to the SDK, let's just get the framework from the 3.0 SDK as a referenced framework. Right now when i reference it is red.
Note: references related to frameworks, everything about it, is driving me insane, and making me more frustrated at apple for this sloppiness, more than ever.
Any help is greatly appreciated.
I had exactly this problem. Somehow 'Base SDK' in Build Settings of a project was set to Mac OS X after I have installed Xcode 4.2.
Click on your project, change Base SDK to 'Latest iOS' and enjoy the vibe.
If you double click on your target to bring up the info pane you will see a tab labeled "Linked Libraries". From here you can click the plus button to add the libraries and xcode will do the right thing when you add the desired frameworks
I was having the same issue with red frameworks and bad pathing. If you're getting an error that says, "Base SDK Missing" you'll need to Get Info on your Xcode Project and check that it can find the right SDK.
Near the bottom of the General Info tab there will be an option Base SDK for All Configurations. Select a different SDK and see if that helps.
I ran into issues when I upgraded to a beta SDK and it was loading up deprecated frameworks from an old SDK.
Xcode 3.2 kind of broke the build process of my iPhone app. I need to add a new framework to my project (MediaPlayer.framework).
So I go into my Target settings and try to add it to the "Linked Libraris" by hitting the [+] button. In the list the MediaPlayer.framework is missing, as well as other frameworks, such as UIKit, CoreGraphic and others. Some frameworks are still there.
I can add the frameworks by adding the SDK-specific ones (going into /Developer/Platforms/iPhoneOs.platform/...yadayadayada../frameworkd/) but then of course I can only compile for the iPhone platform and not for the simulator any more.
So basically I wonder how I can get Xcode back to chose the appropriate framework, depending on platform and SDK version for me?
Thanks and kind regards, Hans Schneider
Edit: Things I tried: Setting the Base SDK to 3.0 (was still 2.2.1), reinstalling 3.0 iPhone and Simulator SDK from the "packages" directory of the Xcode 3.2 DMG. Didn't help. The frameworks still wont show up in the list...
Edit 2: Ok, I now have the frameworks back in the list, I was previously in my AdHoc configuration. In Debug I have the frameworks back. But it still wont compile for the Simualtor (lots of Symbols(s) not found errors).
Looks like the linker doesn't choose the correct libraries and always uses the iPhoneOs3.0 path for the frameworks.
Goto 'Framework Search Path' in build section in target's property.
Add path:
$(SDKROOT)/Library/System/Frameworks
Then it should work well.
And once you press 'OK', you should be able to see the path is set to '/Library..."