Closed illaz closed 8 years ago
There are Swift 2.1, Swift 2.1.1, and Swift 2.2 compatible branches and tags (for Swift 2.1 and 2.2) for the moment, but we will put more effort into this soon!
Sorry, maybe it wasn't clear what my exact problem is. If I upload an app (which uses Heimdallr) to TestFlight, Apple rejects it instantly during upload since there is a "beta" keyword in the Heimdallr podspec.
subspec.dependency 'Result', '0.6.0-beta.4'
The funny thing is if I fix it manually (changing 0.6.0-beta.4
to 0.6.0
) everything works fine (even if it's still the same Result code). So Apple simply seems to check the uploaded files for the "beta" strings.
It's also interesting that Apple doesn't beef about the "alpha" at ReactiveCocoa. Maybe that's the case because Apple likes Alphas more than Betas... or it isn't such a simple check and it doesn't beef because we don't use ReactiveCocoa.
I will upgrade to your Swift 2.2 branch and give feedback after our next release in February. Maybe Apple accepts it despite the spec.version = '3.1.0-alpha.3'
;)
You might also use the following post install hook:
post_install do |installer|
plist_buddy = "/usr/libexec/PlistBuddy"
# Fix poorly formatted versions.
installer.pods_project.targets.each do |target|
plist = "Pods/Target Support Files/#{target}/Info.plist"
version = `#{plist_buddy} -c "Print CFBundleShortVersionString" "#{plist}"`.strip
version_stripped = /^([\d\.]*)/.match(version).captures[0]
version_components = version_stripped.split('.').map { |s| s.to_i }
# Ignore properly formatted versions.
unless version_components.slice(0..2).join('.') == version
major, minor, patch = version_components
minor ||= 0
patch ||= 0
version_fixed = "#{major}.#{minor}.#{patch}"
puts "Changing version of #{target} from #{version} to #{version_fixed}."
`#{plist_buddy} -c "Set CFBundleShortVersionString #{version_fixed}" "#{plist}"`
end
end
end
Works like a charm. Thank you very much!
Since Apple doesn't allow to upload targets using a "beta" to iTunesConnect, please update the dependency of Result to 1.0.0.
Thank you!