DaveWoodCom / XCGLogger

A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Critical: "The app contains one or more corrupted binaries. Rebuild the app and resubmit."

markuswinkler opened this issue · comments

This version prevents app from being accepted by iTunes Connect.
Always gets bounced back with the error message:
"The app contains one or more corrupted binaries. Rebuild the app and resubmit."

I had to submit an empty app and add cocoapods piece by piece until I found the
offending one. Unfortunately it was XCGLogger.

Can you send me more information please. Ideally the full details of what iTC reported (was it an instant/automated response or did a reviewer reject it), the .ipa you submitted, what Xcode version you used, the version of CocoaPods, and how you submitted the app (Xcode, Application Loader, Fastlane etc).

This doesn't sound like it's an issue with XCGLogger. I submitted an app a couple of days ago with the current XCGLogger and it was approved without issue. But I'll test any info you can send me.

Thanks.

Sure, this only happens since yesterday (I've been using XCGLogger for for two years now). Just try to submit an app with XCGLogger and it will get automatically rejected within a minute.
Xcode: 9.2
Upload: Application Loader, Fastlane (both fail)
Cocoapods: 1.4

Reject email is:

Dear developer,

We have discovered one or more issues with your recent delivery for "Pretzel - travel & languages". To process your delivery, the following issues must be corrected:

Non-public API usage:

The app contains one or more corrupted binaries. Rebuild the app and resubmit.
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.

If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to appreview@apple.com. For further information, visit the Technical Support Information page.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

Hmm, so not really corrupt, they're flagging a function name. Annoying. Just triggered a build/submit of my app now, testing to see if I get the same message. Did you get that message just after uploading/processing, or did you have to actually submit the build for it to trigger the message?

Immediately after uploading a new build.

Also, thank you for your fast reply. Very much appreciated. XCGLogger in combination with NSLogger (I wrote the connector pod) is a corner stone of my dev environment. Great idea and work!

No problem. I want to make sure any major issue is tackled pretty quickly. Of course, you could always show your support by downloading my current app: All the Rings. It's free to download, but you could always buy an IAP too. :)

Ok, my build just finished processing. Went through without issue. I even submitted it as an update without a problem.

My build server is using Xcode 9.2, though with CocoaPods 1.3.1. It's running Sierra still, but I doubt that would make a difference.

Do you want to try again, perhaps using CocoaPods 1.3.1? Or send me a copy of your podfile and the .ipa?

I updated my build server to CocoaPods 1.4.0 and created a new build etc. Went through fine as well.

Hmm, that is really strange. I just emptied the whole project except for XCGLogger and it got rejected (also running Sierra).

Podfile:

platform :ios, '10.3'
use_frameworks!
inhibit_all_warnings!

target 'xxxxxxx' do
  pod 'XCGLogger', '<= 6.0.2'
end

post_install do |installer| 
  puts("Disable bitcode")
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config| 
      config.build_settings['ENABLE_BITCODE'] = 'NO' 
    end
  end
  puts("Update debug pod settings to speed up build time")
  Dir.glob(File.join("Pods", "**", "Pods*{debug,Private}.xcconfig")).each do |file|
	  File.open(file, 'a') { |f| f.puts "\nDEBUG_INFORMATION_FORMAT = dwarf" }
  end
  puts("Set deployment target")
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.3'
    end
  end
end

AppDelegate:

import UIKit
import UserNotifications
import XCGLogger

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
    
    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
 
        let log = XCGLogger.default
        return true
    }
}

I'd try creating a new build from the commit that you last had approved, and try uploading that. If that is flagged, it means something changed on iTC's end. If it goes through again without issue, then something else you've changed since would be the issue.

I'd also try without the post_install hook you've got in your podfile.

Thanks!
At least I don't seem to be the only one:
stackoverflow
twitter

FOUND IT!
You put me on the right track. After couple more submits I could verify that this part of the podfile caused it:

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.3'
    end
  end

But why setting the deployment target creates an invalid binary is really puzzling.

Excellent. Glad you got it sorted out. Closing this ticket since it's not XCGLogger related.