-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add support for On Demand Resources tags on iOS #87
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution, definitely looks valuable. Unfortunately I have very limited time to review right now due to some other priorities, hope another committer can take a look. Please feel free to follow up with us on Slack or on the mailing list, follow links in the footer of cordova.io for contact info. |
An off-topic comment is that I think it would be nice for cordova-ios and React Native (which also seems to use this xcode package) to support the ODR functionality as well. |
Hello @brodybits , thanks for the feedback. it is very appreciated to see interest. We are quite happy with it in our day to day usage, the worst bit about it is is just ODR in general that once you start to use ODR the App Store build processing time (before the build is available for submission or internal TestFlight Beta Testing) becomes a lot longer (8-10x the regular processing time in our experience even for hand added ODR tags). |
What is the status of this proposal? Thanks for raising the discussion in #88. I think the discussion should continue there, unless this proposal is ready for review and consideration. |
Thanks @brodybits , I would think this proposal is ready for review and consideration, but since I am not 102.45% sure, I guess there is some more we can talk about it in the issue #88 ? I have also opened a thread in the dev mailing list as it was suggesed to me on the Cordova slack channel. Thanks for monitoring and replying to raised PR's :). |
Hi all, It looks like Apple only lets you access those ODR using their native API (NSBundleResourceRequest) and I haven't seen a Cordova plugin that does that for us.. Thanks PS. I ended up creating my own plugin to download and load ODR (HTML 5 games in my case) from the file system into an iframe in the (Ionic Engine powered) Webview. |
Hi @Panajev, thank you for your contribution! I'm going and try to use your branch to add ODR in my mobile build pipeline. In your code snippet above I assume that this:
..should be:
Correct? Thanks! |
Hello Gabriele,
Yes, sorry left the actual folder in the sample code. Let us know how it works for you.
We ship with quite a lot of ODR content in a whitelabeled app where the list of content items and thus ODR tags varies at build time (potentially every time you build). Handling that manually just does not work for us...
Kind Regards,
Goffredo
…Sent from my iPhone
> On 27 Apr 2020, at 02:30, gabriele-sacchi ***@***.***> wrote:
Hi @Panajev, thank you for your contribution! I'm going and try to use your branch to add ODR in my mobile build pipeline.
In your code snippet above I assume that this:
myProj.addAssetTag(file, gamesData/resources/${file});
..should be:
myProj.addAssetTag(file, ${resourcesFolder}/${file});
Correct?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Panajev It works, thank you very much. It's a very useful tool that makes my life much better! I'm wondering if you also encountered the case of wanting to host the ODR resources on a webserver (instead of TestFlight, Apple Store) for testing purposes (ie. Internal QA Apps). Doing a git diff I have seen that the only thing that changes when I add a value in XCode for "Asset Pack Manifest URL Prefix" is ASSET_PACK_MANIFEST_URL_PREFIX, so I think I can fix that with a Cordova hook. Or is it possible to change that with this plugin too? 🤔 Same thing for when you Archive the App, when in XCode instead of "Embed in App" you choose "Host on Server", does this plugin or your fork allow us to configure that URL programmatically? ( SO for the latter: https://stackoverflow.com/questions/61463826/configure-embed-asset-packs-in-product-bundle-in-build-pipeline-to-fetch-ios-on ) Thanks, much appreciated! 🙂 |
Hello @gabriele-sacchi,
We have worked on something similar, helpful for debugging as tools such as
Firebase App Distribution will laugh at you if you try to package all the
ODR tags in the app and since you may have changes in the tags themselves
you cannot just rely on the App Store Connect ones. I think the hook
solution is fine, but the complex part of the pipeline becomes tag
generation and syncing than the URL prefix setting I think.
Kind Regards,
Goffredo
…On Mon, Apr 27, 2020 at 10:26 AM gabriele-sacchi ***@***.***> wrote:
@Panajev <https://github.com/Panajev> It works, thank you very much. It's
a very useful tool that makes my life much better!
I'm wondering if you also encountered the case of wanting to host the ODR
resources on a webserver (instead of TestFlight, Apple Store) for testing
purposes (ie. Internal QA Apps).
Doing a git diff I have seen that the only thing that changes when I add a
value in XCode for "Asset Pack Manifest URL Prefix" is
ASSET_PACK_MANIFEST_URL_PREFIX, so I think I can fix that with a Cordova
hook. Or is it possible to change that with this plugin too? 🤔
Same thing for when you Archive the App, when in XCode instead of "Embed
in App" you choose "Host on Server", does this plugin or your fork allow us
to configure that URL programmatically?
(EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = false, plus the URL)
Thanks, much appreciated! 🙂
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEJOL66U36XEX7A77EU6RTROVFVLANCNFSM4K7XEJ4A>
.
|
I think your use case for the games is very similar to ours hehe :).Still many think we won a Pyrrhic victory there on the HTML5 angle as the war of the s-like interface was the real goal. |
Signed-off-by: Goffredo Marocchi <[email protected]> # Conflicts: # package.json
6577ce4
to
b7ac07a
Compare
Signed-off-by: Goffredo Marocchi <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #87 +/- ##
==========================================
- Coverage 89.97% 88.58% -1.40%
==========================================
Files 6 6
Lines 2374 2417 +43
==========================================
+ Hits 2136 2141 +5
- Misses 238 276 +38 ☔ View full report in Codecov by Sentry. |
Maintainers have been pretty overloaded with major release items, many of us have limited time due to day jobs as well. Anything that can help us better understand and test this functionality would be much appreciated. |
Hello Chris,
Thanks for your reply, I will be talking to the devs to update this PR with some additional comments.
As we were discussing earlier in the thread, we were in need of adding ODR asset tags to our whitelabelled application and each “variant” may need a sizeable variety of different On Demand Resources that would not be feasible to add manually.
This set of changes adds features to add and remove On Demand Resources tags you the Xcode Project allowing you to also support some variants with and some without ODR support without leaving lots of cruft behind. We have extended the sample project a bit, but if useful we can expand more on it. What would you suggest to add to make it compatible with the upstream project?
…Sent from my iPhone
On 12 Jun 2020, at 19:55, Chris Brody ***@***.***> wrote:
Maintainers have been pretty overloaded with major release items, many of us have limited time due to day jobs as well. Anything that can help us better understand and test this functionality would be much appreciated.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
About this issue, did it require putting up a local in app web server in order to serve those games? Or is it enough to put the iframe source to the ODS game index.html? |
Hi, yes, usually for html5 payloads a webserver on the phone would be required. But this is more a matter of the implementation of your specific application. ODRs can contain literally anything at all, and should be considered simply representations of tags and filesystem references from xCode's perspective. It is now nearing the end of 2022, ODR is more mature and more commonly a requirement of larger iOS apps, and I wonder if there has been any more recent discussion of merging, or a summary of the roadblocks preventing such? |
Hey there, what is the status of getting this PR merged? |
Background
One of the biggest drawbacks of Apple's On Demand Resources, especially for single codebase white labeled applications with a multitude of content that is meant for ODR and possibly also not under direct app team control. is how GUI based it is forcing lots of manual steps to be performed by the developer on Xcode to add, remove, and modify asset tags. [Gamesys](
Switching across branches and building different "flavours" of the app (same branch, multiple apps built from the shared codebase) that do not require/use ODR presents problems if for example a developer mistakenly committed the ODR changes and tries to build another app: bigger upload and processing time at best, build failure at worst.
Goal of this PR
After doing the process manually for a single ODR tag in Xcode once we recorded each step and the changes on the Xcode process and came up with a modification on this project we were already familiar with from when we had to maintain a white labeled cordova base app in the team.
The aim for this is to add the capability to add/update resources, new asset tags, as well as delete tags from an Xcode project programmatically using this command line tool.
Features
Usage
JS script using the extended plugin to Delete Tags:
JS script using the extended plugin to Add Tags:
Note(s):
Original writer: Thierry Yseboodt ([email protected])
PR Review and publishing: Goffredo Marocchi ([email protected])
About Us:
Gamesys Group plc | Overviewwww.gamesysgroup.com › about-us) has been working on fully native, fully cordova based hybrid, and mixed native web component apps.