Archiving a project.
Correct and ready to upload archive is expected.
"Generic Xcode Archive" is created, further investigation showed that ApplicationProperties are missed from the info.plist
Presumably, this is related to the pods which contain resource files.
CocoaPods : 1.5.0
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.5.2
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ fc43809d0fcb810b3f8fcf8de13f169bf69e7046
Executable Path: /usr/local/bin/pod
cocoapods-deintegrate : 1.0.2
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
platform :ios, '10.0'
target 'test' do
pod 'FAQView', '~> 0.5.0'
end
https://www.dropbox.com/s/uh6vhtujaox0pkl/CocoaPodsIssueTestProject.zip?dl=0
Yes, This happens to me as well.
I had to revert to v1.4.0.
1.5.0 per se is not the problem here. It works with 1.5.0 but use_frameworks!
.
Investigating further, although I do give it a chance this is an Xcode issue? Not yet ready to fully claim this though.
I cant figure this out, something is causing Xcode to think the archive is an apple one when frameworks are used compared to when static libs are used.
I can definitely repro but do not have a good idea on what is wrong here.
I may have found the cause.
The archive contains an additional file when removing use_frameworks!
: Products/Applications/assetcatalog_generated_info.plist
.
In the archive logs, I see that both build phases Compile asset catalogs
and [CP] Copy Pods Resources
generate this file, but not in the same path:
Xcode:
ArchiveIntermediates/test/IntermediateBuildFilesPath/test.build/Release-iphoneos/test.build/assetcatalog_generated_info.plist
CocoaPods:
ArchiveIntermediates/test/InstallationBuildProductsLocation/Applications/assetcatalog_generated_info.plist
The path is also different for debug builds:
Xcode:
Build/Intermediates.noindex/test.build/Debug-iphoneos/test.build/assetcatalog_generated_info.plist
CocoaPods:
Build/Products/Debug-iphoneos/assetcatalog_generated_info.plist
In Pods-test-resources.sh
, line 122, I tried replacing --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist"
with --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info.plist"
. The paths in the build logs matched and the archive generated was valid 🙂.
@MaximeLM very nice! We would need to verify if this change breaks https://github.com/CocoaPods/CocoaPods/issues/7003 which was the initial fix for
I also got this problem when declaring use_frameworks!
in the Podfile
and the main project depend on a static_framework repo that mix swift and Objective-C (I specified spec.static_framework = true
for that repo), cocoapods 1.5.0.
And I check the generic Xcode archive, find ApplicationProperties
is missing for the Info.plist
and assetcatalog_generated_info.plist
is added to Products/Applications/
.
After adding ApplicationProperties
to Info.plist
manually, it comes back to work.
But i'm not sure this fixing way is correct enough for uploading the IPA to AppStore, it just work for in-house
CI build.
so @MaximeLM may catch the cause.
Maybe #7301 is caused by the same issue?
Just confirming @MaximeLM's suggestion worked in a test branch to build a recognizable xcarchive
, although I haven't been able to confirm submitting the subsequent .ipa
build to iTunes.
For a __temp__ fix until 1.5.1
, you can run the following sed
script:
find ./ -type f -name "*resources.sh" -exec sed -i '' -e 's/\${TARGET_BUILD_DIR}\/assetcatalog_generated_info.plist/\${TARGET_TEMP_DIR}\/assetcatalog_generated_info.plist/' {} \;
I can confirm this was an issue until I switched to frameworks. thanks guys!
@sghiassy after running the script inside the app directory, archiving worked as expected: '*.xcarchive' is of type 'iOS App Archive' now. I was also able to upload it to the App Store and it processed without problems. Thanks a lot!!!
@jeffreyjackson for me, it was the other way round. I switched to static libraries and it stopped working...
@dnkoutso 1.5.1 plan release at?
${TARGET_TEMP_DIR} will caused app be black at top and bottom.
It be similar without LaunchImage。
But ${BUILD_DIR} have no problem。
@dnkoutso
@wangjindong this is not live support place. If you have an issue please investigate and provide a solution for others. I have no idea why this is happening.
Most helpful comment
I may have found the cause.
The archive contains an additional file when removing
use_frameworks!
:Products/Applications/assetcatalog_generated_info.plist
.In the archive logs, I see that both build phases
Compile asset catalogs
and[CP] Copy Pods Resources
generate this file, but not in the same path:Xcode:
ArchiveIntermediates/test/IntermediateBuildFilesPath/test.build/Release-iphoneos/test.build/assetcatalog_generated_info.plist
CocoaPods:
ArchiveIntermediates/test/InstallationBuildProductsLocation/Applications/assetcatalog_generated_info.plist
The path is also different for debug builds:
Xcode:
Build/Intermediates.noindex/test.build/Debug-iphoneos/test.build/assetcatalog_generated_info.plist
CocoaPods:
Build/Products/Debug-iphoneos/assetcatalog_generated_info.plist
In
Pods-test-resources.sh
, line 122, I tried replacing--output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist"
with--output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info.plist"
. The paths in the build logs matched and the archive generated was valid 🙂.