Skip to content
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

Reconfigure the project in order to rid of Resources bundle #795

Closed
YuriyVelichkoPI opened this issue Feb 23, 2023 · 10 comments
Closed

Reconfigure the project in order to rid of Resources bundle #795

YuriyVelichkoPI opened this issue Feb 23, 2023 · 10 comments
Assignees
Milestone

Comments

@YuriyVelichkoPI
Copy link
Contributor

Looks like the most optimal way is to get rid of the resource bundle. We see that other SDKs, such as GMA SDK and MAX, do not add resource bundles to the app.

The following table describes how we can migrate to a resourceless product.

Resource Name Migration action
companion.html Use a static markup string in the code.
ClickthroughBrowserView.nib Migrate to SFSafariViewController, or create UI layout programmaticaly
Assets.car Use base64 encoded data instead of assets
mraid.js Download from cloud or CDN on demand
omsdk.js Download from cloud or CDN on demand

Originally posted by @YuriyVelichkoPI in #772 (comment)

@YuriyVelichkoPI
Copy link
Contributor Author

Hi @bretg, @ChrisHuie, @mmullin

In the scope of this ticket, we would like to host two files on Prebid's S3:

  • mraid.js
  • omsdk.js

It is a common practice and expected behavior for SDKs to host these files on the web and download them on SDK initialization.

Can you help us with this?

@bretg
Copy link
Contributor

bretg commented Apr 18, 2023

@YuriyVelichkoPI - let's talk about this. AWS cloudwatch is incredibly expensive, and I'm not sure that Prebid wants to have the data trail about SDK usage.

I would prefer to provide instructions for app developers to host this on their own, providing a config/method to tell the SDK where the files are located.

@YuriyVelichkoPI
Copy link
Contributor Author

@bretg, I see. In this case, let's just keep the content of files in string objects in the codebase. If we face the necessity of online updates, we introduce this feature in the manner that you proposed. But so far, it is unnecessary and will make SDK configuration more complex from the publisher's perspective.

@bretg
Copy link
Contributor

bretg commented Apr 18, 2023

An alternate option would be to host these files on jsdelivr instead of AWS. This is free to us.

e.g. several other Prebid files are stored there:

@YuriyVelichkoPI
Copy link
Contributor Author

YuriyVelichkoPI commented Apr 18, 2023

It should work for the SDK.

@bretg
Copy link
Contributor

bretg commented Apr 18, 2023

Cool - you'll have to figure out how to get the files there... there's not a standard way. The currency file is done in a pretty simple way -- jsdelivr can source it right from github if you'd like.

@chwo
Copy link

chwo commented Apr 28, 2023

Hello 👋

Do you have any estimated time of arrival for the version 2.1.1 with this fix?

Because currently we are unable to update the PrebidMobile sdk to version 2.x and are stuck on version 1.12.2:

@YuriyVelichkoPI
Copy link
Contributor Author

Hi @chwo ! Why can't you sign the Resources bundle in the app manually?

@chwo
Copy link

chwo commented May 4, 2023

I probably could but I think it is very unusual that the consumer of the the framework has to sign it. However I noticed that the bundle resources issue does no longer occur in the latest CocoaPods version (see CocoaPods/CocoaPods#11402). So switching to the latest CocoaPods version fixed it for me.

@YuriyVelichkoPI
Copy link
Contributor Author

Yep, sure, it's not the best practice, but at least it frees from the blocker.

It's excellent that CocoaPods fix the issue.

In any case, we will remove the resource bundle next release. As usual, we release new versions once per two months if nothing urgent appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants