I'm totally novice as programmer. I'm trying out the Swift and Parse. After I had added Parse.framework and Bolts.framework and all the dependencies I got SourceKitService crashed. I tried #include instead #import but it didn't work for me. iPhone Simulator failed as well. The problem is solved only if I delete the #import .
Help me please to solve the problem. Thank you in advance!
This sounds like you did not include the framework itself. Add the framework to your project.
In the project navigator, select your project
Select your target
Select the 'Build Phases' tab
Open 'Link Binaries With Libraries' expander
Click the '+' button
Select your framework
(optional) Drag and drop the added framework to the 'Frameworks' group
Note: from How to "add existing frameworks" in Xcode 4?
Related
I keep getting these errors trying to run the Reachability.h
Go to Project build phases and add the following
Under Compile sources, press the "+" icon and add Reachability.m
Under Link Binary With Libraries press the "+" icon and add SystemConfiguration.framework
UPDATE:
If you are receiving ARC compilation errors
You will have to disable ARC on specific files
To do that please follow the steps in this answer
How can I disable ARC for a single file in a project?
Your class is referencing Reachability, but you are not adding it to your project. You should possibly add the Reachability.m file to the project.
As soon as I add the MediaPlayer.framework into a new program, XCode absolutely shits its pants. Under supporting Files, PROJECTNAME-Prefix.phc starts red-flagging both #import and #import
Why is it doing this? I have tried to create a new project and re-adding the Framework, but even if that is all I have done, it gives 4 errors on the first failed build.
if you are using xcode4 don't slide the framework in the project: it edit the framework search path and do the error you describe.
Try deleting the framework search path in project "build setting" and for adding the framework use "target" "build phase" "link binary with library".
hope it help and sorry for my poor english.
I don't think I'm including the FMOD library correctly. I'm getting the following XCode error:
expected specifier-qualifier-list before FMOD
I'm using XCode 4 and the latest version of the FMOD library. I went into the "Link Binaries With Libraries" section in XCode and added libfmodex_iphonesimulator.a.
Any ideas on what I could be doing wrong?
Thanks!
Here is a step-by-step process for getting FMOD running in an iOS application:
File -> New Project
iOS -> Application -> Window based application
Choose name and location (I used 'test' and the FMOD examples directory as the location)
Assuming you named the app 'test', rename 'testAppDelegate.m' to have the extension '.mm' to allow C++ code.
Edit 'testAppDelegate.mm' to have #import "fmod.hpp" at the top.
Project -> Edit project settings (ensure Configuration at the top is set to All configurations)
Go to "Other linker flags" and type in -lfmodex_$PLATFORM_NAME
Go to "Header search paths" and type in ../../api/inc
Go to "Library search paths" and type in ../../api/lib (now close settings).
Right click on the "Frameworks" group on the left, choose Add -> Existing Frameworks, then choose 'CoreAudio.framework'
Repeat step 10 but choose 'AudioToolbox.framework'
Add FMOD code to 'testAppDelegate.mm' as needed, see playSound example for reference code.
After you link the appropriate library make sure you drag the 'inc' folder with all of the .h files into your project somewhere, that was my issue. Also, make sure you include AudioToolbox and CoreAudio if you did not already, and make sure to include fmod.hpp and fmod_errors.h in your view controllers header.
I am patching upp an application from iOS 4.2 to 4.3 using new xcode4.
With no changes made, except setting iOS to 4.3, I created entitlements and go!
Message I get is:
Undefined symbols for architecture armv6:"function", referenced from:
Ive tried to Clean the project, reinstalling xcode.
I uninstalled also the xcode4 demo version.
I also tried to set to Optimized armv7.
I would be very happy for some help, I'm stuck. Really.
Thanks very much in advance!
Here's how I got this problem:
I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.
My solution for this problem:
Click on the Project icon
Go to the Target in the navigator menu
Click on the "Build Phases" tab
Add the .m file to "Compile Sources" (either drag it across, or use the + button)
Add the .xib or Storyboard file to "Copy bundle resources"
Clean and build
For this type of error, this is what I typically see:
Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_MyCustomController", referenced from:
objc-class-ref in SomeOtherController.o
ld: symbol(s) not found for architecture armv6
Almost every time I see this error it is caused by hidden/invisible characters in the import statement in SomeOtherController.h or SomeOtherController.m. So, look at both your .h and .m file, find the line that looks like this:
#import "MyCustomController.h"
Delete this line and retype it (do not copy/paste it -- you'll just repaste the offending hidden character).
Click on your Project name in the navigation window, choose the target you're building against, go to build phases, make sure the one Xcode's telling you that's missing is in there.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Release' option to 'Yes'.
This solved my problem - I hope it helps you, too! :)
I had this problem and I have just solved it.
It was a simple typo in the function name (forgot one letter) that caused the problem in my case.
I had the same problem in Xcode5 for iOS7 with the TestFlight SDK. My issue was that the 'Build Active Architecture Only' was set to Debug only.
You can find the setting under 'YourProject'->'Build Settings'->'Architectures' Set the 'Debug ' option to 'architecure arm7 arms7s'.
This solved my problem - I hope it helps you, too! :)
I had a similar issue popping-up all suddenly - more specifically, I was getting Undefined symbols for architecture armv6: "_OBJC_CLASS_$_CLLocationManager", referenced from: objc-class-ref in MyCLController.o
Note that I had CoreLocation.framework listed in my frameworks (in xcode' Project left nav, under the Frameworks folder); and had previously geolocation working just fine.
I got rid of the issue by re-installing CoreLocation.framework.
If you're not sure how to do that in xcode:
* click on your project in xcode left nav bar
* Go in the General tab of your project settings
* Navigate down - you'll see the list of frameworks installed under Linked Frameworks and Libraries
* Click on the + icon to add the CoreLocation.framework
In my case, I was doing this in a viewcontroller.m
#import <MediaPlayer/MediaPlayer.h>
Without doing Link Binary With Libraries with MediaPlayer.framework. After adding it, it compiled fine
I just downloaded XCode 3.2.5 with 4.2 ... I'm trying to play an mp3 file, but apparently the UI changed because I wasn't able to follow any of the tutorial instructions on how to add a framework. Finally I clicked on a little gear button then went to Add -> Existing Frameworks... However AVFoundation is not listed so I'm unable to use the following code:
#import <AVFoundation/AVFoundation.h>
AVAudioPlayer *player;
The post is asking for the "missing" AVFoundation framework. It is true that you cannot easily find it though "Add an existing framework" in some SDK versions, e.g. Xcode 3.2.
Here is the easy way to solve it, thanks to some other people who pointed it out in another forum.
Click on "Target"
Click on your app
Get Info
In the bottom, click on "+"
Now you should be able to see it. I did this and solved the issue.
Right click the frameworks group right Add -> Existing frameworks, a list of frameworks will appear just select AVFoundation framework & click add
In the "project navigator", open the "frameworks" folder and select one the existing frameworks (e.g. UIKit.framework)
Right click and select "Show in Finder" from the menu
From the newly opened folder in the finder, drag the framework folder you are interested in (e.g. OpenGLES.framework) into the "frameworks" folder in XCode
Be sure not to "copy items into destination's group folder"
Choosing "Create groups for any added folders" seems to make it
(duplicate from previous question-- just dumped it into this question as well for any one still struggling with it)