I have gone through this document :Getting Started with the Facebook SDK for iOS v3.1
I have successfully configured my Xcode project by following it.
But I want to do it without adding the Facebook.framework.
As previously we used to only add the "src" folder which we used to clone from :Facebook SDK for iOS - Github. Why can't I just copy the "src" folder and configure my project.
I want to play around with FBFriendPickerViewController.m (dot m) file. Which I am not able to view if I follow the standard tutorial. But is available in the "src" folder.
Please how can I do that ? And it also seems that FbGraph.h file doesn't exist.
Please help.
If you want to play with the source, go to:
https://github.com/facebook/facebook-ios-sdk/
After getting the code, run this script to build the framework locally:
<Install Location>/scripts/build_framework.sh
This will drop the framework in the folder:
<Install Location>/build
Follow the same instructions in the Getting Started to include the Facebook SDK, however, you will get the framework from your local build folder.
Note: You'll likely have to modify the build search path in Xcode if you're swapping out, say one of the sample projects (that was looking for the Framework in a particular place).
Related
I want to use google map to existing(not a new one) iPhone project.Now i am using Google map ios sdk and i successfully added google map framework to my project.But i got error like this
ld: framework not found GoogleMaps
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to solve this issue.I am using xcode4.5 and google map iOS sdk version is 1.5. When i am creating new project with google map iOS sdk then no error getting for me.Error only for existing iOS Project.Please help me.
I solved my issue
You need to do this
Click on your project (targets)
Click on Build Settings
Under Framework search paths (set your framework path)
Following information for getting framework search paths
Right click on your framework folder (for ex: GoogleMaps.framework)
select Get info
copy the path from General->where and paste this path in your framework search path (path should contain in single line)
Good luck
I encountered a scenario in which I had to import a project that was using Google Maps and noticed the same problem - module: "Google Maps" not found.
To solve this problem it was necessary to delete Podfile.lock and Podfile folder and re-install the pods again. Good luck !
You can also :
- remove GoogleMaps from Podfile
- pod install
- add GoogleMaps to your Podfile again
- pod install
This solution works for me, you can also check the search paths a well.
Clean your project. The shortcut is command + shift + k. This will clear information that xcode has stored that might imply that the sdk isn't included.
Also press the project icon at the top of the hierarchy of files, press the target that is your project, press build phases, open link with binary libraries, and make sure that the google maps sdk is in there. If it is not, press + and add it in.
Follow the steps :
Download GoogleMaps-iOS-1.1.0.zip from their site
Unzip the file. You now have a GoogleMaps-iOS-1.1.0 folder
In that folder you have a GoogleMaps.framework folder.
Copy or move the GoogleMaps.framework folder to inside your project folder (in Finder).
Drag the GoogleMaps.framework folder onto your Frameworks group in Xcode.
In the options sheet, uncheck "Copy items into destination group's folder". Make sure your target is checked in "Add to targets". Click OK.
(Note that you can also do this the other way, by not copying it into your project folder and checking "Copy items into destination group's folder". Xcode will copy the folder itself.)
Import using #import "GoogleMaps/GoogleMaps.h". The angle bracket usually work too, but in this case it should use quotes.
From : <GoogleMaps/GoogleMaps.h> file not found Google Maps SDK for iOS
my problem was fixed by adding in:
build settings
Framework Search Paths
clickable and add the following lines:
"${PODS_ROOT}/GoogleMaps/Base/Frameworks"
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks"
If you use Pods
Left menu > Pods > Pods > choose Framework > right menu > copy path from "ios/....."
My: ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework
Then Project > Build Setting > Framework Search Path > Click on
$(PROJECT_DIR)/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMapsCore.framework
Sometimes it happens when you are migrating the code from one system to another so your Framework search paths look empty at this moment, so one simple solution I try is to reinstall the podfile and it works for me.
I've been struggling with this issue for hours; I'm using CocoaPods, Swift and Xcode 6.1.1. I followed all the steps for including GoogleMaps in my project carefully, tried many different things like removing symbolic links in the downloaded package or manually linking the binaries in build phases or trying #include "GoogleMaps.h", #include "GoogleMaps/GoogleMaps.h" and "#include <GoogleMaps/GoogleMaps.h> in my bridge file, none of that worked... Finally used CocoaPods instead of including the framework myself and it worked! Hope it helps someone out there:
In the Podfile:
pod 'Google-Maps-iOS-SDK', '~> 1.9.2'
And in your Bridge file:
#import "GoogleMaps.h"
Delete derived data and delete Podfile.lock file and then run pod install.
Maybe it'll be useful for anybody, next steps helped me:
1. Delete "Headers" and "GoogleMaps" folders manually (from the Finder).
2. Run 'pod install'
3. Re-build the project in Xcode.
In my case, I forgot that I need to open the workspace file with pods, not the project.
I m doing Facebook integration with my project.But accidentally Social.Framework and AdSupport.framework got deleted from project's Build Phases.How can I get them back.Is there a way to add them externally ?
Go to your Trash, copy back those two frameworks, and paste them at you Framework path like:
/Library/Developer/Xcode/iOS DeviceSupport/6.0.1 (10A523)/Symbols/System/Library/Framework
Past them both there.
Download these two Frameworks from below link:
http://www.sendspace.com/file/b0fifp
I'm new to jailbroken dev. I have a regular xcode application project. Now I need to convert it, or create a new application project using iOSOpenDev for jailbroken dev. I found the same question:
xcode project conversion to iOSOpenDev
But I have no idea what to do with the first step. Do I need to add some settings or change some values of existed settings? Pleas give some more details.
thanks!
About the first step, I did some tryings and it worked out. The following steps is just the same as kokoabim said:
1.change the install path to /Applications; add iOSOpenDev's include,lib,framework folder path to Framework Search Paths,delete iphonesimulator from Supported Platforms in Build Settings, Header Search Paths, Library Search Paths(I'm not sure if it's necessary);
Add a run script build phase (must be last in order) to existing target that executes /opt/iOSOpenDev/bin/iosod --xcbp.
3.Create the Debian package control file under the existing target's folder as (target's directory)/Package/DEBIAN/control.
4.Perform a Build For Profiling (Cmd-Shift-I).
(Edit: I was able to bundle the framework but it still would not take the changed installation directory. So, below, the question has changed to "linked and bundled framework image not found")
The Mac app was submitted to MAS but rejected by Apple, for a very reasonable reason: a framework that was linked was not bundled.
I simply ask how I can make sure it is included correctly in the bundle, and confirm that on my Mac before submitting again.
Please let me know what/any extra information you need from me.
Edit: More information after following subzero's instructions.
When going Product > Build, .app files end up in Documents/build/Release on my machine.
Here's how my build phases look - https://dl.dropbox.com/u/19155207/copyframeworks.jpg
and a UIKit.Framework folder is inside WinKonto.app/Contents/Frameworks containing this: https://dl.dropbox.com/u/19155207/frameworksfolder.jpg
It still gives the same error if I run it from the Releases folder. Only when I run it from XCode it works. Can you see something wrong?
Edit 2: I've gotten the framework file (UIKit) into the bundle.
Here is the crash report error message:
Dyld Error Message: Library not loaded:
Frameworks/UIKit.framework/Versions/A/UIKit Referenced from:
/Users/henrikerlandsson/Documents/build/Release/WinKonto.app/Contents/MacOS/WinKonto
Reason: image not found
But the framework is in the bundle, and it was modified by install_name_tool before being added to the project.
I don't know why that modification didn't work, but I made it a private framework instead and changed the installation directory there instead, and it worked (see my answer).
In XCode,
Add a Copy Files build phase to your application's target
Move this above the Link phase set its destination to myApp.app/Contents/Frameworks and add the framework to it.
I made it a private framework. I followed the instructions under Embedding a Private Framework in Your Application Bundle, and that let me set the framework's Installation Directory properly to where it appeared in the bundle.
Since moving to XCode4, I have been getting errors like:
/VERSION: No such file or directory
cp: /javascripts/phonegap..js: No such file or directory
cp: /javascripts/phonegap..min.js: No such file or directory
error: /VERSION: No such file or directory
for projects that were working under XCode3.
Open XCodes Preferences, and navigate to Source Trees. If there is no PhoneGapLib entry there, try adding a new setting with the following values:
Setting Name: PHONEGAPLIB
Display Name: Phone Gap Lib
Path: /Users//Documents/PhoneGapLib
Note that the path should be to the location of your PhoneGapLib folder, and that it may not be in your documents folder, depending on how you installed PhoneGap.
I just learned about a great web service recently made available by Nitobi (makes of PG), which will automatically generate the necessary PhoneGap files you need for use in Xcode 4.
Just enter your project name, hit a button and they'll generate a zip file for you to download. This lets you set up a new project without messing with the command line.
You could set up a new project, then migrate your older project files over.
Did you search Google for this error?
I'm a bit of a noob with PhoneGap and Xcode still, but I know there have been recent issues with PG and Xcode 4. Perhaps you're experiencing the same issues as the commenters to this post: PhoneGap + XCode4 (and more specifically, here).