Glench / ExtPay

The JavaScript library for ExtensionPay.com — payments for your browser extensions, no server needed.
https://extensionpay.com
Other
487 stars 62 forks source link

Safari bug — `ext_info` is null #20

Closed Glench closed 2 years ago

Glench commented 2 years ago

image

orschiro commented 2 years ago

@Glench any news on this bug?

surtic86 commented 2 years ago

How is it going with Safari Support?

Btw. just to show how much of a Market we are missing out alone in the US.

https://www.statista.com/statistics/272664/market-share-held-by-mobile-browsers-in-the-us/

Glench commented 2 years ago

@orschiro @surtic86 can you try this out and let me know how it goes? I believe ExtPay should be totally working with Safari now, but I haven't tried publishing an extension with ExtPay as the payment system on the Apple extension app store. I expect Apple would reject it based on their business policy, in which case ExtPay might just need to integrate with the built-in in-app purchases for the app store. But I'd love someone to try and see.

surtic86 commented 2 years ago

@Glench Sure i will test it. I have just released my Extension for Safari on iOS and macOS without the Premium function to check it all out if it would work.

So i prepare in that case a Update with the Paid function and we will see if Apple allows it.

surtic86 commented 2 years ago

Well i checked if it's working now.

For Safari on macOS yes it is working was able to Login to my Test Account and the Premium checks are working.

For Safari on iOS it's not working. I get a new Error when i trie to Open the Login / Subscription or Free Trial Page.

Unhandled Promise Rejection: TypeError: dt.exports.windows.create is not a function. (In 'dt.exports.windows.create({url:k,type:"popup",width:T,height:A,left:b,top:p})', 'dt.exports.windows.create' is undefined)

Tested with Simulator iPhone 14 iOS 16 Web Inspector — iPhone 14 — Safari — Auto Swiper — Extension Popup Page — popup html_2022-09-15_18-04-01

Glench commented 2 years ago

What is dt.exports? Are you able to check what's available in the console? Is browser.windows or chrome.windows available?

surtic86 commented 2 years ago

Well here some Console Outputs

Web Inspector — iPhone 14 — Safari — Auto Swiper — Extension Popup Page — popup html_2022-09-15_18-18-28

Looks like there is no "create" function on browser.windows or chrome.windows

surtic86 commented 2 years ago

Looks like this is not Supported on Safari iOS https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows/create#browser_compatibility

Glench commented 2 years ago

OK, thanks for looking into that. Just published 3.0.6 which should fix that issue. Try it out and let me know.

surtic86 commented 2 years ago

Well now i don't get any Error but it it does not open any new popup / screen for the login from ExtPay.

What should happen? Just as normal a new Window?

surtic86 commented 2 years ago

Ah okey just saw in your Commit that you just check if it's exist when not you don't open it.

Well how we could then Support Payments on iOS? Open a URL to Extension Pay Website where they can Pay for it?

surtic86 commented 2 years ago

Anyway we would get the Apps not Published like this in the Appstore i believe.

https://developer.apple.com/app-store/review/guidelines/#business

Glench commented 2 years ago

What should happen is that a new window should open using window.open. Can you manually run window.open with these parameters?

window.open(url, null, `toolbar=no,location=no,directories=no,status=no,menubar=no,width=${width},height=${height},left=450`)

If not, can you try changing the parameters and see what happens?

surtic86 commented 2 years ago

Well okey thats not working. But i think we need to change the System anyway...

Response from Apple they check the source code for Payment Links and denied the Extension Submit.

Hello,

Thank you for your response, however, your extension includes a link that directs users to external mechanisms for purchases or subscriptions to be used in the app. For example, the links out to your site include subscription purchase information.

Next Steps

To resolve this issue, please remove features, account registration links, and any other links to your site that could indirectly provide access to external purchase mechanisms.

Best regards, App Store Review

Glench commented 2 years ago

Right, that's what I was expecting. I suppose ExtPay could just be a simple overlay for Apple's in-app purchases system, but I'm not familiar with that system and of course there'd be no way for me to charge the ExtensionPay fee on sales made through that system.

That said, I'm still open to adding support for it. If someone could look into how easy it would be, or better yet create a pull request with that integration, I'd be happy to add it.

surtic86 commented 1 year ago

Yes or we hope that the Governments speed up there process to fix this. In some places like South Korea it's not anymore this way. But yeh that takes for sure 1-4 years till its all around.. maybe.

Im looking into it a bit when i have more time to see whats Possible.

surtic86 commented 1 year ago

Well i read some new stuff and i came across that Apple needs to share some Infos about External Payment Services on the 9. Dec. 2022. So i wait till then and maybe we can just publish it as it is or need to change some things.

Let's see. I have read that on Paddle Blog since they are planing to Support it: https://www.paddle.com/blog/an-update-on-paddle-in-app-purchase-for-ios

orschiro commented 1 year ago

Nice, thanks!

Hopefully I can make some time to test this...

On Thu, 15 Sept 2022 at 15:55, Glen Chiacchieri @.***> wrote:

@orschiro https://github.com/orschiro @surtic86 https://github.com/surtic86 can you try this out and let me know how it goes? I believe ExtPay should be totally working with Safari now, but I haven't tried publishing an extension with ExtPay as the payment system on the Apple extension app store. I expect Apple would reject it based on their business policy, in which case ExtPay might just need to integrate with the built-in in-app purchases for the app store. But I'd love someone to try and see.

— Reply to this email directly, view it on GitHub https://github.com/Glench/ExtPay/issues/20#issuecomment-1248136238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJXQYCDBIUMNP6PYIXWFDV6MTDJANCNFSM5I5J6ONQ . You are receiving this because you were mentioned.Message ID: @.***>