FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

Cannot build app for distribution due to FirebaseDatabaseUI not being bitcode compatible

Open toddlee opened this issue 10 years ago • 24 comments

When trying to build for app submission, I get this error and can't build for release.

ld: bitcode bundle could not be generated because '/Users/todd/Development/projects/Mmm/Pods/FirebaseUI/FirebaseUIFrameworks/Database/Frameworks/FirebaseDatabaseUI.framework/FirebaseDatabaseUI(FirebaseCollectionViewDataSource.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

toddlee avatar May 22 '16 07:05 toddlee

Looks like the issue here is that we're not building the Framework with the -fembed-bitcode flag. That's an easy fix to https://github.com/firebase/FirebaseUI-iOS/blob/master/build_database.sh#L39, but it might take me a few days to get things pushed out.

In the meantime, feel free to clone the repo, add the flag, chmod +x build_database.sh and run ./build_database.sh to get a bitcode enabled framework.

asciimike avatar May 22 '16 17:05 asciimike

Hi, I have the same issue as Toddlee. I cloned the project and added the C FLAG below: OTHER_CFLAGS="-fembed-bitcode" \

Though now I am getting the below compilation error:

** BUILD FAILED **

The following build commands failed: Libtool target/Intermediates/FirebaseUI.build/Release-iphoneos/Database.build/Objects-normal/armv7s/libDatabase.a normal armv7s Libtool target/Intermediates/FirebaseUI.build/Release-iphoneos/Database.build/Objects-normal/arm64/libDatabase.a normal arm64 Libtool target/Intermediates/FirebaseUI.build/Release-iphoneos/Database.build/Objects-normal/armv7/libDatabase.a normal armv7 (3 failures)

Any ideas why?

Thanks a lot

yacine555 avatar Jun 03 '16 22:06 yacine555

@mcdonamp Does that mean we will have to do a manual install outside of cocoapods? Could you explain the steps as I'm not able to compile my app and turning bitcode off isn't an option. @toddlee what did you do to get it resolved? Thanks!

kressm avatar Jun 15 '16 05:06 kressm

I think I cloned the repository, added the all files (*.m & *.h) directly to my project.. it isn't ideal but for now, it's a quick workaround.

toddlee avatar Jun 15 '16 07:06 toddlee

Fun times with bugs... Looks like there's an issue with XCode 7.3 which doesn't let you build with bitcode enabled from a script (which is what we do), even if you have bitcode enabled in your project (which we do). See http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode for more details.

Trying to work around that (I may install XCode 8 if I'm feeling like living on the edge), otherwise I'll change the build script to use their "recommended" hacks.

asciimike avatar Jun 15 '16 18:06 asciimike

@mcdonamp Is there nothing I can do for a workaround until you make the changes to the script available through cocoapods? I don't see how I can modify the script. Any help would be great as I really need a workaround ASAP. Thanks!

kressm avatar Jun 16 '16 02:06 kressm

@kressm it's all open source code, so you're welcome to use it locally and play around with it to try and make it work--you're not blocked on me doing anything. I'm looking at adding an unset TOOLCHAIN to the build script, but I haven't been able to verify if that solves the problem yet.

asciimike avatar Jun 16 '16 03:06 asciimike

any news on the bug?

tadasz avatar Jul 07 '16 14:07 tadasz

Has this bug been fixed? I still can't build my app for submission...

seanpc9 avatar Aug 19 '16 18:08 seanpc9

@morganchen12 I think this should be solved in your build process. Can you make sure we're adding bitcode support here (should be in the scheme we build the library from, though we may need to add it in the build script).

asciimike avatar Aug 20 '16 18:08 asciimike

Any ETA on when we might expect a fix for this?

mlake avatar Aug 22 '16 19:08 mlake

+1 this issue

For now, it was ok for me to disable bit code in the Target Build Settings (enable Bitcode == NO) to unblock.

chadpav avatar Aug 24 '16 03:08 chadpav

I'm working on this and will hopefully get it done by early next week.

morganchen12 avatar Aug 25 '16 17:08 morganchen12

This should be fixed in the latest release. If it's not, reopen and I'll take a look again. 👍

morganchen12 avatar Sep 08 '16 17:09 morganchen12

Still got this error:

bitcode bundle could not be generated because 'Pods/FirebaseUI/FirebaseUIFrameworks/Auth/Frameworks/FirebaseAuthUI.framework/FirebaseAuthUI(FIRAuthPickerViewController.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

This was after upgrading to version 0.5.

seanpc9 avatar Sep 08 '16 22:09 seanpc9

I'll take a look.

morganchen12 avatar Sep 08 '16 22:09 morganchen12

@seanpc9 this should be fixed for real in the 0.5.1 release.

morganchen12 avatar Sep 09 '16 00:09 morganchen12

@morganchen12 it does indeed work, thank you!

seanpc9 avatar Sep 09 '16 00:09 seanpc9

I broke this when fixing the whole library not working, gonna try to address this again soon

morganchen12 avatar Sep 12 '16 17:09 morganchen12

Same issue for me. Just made a pod update. => Installing FirebaseUI 0.5.4 (was 0.4.0)

But now, got this error : [FIRAuthUI authUI] => No known class method for selector authUI... :(

LeChatNoir69 avatar Sep 13 '16 06:09 LeChatNoir69