Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

framework not found EVReflection #23

Closed
cafuni opened this issue Nov 5, 2015 · 17 comments
Closed

framework not found EVReflection #23

cafuni opened this issue Nov 5, 2015 · 17 comments

Comments

@cafuni
Copy link

cafuni commented Nov 5, 2015

Mac OSX 10.11.1
Xcode 7.1

I installed the library following this steps:

Open Terminal and execute: $ sudo gem install cocoapods
Navigate to my Project folder (example /Users/myName/Documents/APP/APP.xcodeproj).
Setup Cocoapod: pod setup
Create the Podfile: touch Podfile
Open the Podfile: open -e Podfile
Insert code for Podfile:
use_frameworks!
pod "EVReflection", '~> 2.6'
Finally install the Podfile pod install

when I run the app I receive this error:
ld: framework not found EVReflection
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@evermeer
Copy link
Owner

evermeer commented Nov 5, 2015

Do you have an iOS or an OS X target? I believe I added OS X support in a later version than 2.6. As you can see in the readme the 2.6 version is for Swift 1.2. If you use Swift 2.0 then you can just use the latest (currently 2.11) by removing the 2.6 specifier. So your pod file will just have this:

pod "EVReflection"

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

i'm using iOS
I tried to install pod again with only "EVReflection" but the error is the same

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

i tried also on a new project

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

after doing a pod install you have to open the workspace and not the project. Did you do that? In your project navigator you should see your project plus a Pods project. And if you do a filter for EVReflection on the files it should find EVReflection.swift

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

I create a new project test. I followed the steps.

I opened the folder of the project and I opened the test.xcworkspace
screenshot 2015-11-06 09 29 50

after that i receive this message
screenshot 2015-11-06 09 30 10

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

in the project navigator I see this
screenshot 2015-11-06 09 51 18

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

I see that you have 2 workspaces. I assume that the pod install created the project.xcworkspace.
So you should use that one. As you can see in your project navigator of the test.xcworkspace you only have one project. You also should have the Pods project

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

Here is for instance how it looks in my EVCloudKitDao demo app:

screen shot 2015-11-06 at 9 54 07 am

As you can see I am using 10 different frameworks. These are the folders in the Pods folder in the Pods project

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

Ah, there is only 1 thing whats not standard. I think the chance is big that this is the problem.
You execute everything from within the .xcodeproj folder.
That's also why you had to add a reference to your project

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

how do i fix it? thank you

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

When you start from scratch with a new project, then assume you create that project in folder /xxx/yyy/newTestApp
then open a console window and do a cd to the folder /xxx/yyy/newTestApp
Do not do a cd to the .xcodeproj folder!
Then create the podfile there with the use frameworks and the pod 'EVReflection'
Then execute the 'pod install'
open the workspace

If you want to fix an existing project, then move the podfile out of the .xcodeproj folder into it's parent folder.
Remove that fix for finding the project (it's in the same folder, so you don't need it)
Remove all the workspaces
run 'pod install'
open the new workspace

@cafuni
Copy link
Author

cafuni commented Nov 6, 2015

thank you! I fixed it! just last thing: do i have to open workspace everytime? or i can open the project from xcodeproj ? thank you

@evermeer
Copy link
Owner

evermeer commented Nov 6, 2015

If you open the project, then you wont't have the pod framework. You need that. So you always have to open the workspace. This is default cocoapod behaviour. Once you get used to using libraries with cocoapods you never want to develop without them :)

@evermeer evermeer closed this as completed Nov 6, 2015
@qvivr-cris
Copy link

I'm having the same error, ld: framework not found EVReflection

@qvivr-cris
Copy link

I seem to get framework not found or (library not found) for whatever cocoapod I install. I'm thinking our project file has some non standard setup. :-/

@evermeer
Copy link
Owner

@qvivr-cris If you go to your project settings, build phases and look at the link binary with libraries, Do you see a Pods_yourapp.framework there? (after doing a pod install)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants