Cocoapods: Embed frameworks build phases missing after running `pod install`

Created on 20 Feb 2019  Â·  7Comments  Â·  Source: CocoaPods/CocoaPods

Report

What did you do?

  1. Created a brand new sample iOS single view project
  2. Created a new Podfile, with the following contents:
platform :ios, '12.0'

target 'Simple Sample' do
  pod 'Reveal-SDK', :configurations => ['Debug']
end
  1. Run pod install
  2. Opened Simple Sample.xcworkspace
  3. Run the app in Xcode

What did you expect to happen?

The app to run without issue.

What happened instead?

The app crashed at launch due to the missing vendor framework that should have been provided by CocoaPods:

dyld: Library not loaded: @rpath/RevealServer.framework/RevealServer
  Referenced from: /Users/tonyarnold/Library/Developer/CoreSimulator/Devices/70E3F476-9F99-4B34-B9C6-094A51FAEADF/data/Containers/Bundle/Application/F2C25678-8E2E-451B-9A92-9A62DF3AAD0E/Simple Sample.app/Simple Sample
  Reason: image not found

It appears that no [CP] Build Phases save for the manifest check have been created.

CocoaPods Environment

Stack

   CocoaPods : 1.6.0
        Ruby : ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
    RubyGems : 2.7.6
        Host : Mac OS X 10.14.3 (18D109)
       Xcode : 10.1 (10B61)
         Git : git version 2.20.1
Ruby lib dir : /Users/tonyarnold/.rbenv/versions/2.5.3/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 95325f661b91e197f987932030ea63362fddcaee

Installation Source

Executable Path: /Users/tonyarnold/.rbenv/versions/2.5.3/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

Podfile

platform :ios, '12.0'

target 'Simple Sample' do
  pod 'Reveal-SDK', :configurations => ['Debug']
end

Project that demonstrates the issue

Simple Sample.zip

confirmed detailed defect

Most helpful comment

Same here after updating to Reveal SDK 21.

All 7 comments

Same here after updating to Reveal SDK 21.

It is because RevealServer binary supports arm64e:

RevealServer: Mach-O universal binary with 5 architectures: [i386:Mach-O dynamically linked shared library i386] [arm64]
RevealServer (for architecture i386):   Mach-O dynamically linked shared library i386
RevealServer (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
RevealServer (for architecture armv7):  Mach-O dynamically linked shared library arm_v7
RevealServer (for architecture arm64):  Mach-O 64-bit dynamically linked shared library arm64
RevealServer (for architecture arm64e): Mach-O 64-bit dynamically linked shared library arm64

This causes ruby-macho lib to crash with:

Unrecognized CPU sub-type: 0x00000002 (for CPU type: 0x0100000c)

Therefore treating this as a non dynamic framework and everything cascades from there. CocoaPods does not find any valid dynamic frameworks and therefore does not add the "Embed Pod Frameworks" script phase.

/cc @woodruffw

Thanks for the ping! Yeah, ruby-macho needs to support CPU_SUBTYPE_ARM64E (0x02). I'll add that and cut a new release tonight.

Thanks @woodruffw ! I am not sure if I did it right but I opened PR against 2.0-compat https://github.com/Homebrew/ruby-macho/pull/136.

Works for me locally and fixes this issue. Don't wait on me if I've done something wrong and I am not available :)

Alright, I've cut a new compatibility release: 1.4.0. I'll open a PR in a bit.

Shipped 1.6.1

Thanks, @dnkoutso! 🎉

Was this page helpful?
0 / 5 - 0 ratings