Closed iorate closed 3 years ago
Thanks for your contribution. Can't wait to use it. :)
And if you need to get control of the macOS app for some reason, please let me know and I will transfer it to you any time. 🙏
@HoneyLuka Thanks, but for now I don't need control of the macOS app.
I will contact you here when I implement support for Safari on iOS 15.
iOS/iPadOS 15 will be released on Sep 20! https://www.apple.com/ios/ios-15/
I pushed a commit (9299d4569f9ff789b5fd91844417288114ed976a) which added initial support for Safari 15 on iOS. Although it supports only simple results in the "All" search, it seems to work well on iOS simulator:
I will add support for more types of search results later.
@HoneyLuka Could you please publish "uBlacklist for Safari" for iOS/iPadOS after iOS/iPadOS 15 are released and you think this extension supports them sufficiently?
@iorate Thanks for your work🎉, I think it's fine for a first release on iOS. I am now starting to work on the iOS version release preparation
@HoneyLuka Thank you. I'm looking forward to it.
The build system was upgraded for faster builds using esbuild-loader. To generate a production build for Safari:
# Install dependencies
- yarn install --frozen-lockfile
+ yarn install --immutable
# Build
- yarn build:safari:production
+ yarn build safari production
cc: @HoneyLuka
@iorate Thank you for the tips. I will use it tomorrow.
iOS version almost done. When I finished, I will tell you here.
@iorate When I debug on iPad, I found an UI issue.
@HoneyLuka Thank you for reporting an issue. Does the latest commit (017bf78642bae9f3b0146fe29ef12822763ddaf3) fix the problem?
@iorate I merged your master branch, It's OK👍
@HoneyLuka I'm glad to hear that.
I would appreciate if you could also check the sync feature that I added a bit before (3fb12571fd9aa7e3ed464b4b3408105922c852d1). Because Safari on iOS lacks some APIs, users need to copy authorization codes from iorate.github.io manually.
@iorate ok, I will try it later, if any questions I will report to you.
@iorate I create a test dropbox app, set it's callback url to iorate.github.io
.
Most functions are working. Only a little problem:
After sync finished, Appearance, Subscription module do not refresh automatically. Rules textarea show a tips 'updated Reload'. Maybe reload the whole options page automatically after sync?
@HoneyLuka Thank you for your feedback.
Maybe reload the whole options page automatically after sync?
I don't like automatic reload so much, so added a manual-reload button. (The screenshot below is taken in Firefox on Windows)
@iorate I have completed the development of the iOS version, and ready for app store review, the first version is reviewing for external test(TestFlight External Test).
If you want to build yourself, you can get code from my branch.
Should I submit the current release to app store or waiting for your next tag and rebuild a new release ?
@HoneyLuka Great!
Would you please bulid the current master
(just marked as v6.4.0
) and submit it as v6.4.0?
(As a side note, v6.4.0 will not be released for Chrome & Firefox. v6.3.6 is still under review by Chrome Web Store...)
@iorate ok, I will rebuild as 6.4.0 later.
I added v6.4.1 (and perhaps will add more) because v6.3.6 is rejected by Chrome Web Store. This does not affect the Safari version.
@HoneyLuka 🤣已经在等了。
@HoneyLuka 🤣已经在等了。
Welcome to be the first user of iOS version🎉
@iorate @HoneyLuka Already used, thank you two very much.
@HoneyLuka I installed "uBlacklist for Safari" to iOS 15 (on iPhone 11 Pro) and iPadOS 15 (on iPad Pro 12.9-inch) and confirmed it worked well. Thank you for your excellent work!
We should add support for:
Synchronization and subscription updates may not occur regularly. In such cases, the alarms are certainly set, but Safari does not fire them.
(18 hours behind!)
I'm not sure what the reproduction conditions are.
@iorate Does this bug appear when the Safari app is in the background? Usually in native app of iOS, when the app switches to the background, OS give app a short time to execute code. After that the app will become background/sleep state, can't execute code, and Timer also can't fire(suspend). When the app active again, the timer will be resume.
I think this bug is very similar to native app. Because Safari is also a native app, when it is in the background, the activity of the extension is suspended due to battery life considerations
@HoneyLuka I think it is reasonable that alarms are not fired when Safari is in background, but alarms should be resumed after Safari is back to foreground as you say.
However, I have met some different situations:
I don't understand the behavior of Safari...
@iorate This may be a bug in Safari, which is not surprising.
If this is indeed a bug, I'm thinking of a solution. I'm not good at web development. I'm not sure if there is a way to let the extension know about Safari state changes. After a short search, I found an event windows.onFocusChanged. Maybe when Safari become active, this event will be callback. The document said this works after Safari 14 (maybe it's macOS Safari 14). If it is indeed, in unfocus event remove all alarms, and in focus event recreate them (More complex logic can also be added, for example fire an update immediately or based on last fire time).
Summary Steps:
@HoneyLuka
Sounds good.
windows.onFocusChanged
seems to work in iOS Simulator.
I've been trying the windows.onFocusChanged
hack for half a day on my iPhone and iPad.
So far, it seems to be working.
@iorate Glad it works. Thank your for your hard work.
I believe it works. @HoneyLuka Would you please publish v6.6.0 when it's convenient for you?
@iorate Thank you🎉, I will submit it to app store right now.
iOS 6.6.0 is online now.
@HoneyLuka It works well on my actual devices. Thanks!
Is it possible to use CloudKit to synchronize data?
Is it possible to use CloudKit to synchronize data?
I haven't look this part yet. Usually Apple's services are only available on Apple devices. Even it is possible, I don't think it's necessary to do this right now. There is a lot of work to do for this feature.
Image, news and video search support is available in v6.7.0. cc: @HoneyLuka
@HoneyLuka The screenshots and captions seem to mismatch in the iPad app.
@HoneyLuka The screenshots and captions seem to mismatch in the iPad app.
It seems a bug, I will fix it later and release 6.7.0
iOS 6.7.0 is online🎉
@HoneyLuka thanks!
I'm closing this issue because I think basic support for iOS is already done. For further problems on iOS, please create individual issues for each problem.
Update (Sep 25, 2022)
uBlacklist is now available on iOS/iPadOS 15 thanks to @HoneyLuka ! https://apps.apple.com/us/app/ublacklist-for-safari/id1547912640
TODO:
Apple has announced that iOS 15 will support Safari Web Extensions. https://developer.apple.com/videos/play/wwdc2021/10104/
Thanks to @HoneyLuka, uBlacklist is already available as a Safari Web Extension on macOS. I'd like to add support for Safari on iOS because I'm an iPhone and iPad user.