Adding flurry to iOS app - iphone

In the finder, drag FlurryAnalytics/ into project's file folder. (NOTE: If you are upgrading the Flurry iOS SDK, be sure to remove any existing Flurry library folders from your project's file folder before proceeding.)
Now add it to your project:
File > Add Files to “Your Project” ... > FlurryAnalytics
Destination: select Copy items into destination group’s folder (if needed)

Folders: Choose 'Create groups for any added folders'
- Add to targets: select all targets that the lib will be used for
In your Application Delegate:
Import FlurryAnalytics and inside "applicationDidFinishLaunching:" add: [FlurryAnalytics
startSession:#"YOUR_API_KEY"];
What exactly do you have to do for the bolded step above? I'm using xcode 4.3.3
Where do you do that step?
Thanks!

That means drag the FlurryAnalytics library into Xcode project view on the left, and when it comes up asking if you want to copy it or reference it, you should...
Copy it
Make sure all build targets have a check mark next to their name.
Edit: Here is a technical, no-fun definition of build targets http://developer.apple.com/library/mac/#featuredarticles/XcodeConcepts/Concept-Targets.html. Sometimes it is useful to create multiple targets. If you don't know what they are, you likely only have one target and don't have to worry about it.

Related

Unable to get xcode project to index appropriate directories

So I had to delete my project and then reclone it from my repository, but when I clone down the project and I open it, other files from some time ago show in there, how is this possible?
Example this is the cloned directory:
But when I open the project, it shows this project structure:
Also it produces the following error when attempting to build the project:
Build input file cannot be found: '/Users/Development/Projects/MapGlider/Application/Utilities/Extensions.swift'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
All help will be appreciated!
The structure of the project as you see it in Xcode is a combination of file system + information about your project in YourProject.xcodeproj/project.pbxproj file. So you have a mismatch between file system and that file, which is typically a result of inaccurate checkin (for example some changes were done directly in file system, and the project was not updated), or a bad merge (developer A did everything right, developer B, or even the same developer on a different branch, overrode those changes incorrectly).
So what you need to do is to fix those errors one by one.
Note: the steps below assume the project is in your control. If you are using some script or tool to generate the project, you will have to address those issues via that tool or script instead.
First, fix the project structure:
Make sure Inspectors on the right side in Xcode are open. Choose File inspector tab
Focus on a folder inside Xcode, and check Name, Location and Full Path of the folder. Especially notice the Full Path, if it's incorrect, change it to a correct one. Here's the example how. Repeat for all folders and files you want to have in the project
Delete all folders and files you don't want to have in the project from Xcode. For example you can delete Extensions which appears as a file in your project, while it's actually a folder. Typically while deleting you should be able to delete them from file system as well if it exists, but if not, you can double check in file system and delete files / folders from there as well.
Add folders and files missing from the project if needed. Follow Add existing files and folders to a project section in the linked page.
Once you cleaned up the project, you need to review / fix all your project targets:
To fix the Project targets
Try to build each target. If it succeeds, most likely everything is resolved (although watch out for runtime errors for resource files - so you may need to test your app to ensure nothing is missing too).
If building a target fails, you will need to see why. For example
if file is missing from the target, but you already added it to the Xcode project, you can add it to the target (see this page).
if file is missing from the target and is not visible in Xcode, go back to step 4 of the previous procedure and add those files to Xcode project, and then add them to the target
if a file is nowhere to find and is not needed, you can delete it from target. If it was needed, then... well, you have a problem and need to locate your missing code in your source repo or rewrite it.

Kobold 2dD - kkARCSupport.h file not found - how to manage that?

I want to use audio management from Kobold2D (ObjectAL)in my general (existing) Xcode (single view) project.
I use instructions from official:
Copy libs/ObjectAL from this project into your project. You can simply
drag it into the "Groups & Files" section in xcode if you like (be
sure to select "Copy items into destination group's folder").
Alternatively, you can build ObjectAL as a static library (as it's
configured to do in the ObjectAL demo project).
Add the following frameworks to your project: OpenAL.framework
AudioToolbox.framework AVFoundation.framework
But got this error: kkARCSupport.h file not found. Why?

Xcode - copy files when running an app on the iPhone simulator

For some reason Xcode has stopped copying files to an app when I try running it.
In the past, I've dragged in a file, kept the "Copy items into destination group's folder (if needed)" option ticked, and all has been well.
Recently, however, I've had to go into the Targets / Build Phases / Copy Bundle Resources and manually add each file for it to be added to the app.
Is there a solution?
In the same view where you check "Copy items to destination group's folder" you have to check the targets you want to have access to the files!
If something like this happens, perform the following.
Close the project, not Xcode.
Open Organizer. Go to Projects ->
Delete the derived data for the required project.
Quit Xcode.
Go to the Project folder in the Finder. Open the package of your ---.xcodeproj
file. Other than the project settings file, delete all the files.
Now open Xcode and your project. First it will do some indexing of your
project. Then build and run.
Now it will add all the files.

iphone project - copy and rename in xcode 4.3

I have an iphone project that is a "base" project. I want to copy this project, rename it and change a couple of files so as to create the final version of each application I want. How can I copy and rename a project in xcode 4.3+ without having any issues (like lost targets or so) ?
Click on your Project,
enter name of your project and prees enter,
it will ask,
Rename Project Content Items ?
say Rename then it will ask you for snapshot, click on Enable
and then press OK
Done !
You could also just create a new project and import only the header and code files you need.

Where is the resources folder for my project in Xcode 4?

When I create a new project in Xcode 4 it does not create the resources folder like Xcode 3 used to do. Is there a setting in Xcode 4 to make this work?
As badcat indicates in his comments, the Resources folder was merely a group within the project template. To create your own Resources group, either right-click on the project explorer view and choose New Group, or go to the menu option File | New | New Group.
If you want to make sure that items which should be resources are copied into the correct location in your application bundle, you can click on the name of your project in the project explorer on the left of the screen and go to the Build Phases tab. You can expand the Copy Bundle Resources build phase (or whatever it's called in your project) and see the files that will be copied over. If something is missing, you can drag it into that list from the project explorer.
Not sure what you mean by "Resources" folder, but maybe this answer helps you with that:
Where is build output going?
Check out this question if you don't just want the group but also the physical folder on your filesystem: How do I get the resources folder back in Xcode 4?