WebCollector的4年内首次更新
WebCollector是一个可以在iOS上拍摄网页完整屏幕截图的应用程序。
当前总下载量为29.4万个单位。
我收到了用户的电子邮件。
我无法在iOS 11上使用WebCollector。请更新…
因此,我决定通过接收此电子邮件来续订。
- 仅支持32位设备
- 太多的旧图书馆
- 所有代码均由Objective-C编写
火力基地
我决定将Firebase用作后端系统。 数据库是Firestore ,联系人是Cloud Functions , Firebase存储上的图像。
RxSwift
我使用UIStackView制作了一个工具栏,因此可以将RxWebKit的isHidden属性绑定。
代码是这样的。
webView.rx.canGoBack.map {!$ 0} .bind(发送至:topToolbar.backButton.rx.isHidden).disposed(发送方:disposeBag)
webView.rx.canGoForward.map {!$ 0} .bind(发送至:topToolbar.forwardButton.rx.isHidden).disposed(发送方:disposeBag)
webView.rx.loading.bind(发送至:topToolbar.reloadButton.rx.isHidden).disposed(发送方:disposeBag)
webView.rx.loading.map {!$ 0} .bind(发送至:topToolbar.stopButton.rx.isHidden)。disposed(发送方:disposeBag)
。
。
。
我做了这样的扩展,然后我就可以轻松截图了。
XCTestCase扩展名{
func屏幕截图(_命名为:字符串){
XCTContext.runActivity(named:named,block:{活动在
让屏幕截图= XCUIScreen.main.screenshot()
让附件= XCTAttachment(屏幕截图:屏幕截图)
attachment.lifetime = .keepAlways
activity.add(附件)
})
}
}
我将午餐与UITest一起使用,因此可以使用视图名称启动ViewController目录。
导入XCTest
导入LunchTest
最后一个类OtherViewControllerTest:XCTestCase,ViewControllerTestable {
var viewControllerName:字符串{return ViewControllerName.otherViewController.rawValue}
覆盖func setUp(){
super.setUp()
ContinueAfterFailure =假
}
func launchOtherView(语言环境:字符串)-> XCUIApplication {
让launcher = Launcher(targetViewController:self,locale:locale)
返回launcher.launch()
}
func testContactJP(){
let app = launchOtherView(with:“ ja_JP”)
让otherPage = OtherPageObjects(app:app)
otherPage.otherTableView.cells.element(boundBy:3).tap()
让页面= ContactPageObject(app:app)
XCTAssertTrue(page.emailTextField.exists)
XCTAssertTrue(page.messageTextView.exists)
XCTAssertTrue(page.sendButton.exists)
屏幕截图(#function +“屏幕截图”)
}
func testContactUS(){
let app = launchOtherView(with:“ en_US”)
让otherPage = OtherPageObjects(app:app)
otherPage.otherTableView.cells.element(boundBy:3).tap()
让页面= ContactPageObject(app:app)
XCTAssertTrue(page.emailTextField.exists)
XCTAssertTrue(page.messageTextView.exists)
XCTAssertTrue(page.sendButton.exists)
屏幕截图(#function +“屏幕截图”)
}
。
。
。
}
我们可以从Terminal运行测试。
xcodebuild测试-project WebCollector.xcodeproj -scheme WebCollectorDev-配置调试-destination“ platform = iOS Simulator,name = iPhone SE,OS = 10.3.1” -resultBundlePath ./result/iphonese.bundle
xcodebuild测试-project WebCollector.xcodeproj -scheme WebCollectorDev-配置调试-destination“ platform = iOS Simulator,name = iPhone X,OS = 11.3” -resultBundlePath ./result/iphonex.bundle
xcodebuild测试-project WebCollector.xcodeproj -scheme WebCollectorDev-配置调试-destination“ platform = iOS Simulator,name = iPhone 8,OS = 11.3” -resultBundlePath ./result/iphone8.bundle
xcodebuild测试-project WebCollector.xcodeproj -scheme WebCollectorDev-配置调试-destination“ platform = iOS Simulator,name = iPhone 8 Plus,OS = 11.3” -resultBundlePath ./result/iphone8plus.bundle
。
。
。
当我们喝咖啡时,我们可以在result / *。bundle / Attachments目录下找到许多屏幕截图。
我使用Sketch进行了登陆页面设计,包括AppStore和Apps UI上的屏幕截图。
我删除了许多SDK,例如
- 推特
- 脸书
- 投寄箱
- 印象笔记
等等…因为我们当前可以使用UIActivityViewController ,所以我们可以与任何此类服务共享图像。
让activityController = UIActivityViewController(activityItems:[image],applicationActivities:[])
activityController.popoverPresentationController?.barButtonItem = actionButton
目前(activityController,动画:true,完成:nil)
我在帮助页面上写了一些奇怪的东西,但是评论者在苹果中发现了它,所以一次就拒绝了。 在申请审核XD之前,我们需要阅读所有审核指南
我写了一些要点来更新旧的应用程序。 如果您担心此应用程序,请尝试安装和使用它。
网络收藏家