-
Notifications
You must be signed in to change notification settings - Fork 454
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
Support On-Demand Resource #742
Conversation
@@ -552,6 +552,36 @@ def add_resources(resource_file_references) | |||
end | |||
end | |||
|
|||
# remove on demand resource files to the resources build phase of the target. |
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.
nit capital case 'R'
Thanks, can you please add tests and a changelog entry? |
Please also run |
# @return [void] | ||
# | ||
def remove_on_demand_resources(on_demand_resource_file_references) | ||
on_demand_resource_file_references.each do |file| |
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.
I guess this is already defined? on_demand_resource_file_references
?
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.
nm I am stupid and this is a parameter. Hmmmm this doesn't really match what the function does. Its just removing resource file reference which can be done in remove_file_reference
inside build_phase.rb
. I don't think this method is really needed.
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.
Or at least can we assert that ASSET_TAGS
is present on these resources?
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.
emmm... Where do I write it more reasonable?
To provide more context: @JunyiXie has written an excellent blog post summarising the changes necessary to @JunyiXie I notice that this PR is waiting on further changes. If any help is needed with communication with @dnkoutso , I'd be happy to (try to) translate. |
next if resources_build_phase.include?(file) | ||
build_file = project.new(PBXBuildFile) | ||
build_file.file_ref = file | ||
build_file.settings = (build_file.settings ||= {}).merge({"ASSET_TAGS" => ["OnDemand"]}) |
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.
I don't think we want to be hard-coding asset tags here. According to Apple's docs tags are supposed to be manually specified, and those tags are then used in code to download the assets
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.
thanks, now use the podspec on_demand_resources specified tag
81403b6#diff-5ee67a82fd5ae8aa882ddaf26476e138R577
I'm sorry I didn't read the GitHub news before, I will improve it in the next few days. |
|
Is there a plan to get this feature included in a future release? My team would love to make use of this functionality |
@JunyiXie i would like to move this feature forward, can you rebase to latest master and add tests? if not I can take over this PR and give you credit for it so I can land it. |
superseded by #844 due to inactivity. giving credit to original author as well. |
CocoaPods/CocoaPods#9606