xcode build settings for imported libraries (xcode 5) - ios

I'm having a small issue with xcode (I'm assuming it's mostly due to being unfamiliar with xcode itself) and was hoping someone could lend me a hand.
I'm working with a group of people and we're using the GPUimage framework.
The problem is this:
For every person referencing GPUimage we get additional entries in the build settings for the xcode project.
For example build products path would be:
/Users/username/project/application_name/GPUImage-master/GPUimage.framework
I would rather it be:
/application_name/GPUImage-master/GPUimage.framework
The reason I want to fix this is because we need to package up our application and library together so that whoever wants to use it only needs to open the xcode project file to see what we've done (to mark it, school project).
Can anyone suggest what I should do or look for here?

Try adding the following to the beginning of the user path:
$(SRCROOT)/application_name/GPUImage-master/GPUimage.framework
That should instruct XCode to use the user path of whoever is using the library
Hope this helps!

Related

GoogleMobileAds.h file not found

I know that there must be a whole bunch of questions like this, but I tried everything, and nothing would work.
I'm creating a iOS app, and I use Google Ad Mob. I built my Xcode project from Unity, but when I tried to archive it in Xcode, there is this annoying error "GoogleMobileAds.h file not found"! I have the Google Mobile Ad Framework, but when I put it in the project, the error still shows! I looked up this problem, and tried to follow some of the people to fixed it, but the error still wouldn't go away.
Could anyone help please?
Here is the link to the project you can download.
Xcode project
I fixed this by going to Framework Search Paths in build settings, and putting in the GoogleMobileAd.framework!
as #SullyBully already correctly mentioned.
You have to add your folder with the Admob SDK to Framework Search Paths in Build Settings.
Additionally you have to include your GoogleMobildeAds.framework into your frameworks section in xcode (no ideas whats that called)
See screenshot 1 and 2 (I literally spent now hours because of it, hopefully this finds a soul helpful :P)
By the way it is completely neccessary just to include GoogleMobildeAds.framework.
You dont need to include the others like GoogleUtilities, or GoogleAppMeasurement etc.
After you build the the game in Unity.You also have to add google admob iOS library to your Xcode project. You can get from : [https://developers.google.com/admob/ios/download][1]

How to create framework with inner frameworks?

I absolutely can not understand how it works. I started with a simple one: created framework using "Cocoa Touch Framework" template and add some code to source files. Then using cocoapods I installed some pods to this framework-project. All looks good (maybe not so good actually) and build fine. After that there was an attempt to connect my framework to other xcode project. I did this as follows: just took my test.framework file from Product folder and transferred to another project. At first everything was not bad. The import was successful and I can use my framework-code in another project. But when I run it I have error: dyld: Library not loaded: Reason: image not found. I tried all of the answers to this problem, but nothing helped me.
After that, it was decided to try to connect my framework to other project. This time I got a completely different behavior: namely, I was able to connect the framework, but I could not access the code inside it. I'm completely confused, because I did not change anything. I just did the same with another project.
Please help me. What am I doing wrong?
A related questions:
Can I connect the framework just moving test.framework file into
another project?
For some reason, I should use the approach described above, is there a chance in the theory of success or all that I have done before is not correct?
I tried it a lot with the same result you get , until I posted the problem in Apple forums and they respond with Nested frameworks are not supported in IOS

Why am I getting an unavailable declaration using framework

I'm making a swift .framework, but I'm running into what I believe is a build problem. So I've simplified everything to isolate my troubles. I've attached a screenshot of my newframework.framework project (top) and my example usage of the framework (bottom). The problem I'm having is that Whatever class is unavailable when I include newframework.framework. I can confirm that Whatever.swift is indeed included in target>>buildphases>>compile Sources
What could cause this not to work?
EDIT - Adding App Build phases screenshot
Your problem, as we figured out in comments, was that you were building your framework for "Generic iOS Device" and building your app for the simulator. Xcode can't make the app build without matching architectures, so you need to choose one over the other or produce a framework that includes every architecture.
(This was posted to help people who come here from the future find the answer quickly. Hello, future people!)

Adding Header Search Path when trying to incorportate GPUImage in my xcode project?

I am trying to add the GPUImage framework/library according to this:
github.com/BradLarson/GPUImage
and I am stuck at the point of setting the Header Search Path. I tried setting a path but when I tried importing#import "GPUImage.h" I got an error saying it is not found. Maybe I put in the wrong path? I'm confused about what I should do because I have never used this before (very new to programming). Any help would be greatly appreciated.
First, if you're developing using Xcode 6, you might look at using the new framework support present in iOS 8 (and back to iOS 7, near as I can tell). The project has a true iOS framework that eliminates the need for setting paths to headers, like static libraries require. See the "Adding this as a framework (module) to your Mac or iOS project" section of the instructions for how to use this.
If you're targeting an older version of iOS and/or using an older version of Xcode, you'll need to set the Header Search Paths value in your build settings to be the path to where you installed GPUImage from where your application resides. For example, the sample applications in the examples/iOS directory use a path of
../../../framework
The .. elements in that tell it to step one directory back from the location of your application project. Since the examples reside in GPUImage/examples/iOS/[project], the above relative path leads to GPUImage/framework. If you placed your project and GPUImage in the same encompassing directory, you might use
../GPUImage/framework
instead.
In that path setting, make sure you set the option on the right to "recursive" as well.
Use the sample applications as templates, and compare how they are set up to your application to find areas where you might have deviated from the listed setup instructions. About the hardest part of those instructions is getting the relative path right.
I suggest you use cocoapods. It handles gracefully library dependencies and GPUImage is present there.
cocoapods.org
It is also fairly easy to install and use

Extension project templates not appearing in Xcode 6

I'm not sure if I am the only one experiencing this program, but I have tried searching and have not been able to find anyone in my current situation. I downloaded Xcode 6 beta and was interested in Extension programming for iOS 8. However, I have been unable to locate the extensions in my project templates when creating a new project in Xcode, I saw a YouTube video (unrelated to extension programming) but I did notice that the option was not there for the said video. Now, I have had a look through the contents of the Xcode 6 beta package and have been able to locate the actual templates themselves, so I have no doubt they are present, it just seems that they are not actually being loaded.
For the record, I also downloaded some example custom keyboard code from GitHub in order to see whether Xcode will recognise it and it does, going as far as actually displaying the 'E' icon beside the build target. I should also mention that I do have a build of Xcode 5 also present on my machine.
Is anyone else experiencing this issue, or does anyone know how to overcome it?
Thanks
You create a extension by creating a new target in an existing project.
Check this link for more information
I had the same problem. The solution was to not try to add the extension in File/new/File... menu but in File/new/Target... menu.
You can add extension to any existing project.

Resources