New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gym] Copy Asset Pack into output directory #16117
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
+1 |
yay! thanks for doing this! waiting when it will be merged |
@CRoig tnx |
@CRoig thanks for this. Saved me a lot of time :) |
@CRoig TIL about asset packs 😊 And thanks for those testing steps! Going to test this on my test project but code looks 💯 . Thanks for doing this! |
Today I Learned what TIL stands for 🤣 |
First of all thanks for the code it creates the asset packs when I run Fastlane. The problem I am seeing is that when I generate the assetpack using Fastlane I am not able to download it . I am getting a
I then went to Xcode and archived my project and generated the OnDemandResources folder with the same assetpack. After doing this I can now download my assetpack when I run my app. Not sure if anyone else is experiencing the same issue. Few differences that I have noticed is that when I generate a asset pack via Xcode the name appends the end bit of the bundle key string that is in the AssetPackManifest.plist. the screenshot below is from the assetpack that downloads correctly. Screen shot of the assetpack that does not download correctly Cant really see any other difference between the two assetpack that I have uploaded to the server. Can some one please help. Thanks in advance. |
Hi @fahadhaq, I faced same problem in the past. Somehow maybe your are copying to the server some packs that does not match with AssetPackManifest.plist. I know it is obvious, but this is the root cause of your problem. In my case, I faced 2 problems, I solved by deeply understanding how it worked:
I created a gitlab pipeline to upload directly asset packs generated on build output path using this actual PR, and everything seems fine to me. Also worth to define the following
Good luck. PS: it is a pity there is no so detailed documentation on this topic. I am about to write kind of a Medium tutorial to export and update assetpack (to use ODR) using fastlane. |
Thanks for your help @CRoig. My issue was I was using Legacy build system win Fastlane to create the On Demand resources and when running my app from Xcode I was using the new build system. That is why I couldn't access my Resources and nothing was downloading. Hope this will help someone. Make sure the build systems are same when creating and running the app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks so much for adding this feature 😊 Really appreciate the contribution ❤️ This will be released today
Hey @CRoig 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations! 🎉 This was released as part of fastlane 2.144.0 🚀
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
This changes make easier to locate the
assetpack
files generated during the export phase. Before this change, the asset packs were created in the temporary output folder. Gym tool only copied.ipa
,.dSym
, andApps
folder.Locating asset pack files is very helpful if you want to upload automatically your remote assets into a particular server.
I opened an issue (#16037) in order to ask the community how was I supposed to access the asset pack files. During my investigation I found out this feature was not implemented, so I implemented myself.
Description
I extended
runner.rb
functionality to copyOnDemandResources
asApps
folder andipa
anddSym
files.I installed the gem from my repo and archived my project using fastlane gym. I could see on the console the path to the asset packs output and verified the files were in the expected location.
Testing Steps
In order to verify the functionality works, project should have "Enable On Demand Resources" set to "Yes" in the iOS Project
Build Settings
menu. In addition, at least one assets should have a tag assigned. This tag will appear under iOS ProjectResource Tags
menu.Gym export options should include the following parameters: