Flight-School / AnyCodable

Type-erased wrappers for Encodable, Decodable, and Codable values
https://flight.school/books/codable
MIT License
1.28k stars 132 forks source link

Error ITMS-90056: Info.plist file is missing the required key: CFBundleVersion #20

Closed SaintNicholas closed 5 years ago

SaintNicholas commented 5 years ago

I got an error while trying to submit to the app store with the AnyCodable framework included in my build. I got the error:

ERROR ITMS-90056: "This bundle Payload/MyApp.app/Frameworks/AnyCodable.framework is invalid. The Info.plist file is missing the required key: CFBundleVersion. Please find more information about CFBundleVersion at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion"

In the AnyCodable_Info.plist I see the following:

CFBundleVersion $(CURRENT_PROJECT_VERSION)

However, I don't see CURRENT_PROJECT_VERSION defined anywhere in the project.

mattt commented 5 years ago

@SaintNicholas How are you including AnyCodable into your project? CocoaPods? Carthage? Some other way?

SaintNicholas commented 5 years ago

@mattt Sorry, should have included more information.

We are using Carthage, with Xcode 10.2.1.

Our project has been successfully pushed to the App Store before, with a number of libraries (Alamofire, RxSwift, etc) included using this same method. This is the first time we've tried to push to the App Store with AnyCodable, and it's the first time we've ever seen this error.

mattt commented 5 years ago

I think this is caused by https://bugs.swift.org/browse/SR-4265. Nearly all the other projects I found on GitHub facing this problem also use Xcode projects generated by Swift Package Manager. Their solutions involved hard-coding CURRENT_PROJECT_VERSION to 1, but I want to see if that's actually the best solution.

SaintNicholas commented 5 years ago

Ok thanks. I'll keep an eye on this issue.

SaintNicholas commented 5 years ago

Hey @mattt, did you find anything out? If you're not going to be able to, that's ok, I just need to find out what I'm going to do in my app to remove the AnyCodable dependency so I can push to Apple.

SaintNicholas commented 5 years ago

Thanks @mattt.

mattt commented 5 years ago

@SaintNicholas Thanks for your patience. I went ahead and cut a new 0.2.2 release that hard-codes CURRENT_PROJECT_VERSION to 1, which should resolve your issue. Please let me know if you have any other problems related to that.

danielsaidi commented 4 years ago

Hi @mattt I have the same problem in a library of mine. Did the hard coded current project version solve this issue for you?

minacle commented 4 years ago

Don't worry, @danielsaidi. It should work.