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

Archiving with different build configuraton - "framework not found QBImagePicker for architecture armv7" #191

Closed
tobycox opened this issue Jan 11, 2017 · 8 comments

Comments

@tobycox
Copy link

tobycox commented Jan 11, 2017

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.11.2
  • react-native v0.39

Platform

  • iOS
  • Android

Expected behaviour

Can build and Archive the project in an alternate build configuration.

Actual behaviour

Linker error:

ld: framework not found QBImagePicker for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce

  1. Project with separate build configurations. We have a Release-Staging build configuration which is a clone of our Release build configuration but with a different bundle ID and plist.

screen shot 2017-01-11 at 10 42 56 am

  1. A Release-Staging scheme that archives using this build configuration.

screen shot 2017-01-11 at 10 53 23 am

  1. Build and Archive using this scheme.

Has anyone run in to a similar issue? Seems like maybe the QBImagePicker framework isn't ending up in right build directory (Release instead of Release-Staging).

@mizinin
Copy link

mizinin commented Jan 11, 2017

have same issue with custom config schemes(

@tobycox
Copy link
Author

tobycox commented Jan 24, 2017

@mizinin Have you had any luck getting around it? It's making me sad 😢

@deno028
Copy link

deno028 commented Feb 7, 2017

Getting the same issue. Can anybody solve it?

@tobycox
Copy link
Author

tobycox commented Feb 10, 2017

Still getting this issue. Have tried using the cocoapods method as well as the manual embedding method but neither work.

@tobycox
Copy link
Author

tobycox commented Feb 11, 2017

So I was right in that the frameworks aren't ending up in the right directory. I'm not sure how to actually fix this in a nice way, but I got around it by adding a Run Script phase to my project before "Compile Sources" which copies the frameworks over in to the correct directory so they can be found for linking.

if [ "${CONFIGURATION}" = "Release-Staging" ]; then
    cp -R "${BUILT_PRODUCTS_DIR}/../Release-iphoneos/QBImagePicker.framework" "${BUILT_PRODUCTS_DIR}"
    cp -R "${BUILT_PRODUCTS_DIR}/../Release-iphoneos/RSKImageCropper.framework" "${BUILT_PRODUCTS_DIR}"
fi

Replace "Release-Staging" with the name of your custom build configuration.

@richardgill
Copy link

For me I think the problem was really just related to: facebook/react-native#11813

I fixed using the library: https://github.com/Thinkmill/react-native-schemes-manager

@ivpusic
Copy link
Owner

ivpusic commented Jun 18, 2017

this is the current react-native limitation.

As a workaround, follow facebook/react-native#11813 (comment).

After that, create another "User defined setting", name it for example: REACT_FRAMEWORKS_PATH, set value $(BUILD_DIR)/Release-$(PLATFORM_NAME), and then in "framework search paths" add $(REACT_FRAMEWORKS_PATH)

@ivpusic ivpusic closed this as completed Jun 18, 2017
@ptgamr
Copy link

ptgamr commented Nov 3, 2017

Adding to "Linked Frameworks And Libraries" like bellow fixed the problem for me:
screen shot 2017-11-03 at 11 24 09 pm

Notice that QBImagePicker.framework is not in the list.

The irony is, if I added QBImagePicker.framework, the build would failed.

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

6 participants