17

When I'm using xcode 9 beta 6 building a react-native project, it works fine.

But after I change to xcode 8.3, it builds failed, and shows me these information:

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

Apple Mach-O Linker (ld) Error Group
: Linker command failed with exit code 1 (use -v to see invocation)

How could I do if I use xcode 8.3 to develop ? I'm not able to use xcode 9 because of this: Xcode was crashed after adding ART.xcodeproj into Library

Thanks to all bros : )

Ci Kai
  • 335
  • 1
  • 4
  • 15

5 Answers5

23

FileProvide framework is only available in Xcode 9. You need to download and install Xcode 9 manually if you want to continue working on Xcode 8 environment,

I get this error too after updating my framework via cocoapods:

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

You need to copy the FileProvider framework from Xcode 9 into the directory of Xcode 8.

  1. Download the Xcode 9 release version here.
  2. After install, go to Application folder, right click on the Xcode9.app, select Show Package Contents.
  3. Go to this directory:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/

  4. Copy the FileProvider.framework, and paste into the same directory of Xcode8.app.
  5. Restart your Xcode8, clean your project and rebuild it.
felixwcf
  • 2,078
  • 1
  • 28
  • 45
  • But, for me its still coming issue even after I followed your suggestions, any other suggestions to fix this https://stackoverflow.com/questions/46949732/ld-framework-not-found-fileprovider-for-architecture-x86-64-in-xcode-8-3-2 – Anilkumar iOS - ReactNative Oct 26 '17 at 09:52
  • Yes, and by the way thanks for the quick response, do you have any suggestions for this fix? – Anilkumar iOS - ReactNative Oct 27 '17 at 06:46
  • I faced this issue because I'm using a library downloaded from pods. If I removed the library, the issue gone. From there it's telling me that I have to include the xcode framework which is as same as the library developer used. Maybe he's using Xcode 9.0 or the latest version 9.0.1, with the possibility of different structure of framework. My point is: you have to use the "correct" FileProvider.framework as the library developer's Xcode version. But this is just a guess. If you've tried the framework from v9, try another one which is v9.0.1. Also, make sure you paste in the correct dir. – felixwcf Oct 27 '17 at 07:03
  • But, I am getting this error in Xcode 8.3.2, how to fix this in Xcode 8.3.2 earlier this error was not occured, after installed "Firebase", I am getting this error. – Anilkumar iOS - ReactNative Oct 30 '17 at 10:59
  • @AnilkumariOSdeveloper Bhai Is your issue resolved?? Please let me know... – Anurag Sharma Dec 02 '17 at 22:29
  • @felixwcf my case I just added fileprovider framework now the error is that IOsurface framework is missing. I just added that framework from xcode9 but still it’s throwing the error... any help will be appreciated. – Anurag Sharma Dec 04 '17 at 06:57
  • I think the IOsurface framework is also located inside the same directory. Follow exactly the same steps as the provided answer above. Also, you should persuade your project manager to abandon iOS7 and probably 8. It's not worthy to spend your resources providing supports for very old iOS versions, as not many users now are still using old versions of iOS. Reference: https://developer.apple.com/support/app-store/ and https://data.apteligent.com/ios/ – felixwcf Dec 13 '17 at 13:32
6

One way to fix this is to go to:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/

and put FileProvider.framework to your project (such as copy, paste, then drag and drop to Project's Frameworks Group).

Then wait until XCode 9 is released and remove it.

Edit: There is a problem with this approach though, the app ran on iOS < 11 will crash because the binary for FileProvider won't be found.

To work around this problem:

  • add FileProvider.framework to your project on XCode 8.x

  • link binary with libraries

  • then unlink it.

the project should build without problem now.

EwyynTomato
  • 4,009
  • 1
  • 31
  • 39
  • I have rebuilt some third-part frameworks under xcode 8.3 & IOS 9 environment, and then it works well. Thanks a lot ! Looking forward to XCode 9 release : ) – Ci Kai Sep 11 '17 at 09:27
  • About `To work around this problem`, more details here : https://stackoverflow.com/a/46703798/277277 – Antoine F. Nov 27 '17 at 17:26
5

And when you build with simulator, you should copy the FileProvider.framework into

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/

Leo_Lee
  • 61
  • 2
2

I also have this problem, and I solved it by clean and rebuild project.

zenone
  • 21
  • 3
-1

Try to restart your computer and clean derived data.

mikezs
  • 410
  • 1
  • 8
  • 16