Skip to content

BuildFrameworks generates frameworks that cannot be signed #455

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

Closed
anaisbetts opened this issue Nov 14, 2017 · 9 comments
Closed

BuildFrameworks generates frameworks that cannot be signed #455

anaisbetts opened this issue Nov 14, 2017 · 9 comments
Assignees

Comments

@anaisbetts
Copy link

anaisbetts commented Nov 14, 2017

Describe your environment

  • Xcode version: 9.1.0
  • Firebase SDK version: master
  • Firebase Component: n/a
  • Component version: n/a

Describe the problem

Steps to reproduce:

BuildFrameworks's build.swift generates Framework folders that have a number of problems in practice:

  • The naming convention is not usable out-of-the-box, the linker will go looking for FirebaseCore_macOS/FirebaseCore_macOS while the actual binary is FirebaseCore/FirebaseCore. This is perhaps a documentation issue, but the error that ld throws is very broad and Googling will lead you down many incorrect paths

  • The generated Frameworks are manually put-together via build.swift and don't have a Versions folder. clang and ld don't seem to mind this, but codesign on Xcode 9.x seems to barf on these binaries, trying to find a Versions/A folder

  • codesign relies on Resources/Info.plist to exist and be at least somewhat correctly filled out, or it doesn't know which actual file to sign

anaisbetts added a commit to anaisbetts/firebase-ios-sdk that referenced this issue Nov 15, 2017
The framework generated by build.swift out of the box needs some work to
be compatible with codesign. This commit adds a script that adds in the
expected "Versions" folder similar to frameworks generated by Xcode

Closes firebase#455
@firebase firebase deleted a comment from google-oss-bot Nov 15, 2017
@morganchen12
Copy link
Contributor

@paulb777 is this still necessary with CocoaPods 1.4.x and higher's static_framework rule?

@anaisbetts
Copy link
Author

@morganchen12 Is it 100% necessary to use this with Cocoapods? I'm trying to just vendor the built frameworks (we use Carthage for our project)

@paulb777
Copy link
Member

@paulcbetts I suspect the core problem is that you're trying to treat the Firebase static framework CocoaPods as dynamic frameworks in Carthage and you're running into something like Carthage/Carthage#1936

Have you tried with the instructions in the "Integrate without CocoaPods" section at https://firebase.google.com/docs/ios/setup? I suspect you'd have exactly the same problem.

@morganchen12 Yes, the build.swift script is going away in the upcoming #444 that will make the open source Firebase interoperable with the released version of Firebase.

Firebase working with Carthage is being tracked at #9.

@anaisbetts
Copy link
Author

@paulb777 This is entirely possible, I'll look into the ObjC linker flag. To be clear, I'm not using Carthage with Firebase in any way, I'm simply dropping the output of BuildFrameworks into a folder then attempting to point the compiler at it

@paulb777
Copy link
Member

@paulcbetts Ah, ok. I misunderstood your comment about Carthage. You could take a look at how CocoaPods links vendored static frameworks as a reference.

@anaisbetts
Copy link
Author

We do vendor official binary downloads that are (of course) built in Google without any open-source scripting. Is this an issue with those binaries as well?

I'm trying to use the unofficial macOS support which is why I have to build my own, I'd definitely love to be out of that game and use prebuilt binaries!

@paulb777
Copy link
Member

@paulcbetts One approach would be to make a Podfile with all of the FirebaseCommunity subspecs you need and grab the resulting intermediate FirebaseCommunity framework.

@morganchen12
Copy link
Contributor

This is really indirect, though, and CocoaPods modifies the xcodeproj file which is what Carthage was basically specifically built to avoid. I think keeping a build script around for binary installations of the unofficial macOS release is reasonable.

@anaisbetts
Copy link
Author

Closing this since build.swift is going away

@firebase firebase locked and limited conversation to collaborators Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants