Cocoapods: iTunes connect invalid bundle: Ensure that app executables and bundled frameworks use consistent architectures

Created on 23 Oct 2017  路  10Comments  路  Source: CocoaPods/CocoaPods

Report

What did you do?

Run pod install after mentioning several frameworks to install Podfile. All dependencies run great on debug mode.
Then before release, we changed the pod architecture to iOS 11, arm64, signing to automatic and selected our team (similar to our core project file).
Archived the project and then submitted it to iTunes connect.

What did you expect to happen?

The submission to be accepted after processing on iTunes connect

What happened instead?

I received this message in my email:
Invalid bundle: Ensure that app executables and bundled frameworks use consistent architectures.

CocoaPods Environment

Stack

   CocoaPods : 1.3.1
        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
    RubyGems : 2.5.2
        Host : Mac OS X 10.13 (17A405)
       Xcode : 9.0 (9A235)
         Git : git version 2.13.5 (Apple Git-94)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : 

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Podfile

platform :ios, '9.0'
use_frameworks!
target 'te' do

    pod 'RecordButton'
    pod 'FSPagerView'

end

target 'te MessagesExtension' do

    pod 'RecordButton'
    pod 'FSPagerView'


end

Project that demonstrates the issue

Sample project: https://we.tl/A9ja03mDur

awaiting input

Most helpful comment

I too was getting this error and tried many things. The last thing I tried was to go through every target in the pods project and make sure the deployment target is set to 11.0 as well. And for good measure, make sure it's set to 11.0 in the Pods project as well.

All 10 comments

Please provide a sample project that makes it easy to demonstrate the issue.

@dnkoutso @benasher44 I have an iMessage app that includes a few Pods Framework. I have already ensured consistant architecture in all the frameworks, while uploading through the Application loader: ie arm64 and tried resubmitting again. All process' get executed but after submission to the iTunes connect and a few minutes of processing, I get the above error in my email.
We have also additionally tried these:

  1. One build: running sh script in build phases to make sure architecture is consistent.
  2. Another build: with even the app executable in arm64 (though this is not needed, empty iMessage template test builds with app executable in arm7, arm7s, arm64 has been submitted and accepted). So I can safely assume that it is the addition of Pods that is causing the trouble.
  3. Making sure that all targets have arm64 in their info, including pods targets.
  4. I have also tried combinations removing and keeping framework, to check if it is a particular framework that is causing the issue, turns out that is not the case.
  5. Making sure all frameworks are in arm64, through the summary presented in application loader
  6. Unchecking organizer submission of 'Bitcode' and 'upload your apps symbols to receive Sybolicated reports from Apple'

None of the above solutions work, no matter what I do.

Please help.

Sample project: https://we.tl/A9ja03mDur

Configurations: Xcode 9, latest iOS 11.0

STEPS TO REPRODUCE

  1. Archive the sample code through XCworkspace,
  2. Export ipa from organizer and
  3. submit through application loader,
  4. Wait for iTunes connect to process.
  5. You will receive a message on email after processing that states the above error.

@dnkoutso @benasher44 Please help

I too was getting this error and tried many things. The last thing I tried was to go through every target in the pods project and make sure the deployment target is set to 11.0 as well. And for good measure, make sure it's set to 11.0 in the Pods project as well.

@cyu I did try that too but there is a dynamic library that in is the project. I am able to get it passed the processing stage without the dynamic library but the moment I include the dylib, this error reoccurs on submission.

I have this issue with my iMessage app. However, uploading the same code with an iOS 10 deployment target is successful. Simply using an iOS 11 deployment target is where the problem starts. As far as I can tell, the pods used are not the issue鈥擨 tried a few different pods in separate builds as a sanity check. Uploading a build with the generated workspace and no pods was also not an issue.

The sample project above appears to have been removed, but this issue is very easy to reproduce. Just use the template iMessage App project in Xcode 9+, add a pod and upload a build. After the build is done processing, you鈥檒l receive an email from iTunes Connect that states:

Invalid Bundle - Ensure that app executables and bundled frameworks use consistent architectures.

I鈥檓 using CocoaPods 1.3.1 and Xcode 9.1. I鈥檝e tried CocoaPods 1.4.0.beta.2 too.

@cyu's suggestion worked for me.
I wrote a post_install script to automate the process.
Since it only affects iTunes builds, I only set the deployment target for non-Debug schemes' build settings.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.name != 'Debug'
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
      end
    end
  end
end

Seems I was a bit hasty in my testing. @cyu's solution is working for me. Thanks for the post_install hook, @ardalahmet.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steffendsommer picture steffendsommer  路  3Comments

evermeer picture evermeer  路  3Comments

Mingmingmew picture Mingmingmew  路  3Comments

dawnnnnn picture dawnnnnn  路  3Comments

tlandsmancars picture tlandsmancars  路  3Comments