Вадим Смаль объяснил, что плохого в содержании одного огромного класса и как решить эту проблему с помощью разработанного им компонента.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Efficient and Testable MVVM pattern
김범준
레이니스트 / 안드로이드 개발
레이니스트에서 뱅크샐러드 안드로이드 어플리케이션을 개발하고 있는 5년차 개발자 입니다. Reactive, 함수형 프로그래밍에 관심이 많으며 효율적이고 가독성 있는 코드를 짜는 것을 항상 목표로 부단히 노력중입니다.
Formacion en movilidad: Conceptos de desarrollo en iOS (III) Mobivery
En esta tercera sesión formativa, impartida por Sergi Hernando, CTO de Mobivery, se trataron los siguientes conceptos: UIWebView, View Cotroller en iPad y el Simulador
A journey from MVC to VIPER is a try to leverage different application architectures (as well as some concepts on top of MVC) to build more clean and readable software in Cocoa. Most of the described techniques can be successfully used while dealing with legacy codebase.
Protractor framework architecture with exampleshadabgilani
Protractor is an open source functional testing framework for AngularJS applications. It automates interaction with AngularJS apps for end-to-end testing. Protractor uses Selenium WebDriver for browser control and Jasmine or Mocha for writing test cases. Tests are organized into pages, common utilities, test data, specs, and configuration files. Protractor provides locators and functions to test AngularJS apps and generates Allure reports for test results.
This document provides an overview of navigation options and best practices for React Native applications. It discusses the Navigator API, common navigation libraries like React Navigation and React Native Router Flux, and how to structure navigation within a React/Redux project using components, actions, and reducers. It also covers animations, drawer navigation, and common caveats to consider with lists and preserving internal state.
This document provides an introduction to Retrofit 2 and RxJava 2. It discusses how Retrofit allows turning a REST API into a Java interface and how RxJava implements reactive programming with observable sequences. It demonstrates making synchronous and asynchronous HTTP requests with Retrofit and handling the "callback hell" problem with RxJava. Operators like map, flatMap, zip and concatMap are shown to transform and combine observables. The document emphasizes that RxJava contains over 400 methods and discusses additional RxJava concepts like error handling and threading.
Introducing Rendr: Run your Backbone.js apps on the client and serverSpike Brehm
Rendr is a JavaScript library that allows Backbone.js applications to run on both the client and server sides. It provides common classes and logic that can be reused across both environments, such as BaseView, BaseModel, and routers. On the server, it renders the HTML output using the same application logic. On the client, it hydrates the views by attaching them to the corresponding DOM elements. The goal is to write application logic in a way that is agnostic to the environment, avoiding duplicating code or context switching between client and server implementations.
Efficient and Testable MVVM pattern
김범준
레이니스트 / 안드로이드 개발
레이니스트에서 뱅크샐러드 안드로이드 어플리케이션을 개발하고 있는 5년차 개발자 입니다. Reactive, 함수형 프로그래밍에 관심이 많으며 효율적이고 가독성 있는 코드를 짜는 것을 항상 목표로 부단히 노력중입니다.
Formacion en movilidad: Conceptos de desarrollo en iOS (III) Mobivery
En esta tercera sesión formativa, impartida por Sergi Hernando, CTO de Mobivery, se trataron los siguientes conceptos: UIWebView, View Cotroller en iPad y el Simulador
A journey from MVC to VIPER is a try to leverage different application architectures (as well as some concepts on top of MVC) to build more clean and readable software in Cocoa. Most of the described techniques can be successfully used while dealing with legacy codebase.
Protractor framework architecture with exampleshadabgilani
Protractor is an open source functional testing framework for AngularJS applications. It automates interaction with AngularJS apps for end-to-end testing. Protractor uses Selenium WebDriver for browser control and Jasmine or Mocha for writing test cases. Tests are organized into pages, common utilities, test data, specs, and configuration files. Protractor provides locators and functions to test AngularJS apps and generates Allure reports for test results.
This document provides an overview of navigation options and best practices for React Native applications. It discusses the Navigator API, common navigation libraries like React Navigation and React Native Router Flux, and how to structure navigation within a React/Redux project using components, actions, and reducers. It also covers animations, drawer navigation, and common caveats to consider with lists and preserving internal state.
This document provides an introduction to Retrofit 2 and RxJava 2. It discusses how Retrofit allows turning a REST API into a Java interface and how RxJava implements reactive programming with observable sequences. It demonstrates making synchronous and asynchronous HTTP requests with Retrofit and handling the "callback hell" problem with RxJava. Operators like map, flatMap, zip and concatMap are shown to transform and combine observables. The document emphasizes that RxJava contains over 400 methods and discusses additional RxJava concepts like error handling and threading.
Introducing Rendr: Run your Backbone.js apps on the client and serverSpike Brehm
Rendr is a JavaScript library that allows Backbone.js applications to run on both the client and server sides. It provides common classes and logic that can be reused across both environments, such as BaseView, BaseModel, and routers. On the server, it renders the HTML output using the same application logic. On the client, it hydrates the views by attaching them to the corresponding DOM elements. The goal is to write application logic in a way that is agnostic to the environment, avoiding duplicating code or context switching between client and server implementations.
Workshop Isomorphic Web Apps with ReactJS:
- Universal web apps - Isomorphic
- Server Side Rendering (SSR) with ReactJS
- Server Side Rendering with Redux
- Server Side Rendering with React Router
- Server Side Rendering: server.js - Main Entry Point
- Server Side Rendering: server.js - HTML Template
- Client main entry point: client.js
- Webpack bundles
- Avoiding FOUC - Webpack ExtractTextPlugin
- Webpack code splitting
- React Router - Configuration with Plain Routes
- React Router - Dynamic Routing & WebPack
- Dynamic Routing with new Reducers
- Combining new Reducers - ReducerRegistry
- Data fetching before rendering
- React Router + Redux + Redial: Server Side
- React Router + Redux + Redial: provideHooks
- React Router + Redux + Redial: Client Side
- SEO friendly universal web apps - React-Helmet
- React-Helmet - Server Side Rendering
Presentado por ingeniero: Marc Torrent
This document provides a summary of Han Janghyun's background and experience. It includes:
1. Han Janghyun previously worked as a senior developer at Samsung SDS and has experience implementing TV platform JavaScript applications and retail solution servers and frontends.
2. He now works as a freelance developer and operates the blog han41858.tistory.com. He is also writing a translation of the book Angular 2.
3. Han Janghyun is also involved in operating GDG Korea Web Tech.
Value types are at the core of Swift (seriously, mostly everything in the Swift standard library is a value type). But how do you avoid subclassing? That’s where the power of Protocol-Oriented programming comes in. Learn how to structure your code to never subclass (almost) again! Practical everyday examples and ideas for your own code base will be included.
Single-page applications (SPAs) take user interaction with web applications to a new level. This means that more logic will be moved to the web browser and we have to become more familiar with JavaScript. AngularJS is one of the leading JavaScript frameworks when talking about SPAs. In this workshop I will present AngularJS in terms of problems it addresses and how it does this. Together we will develop a single-page application and we will go through how traditional concepts of web applications (data and state management, authentication) can be solved using the framework. Furthermore, we will dive into typical pitfalls when developing applications using AngularJS and will see how we can avoid them.
AngularJS is a JavaScript framework for building dynamic web applications. It augments HTML with custom attributes and directives to bind data and behaviors to the DOM. Key features include two-way data binding, reusable components, dependency injection, routing, and templating. AngularJS uses an MVC or MVVM pattern, with scopes providing the view model. The framework enhances HTML, encourages test-driven development, and makes single page apps possible.
This document provides an overview of the Wicket framework. It demonstrates how to build web applications using Wicket's component-based model. Key aspects covered include:
1. Setting up a basic Wicket application structure with pages, components, and models.
2. Using Wicket behaviors to add interactivity like AJAX functionality.
3. Separating logic, markup, and properties with inheritance and detachable models.
4. Testing Wicket applications with the WicketTester and mocking dependencies.
The document provides an overview of AngularJS, including its core concepts and how it can be used with Java frameworks like Spring, Struts, and Hibernate. AngularJS is an open-source JavaScript framework that assists with building single-page applications using MVC architecture. It allows developers to specify custom HTML tags and directives to control element behavior. The document then discusses key AngularJS concepts like data binding, directives, expressions, filters, controllers, dependency injection, views/routing, and services. It provides examples of how these concepts work and how AngularJS can integrate with Java frameworks in a sample reader application divided into multiple sub-projects.
Reactive state management with Jetpack ComponentsGabor Varadi
This talk explains what problems exist in the context of Android application development, how Jetpack components such as SavedStateHandle help handle that, and how we can combine observable values to expose our state, to be observed only when it is needed.
Building scalable applications with angular jsAndrew Alpert
This document discusses best practices for organizing AngularJS applications. It recommends organizing files by feature rather than type, with each feature having related HTML, CSS, tests, etc. It also recommends structuring modules to mirror the URL structure and listing submodules as dependencies. The document discusses using services for reusable logic rather than large controllers. It emphasizes writing tests, managing technical debt, following code style guides, and using task runners like Grunt or Gulp to automate tasks.
GwtQuery is a rewrite of the jQuery popular library with has brought to the GWT world its sexy API and its simplicity for doing complex things.
In this session Manuel will provide an overview of the fundamentals of gQuery, how to setup and use it, and how to write code which being laborious in GWT can be simplified using gQuery.
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
Jetpack released new features in 2021 including:
- Compose integrations with libraries like Hilt, Paging, and Navigation.
- Improvements to CameraX, Room, DataStore, Navigation, and other libraries.
- New libraries like AppSearch, Macrobenchmark, and Google Shortcuts.
- Support for additional form factors with updates to libraries like Window and Wear.
- Many libraries reached stable versions or added new capabilities in alpha/beta stages.
Workshop: EmberJS - In Depth
- Ember Data - Adapters & Serializers
- Routing and Navigation
- Templates
- Services
- Components
- Integration with 3rd party libraries
Presentado por ingenieros: Mario García y Marc Torrent
This document summarizes techniques for optimizing Angular application performance, including ahead of time compilation, lazy loading, change detection strategies, avoiding memory leaks, and server side rendering. It provides code examples and compares boot times between different configurations. The techniques can improve first meaningful paint time by up to 86% compared to the default configuration.
Angular 2 Component Communication - Talk by Rob McDiarmidAmrita Chopra
This talk was a part of the January 2017 AngularTO meetup at Rangle.io
All content is by Rob McDiarmid
Components are one of Angular 2's greatest features. They combine many redundant concepts from Angular 1.x into one flexible and elegant API. A Component can interact with its parent/children through @Input and @Output bindings but sometimes that's not enough. What happens when you need to communicate between siblings or nested routes? What if you need to send a message to multiple components at once or just need more control? Fortunately, Angular 2 has got you covered. Level up your component skills and learn some advanced features and patterns for component interaction.
The document discusses the VIPER architecture pattern for structuring iOS applications. It begins by introducing the key components of a VIPER module: the View, Presenter, Interactor, Router, and Entity. It then provides examples of how each component is responsible for lifecycle management, event handling, data validation, routing, and other tasks. The document argues that VIPER increases testability, modularity, and code quality of iOS apps. It also promotes open sourcing example VIPER code on GitHub to help disseminate knowledge of this architecture.
Async task, threads, pools, and executors oh my!Stacy Devino
http://360andev.com/sessions/100-async-task-threads-pools-and-executors/
Frome 360 AnDev conference
There are many ways to use Threads and in the multithreaded world in which we live, it can be confusing when, where, and how to use these functions correctly. Still, that assumes you know what they all mean and how to manipulate them. Novices and Experts welcome as there are many schools of thought, but we will explore them all together.
Don’t worry, we have you covered.
Animated Version : but.ly/asyncThread
The document compares AppDelegate and NSNotificationCenter in iOS development. AppDelegate serves as the root controller of an application and handles events like startup and shutdown. Delegates allow objects to manipulate each other through callbacks. Notifications allow asynchronous messaging between any objects through NSNotificationCenter by posting and observing notifications. The document provides examples and pros and cons of each approach.
Workshop Isomorphic Web Apps with ReactJS:
- Universal web apps - Isomorphic
- Server Side Rendering (SSR) with ReactJS
- Server Side Rendering with Redux
- Server Side Rendering with React Router
- Server Side Rendering: server.js - Main Entry Point
- Server Side Rendering: server.js - HTML Template
- Client main entry point: client.js
- Webpack bundles
- Avoiding FOUC - Webpack ExtractTextPlugin
- Webpack code splitting
- React Router - Configuration with Plain Routes
- React Router - Dynamic Routing & WebPack
- Dynamic Routing with new Reducers
- Combining new Reducers - ReducerRegistry
- Data fetching before rendering
- React Router + Redux + Redial: Server Side
- React Router + Redux + Redial: provideHooks
- React Router + Redux + Redial: Client Side
- SEO friendly universal web apps - React-Helmet
- React-Helmet - Server Side Rendering
Presentado por ingeniero: Marc Torrent
This document provides a summary of Han Janghyun's background and experience. It includes:
1. Han Janghyun previously worked as a senior developer at Samsung SDS and has experience implementing TV platform JavaScript applications and retail solution servers and frontends.
2. He now works as a freelance developer and operates the blog han41858.tistory.com. He is also writing a translation of the book Angular 2.
3. Han Janghyun is also involved in operating GDG Korea Web Tech.
Value types are at the core of Swift (seriously, mostly everything in the Swift standard library is a value type). But how do you avoid subclassing? That’s where the power of Protocol-Oriented programming comes in. Learn how to structure your code to never subclass (almost) again! Practical everyday examples and ideas for your own code base will be included.
Single-page applications (SPAs) take user interaction with web applications to a new level. This means that more logic will be moved to the web browser and we have to become more familiar with JavaScript. AngularJS is one of the leading JavaScript frameworks when talking about SPAs. In this workshop I will present AngularJS in terms of problems it addresses and how it does this. Together we will develop a single-page application and we will go through how traditional concepts of web applications (data and state management, authentication) can be solved using the framework. Furthermore, we will dive into typical pitfalls when developing applications using AngularJS and will see how we can avoid them.
AngularJS is a JavaScript framework for building dynamic web applications. It augments HTML with custom attributes and directives to bind data and behaviors to the DOM. Key features include two-way data binding, reusable components, dependency injection, routing, and templating. AngularJS uses an MVC or MVVM pattern, with scopes providing the view model. The framework enhances HTML, encourages test-driven development, and makes single page apps possible.
This document provides an overview of the Wicket framework. It demonstrates how to build web applications using Wicket's component-based model. Key aspects covered include:
1. Setting up a basic Wicket application structure with pages, components, and models.
2. Using Wicket behaviors to add interactivity like AJAX functionality.
3. Separating logic, markup, and properties with inheritance and detachable models.
4. Testing Wicket applications with the WicketTester and mocking dependencies.
The document provides an overview of AngularJS, including its core concepts and how it can be used with Java frameworks like Spring, Struts, and Hibernate. AngularJS is an open-source JavaScript framework that assists with building single-page applications using MVC architecture. It allows developers to specify custom HTML tags and directives to control element behavior. The document then discusses key AngularJS concepts like data binding, directives, expressions, filters, controllers, dependency injection, views/routing, and services. It provides examples of how these concepts work and how AngularJS can integrate with Java frameworks in a sample reader application divided into multiple sub-projects.
Reactive state management with Jetpack ComponentsGabor Varadi
This talk explains what problems exist in the context of Android application development, how Jetpack components such as SavedStateHandle help handle that, and how we can combine observable values to expose our state, to be observed only when it is needed.
Building scalable applications with angular jsAndrew Alpert
This document discusses best practices for organizing AngularJS applications. It recommends organizing files by feature rather than type, with each feature having related HTML, CSS, tests, etc. It also recommends structuring modules to mirror the URL structure and listing submodules as dependencies. The document discusses using services for reusable logic rather than large controllers. It emphasizes writing tests, managing technical debt, following code style guides, and using task runners like Grunt or Gulp to automate tasks.
GwtQuery is a rewrite of the jQuery popular library with has brought to the GWT world its sexy API and its simplicity for doing complex things.
In this session Manuel will provide an overview of the fundamentals of gQuery, how to setup and use it, and how to write code which being laborious in GWT can be simplified using gQuery.
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
Jetpack released new features in 2021 including:
- Compose integrations with libraries like Hilt, Paging, and Navigation.
- Improvements to CameraX, Room, DataStore, Navigation, and other libraries.
- New libraries like AppSearch, Macrobenchmark, and Google Shortcuts.
- Support for additional form factors with updates to libraries like Window and Wear.
- Many libraries reached stable versions or added new capabilities in alpha/beta stages.
Workshop: EmberJS - In Depth
- Ember Data - Adapters & Serializers
- Routing and Navigation
- Templates
- Services
- Components
- Integration with 3rd party libraries
Presentado por ingenieros: Mario García y Marc Torrent
This document summarizes techniques for optimizing Angular application performance, including ahead of time compilation, lazy loading, change detection strategies, avoiding memory leaks, and server side rendering. It provides code examples and compares boot times between different configurations. The techniques can improve first meaningful paint time by up to 86% compared to the default configuration.
Angular 2 Component Communication - Talk by Rob McDiarmidAmrita Chopra
This talk was a part of the January 2017 AngularTO meetup at Rangle.io
All content is by Rob McDiarmid
Components are one of Angular 2's greatest features. They combine many redundant concepts from Angular 1.x into one flexible and elegant API. A Component can interact with its parent/children through @Input and @Output bindings but sometimes that's not enough. What happens when you need to communicate between siblings or nested routes? What if you need to send a message to multiple components at once or just need more control? Fortunately, Angular 2 has got you covered. Level up your component skills and learn some advanced features and patterns for component interaction.
The document discusses the VIPER architecture pattern for structuring iOS applications. It begins by introducing the key components of a VIPER module: the View, Presenter, Interactor, Router, and Entity. It then provides examples of how each component is responsible for lifecycle management, event handling, data validation, routing, and other tasks. The document argues that VIPER increases testability, modularity, and code quality of iOS apps. It also promotes open sourcing example VIPER code on GitHub to help disseminate knowledge of this architecture.
Async task, threads, pools, and executors oh my!Stacy Devino
http://360andev.com/sessions/100-async-task-threads-pools-and-executors/
Frome 360 AnDev conference
There are many ways to use Threads and in the multithreaded world in which we live, it can be confusing when, where, and how to use these functions correctly. Still, that assumes you know what they all mean and how to manipulate them. Novices and Experts welcome as there are many schools of thought, but we will explore them all together.
Don’t worry, we have you covered.
Animated Version : but.ly/asyncThread
The document compares AppDelegate and NSNotificationCenter in iOS development. AppDelegate serves as the root controller of an application and handles events like startup and shutdown. Delegates allow objects to manipulate each other through callbacks. Notifications allow asynchronous messaging between any objects through NSNotificationCenter by posting and observing notifications. The document provides examples and pros and cons of each approach.
This document discusses concurrent programming and concurrency APIs on iOS. It covers threads, Grand Central Dispatch (GCD), operation queues, and challenges of concurrent programming such as race conditions, deadlocks, and priority inversion. GCD provides a low-level API for dispatching work to different queues without directly interacting with threads. Operation queues allow specifying dependencies between operations and canceling operations.
Роман Бусыгин "Yandex Map Kit для iOS в примерах"Yandex
Роман Бусыгин "Yandex Map Kit для iOS в примерах"
Я.Субботник в Новосибирске
О докладе:
На докладе вы узнаете, что такое Yandex Map Kit для iOS, чем он лучше Apple Map Kit Framework и как внедрять его в свои мобильные приложения.
Интуит. Разработка приложений для iOS. Лекция 11. Расширенные возможности уст...Глеб Тарасов
This document contains a summary of a lecture on expanded device capabilities in iOS app development. It discusses UIViewControllers that work only on iPad, automatic layout options, accessing the accelerometer, gyroscope, orientation, location services, compass, audio playback, photo and video capabilities, notifications, and gesture recognition. The lecturer encourages students to consider how these topics could be applied to their own apps and to experiment with implementing related features.
This document provides an overview of views, drawing, and animation in iPhone application development. It discusses view fundamentals like the view hierarchy, frames and bounds, and view-related structures. It covers drawing by overriding drawRect and using Core Graphics. It also discusses animating view properties.
Swift is a new programming language that is statically typed, multi-paradigm, and designed to work with Cocoa and Cocoa Touch. It features modern language elements like optionals, generics, closures, and pattern matching. Swift code is compiled to native executables making it performant, and it is designed to bridge seamlessly with Objective-C and Cocoa allowing existing iOS and OS X apps to migrate code over.
Techleads Meetup #1
Мобильный веб: назад в будущее"
Виталий Шароватов, Mobile Web Team Lead и Руслан Байрамкулов, Senior Mobile Web QA Engineer (Badoo)
Описание:
Количество пользователей мобильных устройств уже давно превысило количество пользователей стационарных компьютеров и ноутбуков. В свою очередь мобильный веб — это самая быстрорастущая мобильная платформа (по данным comScore, 2015). И если будущее не за этой платформой, то как минимум, она будет его заметной частью.
Давным-давно для Мобильного веба в Badoo были «тёмные времена». Использовались дизайны нативных платформ и эмитировалось их поведение. Даже релизы случались раз в неделю-две. Около года назад ситуация начала меняться в лучшую сторону. Мобильная веб версия Badoo догнала по количеству фич остальные платформы и показала существенный рост по всем показателям. Теперь мобильный веб релизится каждый день.
В докладе мы расскажем о том, что неправильного происходит с процессами внутри и снаружи команды. Для примера возьмем как собственные грабли, так и чужие, но такие распространённые ошибки организации работы.
О том, что не помогло, рассказывать не будем, а о том, что сработало, ничего не утаим. Эта информация поможет вам работать в удовольствие. В ассортименте истории о том:
— как один автоматизатор всю регрессию покрыл;
— как подружились продакты-дизайнеры с командой разработки;
— как жадные программисты забрали себе всю ответственность;
— пуркуа QA любит сидеть с девелоперами плечом к плечу;
— зачем нужно не спускать глаз с багов, ломающих автоматизацию, и как заканчивать фичу после того, как закончили фичу.
Techleads Meetup #1
"Технологии vs коммуникации: что важнее?"
Альгис Фатеев, руководитель тестирования (Avito)
Описание:
последние несколько лет проект Avito растёт лавинообразным образом, с 2012 года команда разработчиков выросла в 20 раз. За очень короткое время мы прошли путь от «ну что, будем релизиться?» до отлаженного процесса выкатки кода в продакшн. В докладе речь пойдёт о том, как изменилась команда, процессы разработки и жизненный цикл задач в Avito за последние годы, как внедрялось тестирование в проект.
Кроме того, я отдельно рассмотрю вопросы, касающиеся управляемости проекта при резком росте:
— какие решения, заложенные на начальном этапе, позволили нам быстро масштабироваться;
— с какими главными болезнями роста мы столкнулись и как их решали;
— как подготовиться на случай лавинообразного роста.
Багфиксинг процесса разработки в iOS: взгляд с двух сторонBadoo Development
Techleads Meetup #1
"Багфиксинг процесса разработки в iOS: взгляд с двух сторон"
Екатерина Николаенко, iOS QA Lead и
Катерина Трофименко, iOS Developer (Badoo)
Описание:
Приложение Badoo для iOS существует около 7 лет и пережило уже 4 реинкарнации. Наши процессы и подходы не всегда были оптимальны и мы не единственные, кто познали релизы через боль и страдание всех участников процесса разработки.
Чтобы найти идеальный баланс между скоростью и качеством мы решили отрефакторить процессы разработки и тестирования в iOS команде и добились релизов раз в неделю. Из нашего доклада вы узнаете об эволюции команды с точки зрения разработки и тестирования. А так же мы расскажем как мы уменьшили crash-rate в 40 раз.
Techleads Meetup #1
"Как автотесты ускоряют релизы в OK.ru"
Никита Макаров, руководитель отдела тестирования (Одноклассники)
Описание:
начиная с 2012 года Одноклассники прошли огромный путь в области ускорения релизов.
Одним из факторов успеха была автоматизация тестирования, которую внедряли «с нуля».
В своем докладе я расскажу:
— о том как мы учили тестировщиков писать автотесты;
— сколотили команду автоматизаторов и построили инфраструктуру автоматизации тестирования;
— о наших ошибках, поражениях, полезных практиках и процессах.
Кортунов Никита. Как ускорить разработку приложений или есть ли жизнь после P...AvitoTech
икита расскажет о возможностях backend as a service, ответит на вопрос есть ли жизнь после Parse, поделится опытом разработки BaaS Scorocode, особенностями архитектуры и кейсами применения, как можно ускорить разработку с помощью BaaS.
Вадим Дробинин. Защищаем себя и пользователей: руководство по безопасностиAvitoTech
Докладчик поднимет важную тему защиты пользовательских данных и непосредственно ресурсов приложений от внешних угроз, расскажет об основных проблемах, с которыми сталкиваются разработчики, обеспокоенные безопасностью своих приложений и покажет наиболее успешные способы защиты от атак на Swift
What is Lean UX? No really. I’ve read some stuff about it and it’s great in theory but I’m finding it hard to implement.
In a practical talk about how to apply the methodology, JD and JC will show you the tools and give you the inside story on how they’re using Lean UX in Westpac to kick goals. How do they test? How do they learn? How do they get the rest of the business to buy into their approach?
Говорим об успешности ДБО 2017. Какие цифры являются показательными, на какие критерии стоит обратить внимание, какие принципы взаимодействия пользователей ДБО вы не сможете игнорировать. Примеры из ежегодного юзабилити-исследования и сравнение функциональности интернет-банков и мобильных приложений.
Оценка востребованности пользователями функционала ДБО и сравнительное юзабилити-исследований позволит более взвешенно смотреть на конкурентов и внутреннюю статистику активности в ДБО . Зачем?
– Конкуренция растет: банки, ИТ-стартапы, телеком, Сбербанк и государство, технологии. Важно отслеживать лучшие решения, которые работают;
– Потребность пользователей увеличивается с ростом безналичных платежей, пользователи становятся все более ленивые. Только исследования пользовательского поведения дает шанс вырваться вперед в конкурентной борьбе.
– основной задачей банка остается вовлечение пользователей. И тут надо четко знать, что мешает "новичкам", как работают с ДБО "опытные", какой функционал может стать драйвером "активации" клиентов.
Взвешенная оценка по развитию ДБО позволит сократить издержки на разработку и увеличить бизнес-эффективность своих каналов.
PS приглашаем на мероприятия по Accessibility, где мы поделимся данными из проектов по оценке "доступности" веб-сайта, его мобильной версии, а также iOs мобильных приложений банков.
Android P includes several new features such as WiFi round-trip-time positioning, display cutout support, the ImageDecoder class for image decoding, and a unified biometric authentication API. It also improves existing features like notifications with enhanced messaging styles, and includes privacy and power management changes such as placing restrictions on background access to sensors and limiting apps' resource usage based on usage patterns.
This document provides a quick introduction to Android development. It discusses Android Studio as the primary IDE for Android development and its features. It also covers templates, running apps, building UIs with code and XML, using resources and the R class, basic event handling, Logcat for viewing logs, and best practices for logging.
This document provides an overview of developing Android applications. It discusses starting a new Android project in Eclipse, creating an "Hello World" app with an activity and layout, running the app on an emulator, understanding the app lifecycle with logging, adding behavior like button clicks and toasts, and creating a list view with click handling. The document covers basic Android app development concepts and steps in Portuguese.
The document provides an overview of basic Android application development concepts including getting set up with the Android SDK, creating a "Hello World" app, and exploring core application components like Activities, Services, Intents, and the AndroidManifest file. It describes setting up the development environment, building a simple app, and diving deeper into how Activities, Services, Intents, and the manifest are used to build the user interface and functionality of an Android application.
The document discusses several new features and APIs in Android 3.0 (Honeycomb) for tablets, including fragments which allow recomposing UI based on factors like screen size, loaders for asynchronously fetching content, an enhanced action bar for navigation and menus, hardware accelerated graphics, and the new holographic UI design. It also questions what some aspects of Android 3.0 may mean for future phone releases and how to detect "tablet-y" systems.
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...Robert Nyman
The document discusses building apps for Firefox OS using open web technologies like HTML5, CSS, and JavaScript. It explains that apps can be developed like regular web apps and then packaged for installation on Firefox OS devices. Developers can access device APIs for features like contacts, notifications, and sensors. The document outlines the steps to take which include developing the app, creating a manifest file, and publishing/installing the app. It provides details on various web APIs and permissions available to Firefox OS apps.
1) Apache Cordova allows developers to use web technologies like HTML, CSS, and JavaScript to build mobile apps that can access native device features and be deployed to app stores.
2) Cordova uses a command line interface for creating projects, adding platforms, and building apps. It also provides APIs for accessing device features through plugins.
3) jQuery Mobile is a popular framework for building the user interface of Cordova apps, though other frameworks can also be used. Special considerations are needed for each mobile platform.
Single page webapps & javascript-testingsmontanari
This document discusses testing single page web applications built with AngularJS. It covers using fixtures to stub HTTP responses during functional testing. Static fixtures can return pre-defined responses from files, while dynamic fixtures allow generating responses programmatically. The jasmine.test.SinonFakeServer wrapper facilitates advanced dynamic fixtures by intercepting AJAX requests and returning fake responses, simulating network delays. This allows testing the application without changing code to use stubbed responses during tests.
The document provides an introduction to developing applications for Palm's webOS using the Mojo SDK. It discusses that the Mojo SDK is a JavaScript framework that uses standard web technologies and allows creating webOS applications using HTML, CSS, and JavaScript. It also describes some key aspects of developing Mojo applications, such as creating scenes, linking between scenes, using data storage with Depot and cookies, and working with common UI widgets.
With the introduction of the iPhone 6s and the iPhone 6s Plus, Apple added 3D Touch, a new dimension to the multi-touch user interface. This new technology senses how deeply users press the display and provides a new way to interact with the iPhone.
In iOS 9, Apple introduced several 3D Touch APIs. In this session I will explain in a practical way what is 3D Touch and how you can benefit from it in your app. I will cover home screen quick actions, peek and pop actions and also how to use the force properties of a UITouch event.
This slide covers several topics, such as app startup, hilt, navigation, and datastore, which have been released this year, through Android 11 weeks.
Not only suggesting overview but also giving simple use cases.
Using the Flatiron framework's router Director with Backbone.JS and how it addresses key issues encountered by complex single-page web applications in a simple & effective way.
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
Apache Cordova is a platform for building native mobile applications using common Web technologies (HTML, CSS and JavaScript). Apache Cordova offers a set of APIs that allow the mobile application developers to access mobile native functions such as (Audio, Camera, File, Battery, Contacts …etc) using JavaScript. Although there are many JavaScript mobile application frameworks, jQuery mobile is one of the best mobile web application frameworks which allows the web developers to develop web applications that are mobile friendly. This session illustrates how to use Apache Cordova with the combination of jQuery mobile in order to develop a native Android application and deploy on a real Android device. The demo application (“Memo” application) utilizes mobile native functions (Audio and Camera) using pure JavaScript.
Xamarin is a mobile application development platform for building native and cross-platform apps using C# and .NET. It was started in 2011 and was originally based on Mono. It allows developers to write native Android, iOS, and Windows apps with shared code and libraries, and developers can use C# with Xamarin.Forms to write cross-platform UIs. Xamarin apps provide full access to native APIs and can be developed in Visual Studio. The platform has over 20,000 customers, 375,000+ developers, and a small team of 76 employees.
1. The document discusses using Scala and SBT for Android development. SBT is introduced as the de-facto build tool for Scala projects.
2. Scala language features like the Option type and lazy values help address issues like null pointers and control value calculation.
3. Several third-party libraries are described, including Scaloid and Macroid, which aim to simplify working with the Android platform in a type-safe way.
The document discusses adaptive user interfaces (UIs) that adjust layout based on device characteristics like size, orientation, and multitasking state. It covers size classes in iOS, which define combinations of device traits, and how to design UIs that respond appropriately when size classes change. Examples are given of how to detect size class changes and update layouts accordingly in an app.
Is your web app drowning in a sea of JavaScript? Has your client-side codebase grown from "a snippet here and there" to "more JavaScript than HTML"? Do you find yourself writing one-off snippets instead of generalized components? You're not the only one. Learn about a handful of strategies you can use to keep your JavaScript codebase lean, modular, and flexible. We'll cover all the major pain points — MVC, templates, persisting state, namespacing, graceful error handling, client/server communication, and separation of concerns. And we'll cover how to do all this incrementally so that you don't have to redo everything from scratch.
Backbone.js is a lightweight JavaScript framework that provides structure to client-side code through an MVC pattern. It connects a single-page application to a backend via RESTful JSON and allows fetching and saving data without full page refreshes. Backbone provides models to represent data, views to handle the UI, and collections to manage groups of models. Events allow views to update dynamically when models change. It aims to increase code organization and reuse while keeping the framework lightweight.
This document provides an overview of key Android development concepts and techniques. It discusses fragments, the support library, dependency injection, image caching, threading and AsyncTask, notifications, supporting multiple screens, and optimizing ListView performance. The document also recommends several popular Android libraries and open source apps that demonstrate best practices.
Similar to Rambler.iOS #6: App delegate - разделяй и властвуй (20)
В своем докладе Денис Батвинкин кратко рассказал об истории LLVM и его внутренней архитектуре.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
Rambler.iOS #9: Анализируй это! (Сергей Крапивенский).
Доклад посвящён наиболее популярным статическим анализаторам кода для iOS: как ими пользоваться, какие проблемы они решают, как внедрить их в привычный цикл разработки, как писать для них свои правила. Также рассмотрен опыт интеграции статического анализа и CI.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Rambler.iOS #9: Нужны ли бэкенд-разработчики, когда есть Swift?RAMBLER&Co
Rambler.iOS #9: Нужны ли бэкенд-разработчики, когда есть Swift? (Самвел Меджлумян)
Любой iOS-команде в повседневной практике требуется тот или иной вспомогательный инструментарий, оптимизирующий рутинные процессы. В рамках доклада рассмотрен Swift как инструмент для реализации этих задач, проведено сравнение имеющихся фреймворков между собой, а наиболее подходящий для указанных задач рассмотрен в сравнении с популярными серверными платформами.
Также затронуты вопросы микросервисной архитектуры, проблемы и best practices в бэкенд-разработке.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Rambler.iOS #9: Life with out of memory (Денис Батвинкин).
Out of memory error – ошибка, о которой не стоит забывать. В докладе Денис разбирает, что такое out of memory error и почему стоит уделить этой проблеме больше внимания. Отдельное внимание уделено причинам OOM и инструментам, которые помогут ее отследить. Также на примере iOS-приложения "Livejournal" рассмотрена практика борьба с этой ошибкой.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Бениамин Саркисян рассказал про устройство и принципы работы статического анализатора кода OCLint, а также показал, как можно написать свои собственные правила для него.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
Екатерина Тришина рассмотрела плюсы и минусы различных видов диаграмм на примере кейса проектирования сложного блока функционала в проекте Афиша.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
Артур Протько рассказал о различных технологиях семейства App Thinning: bitcode, slicing, on-demand resources. Помимо теории приводятся практические примеры и статистика, полученная в проекте Рамблер/почта.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
This document provides an overview of Dip, a dependency injection framework for Swift. It discusses key Dip concepts like dependency containers, component registration, and resolution. Key points include:
1. Modules are represented as dependency containers that manage their own components.
2. All components are registered in their containers with their dependencies.
3. The dependency graph is resolved by obtaining fully-initialized components from their containers.
Михаил Головко рассказал о принципах устройства и основных возможностях YapDatabase.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
Последние полтора года на каждой из наших встреч мы рассказываем о том, почему продуманная и чистая архитектура мобильных приложений — это нужно и важно. За попытками спроектировать серебряную пулю мы очень часто забываем — или просто не уделяем достаточно внимания менее заметной части нашего кода — тестам.
Егор Толстой расскажет о том, почему не стоит обделять вниманием unit-тесты, как подходить к их проектированию и осуществлять постепенный рефакторинг. Выступление, как обычно, подкреплено зарядом личной боли и опыта от поддержки базы в 3.000 unit-тестов на одном проекте и 1.000 на другом.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Многие разработчики любят спорить о празных подходах к реализации верхнего слоя мобильного приложения — MVC, MVVM, VIPER. При этом зачастую уделяется недостаточно времени продумыванию логики работы с данными. Как следствие, усложняется понимание и последующее расширение данного слоя.
Стас Цыганов расскажет про подход, который давно используется в server-side разработке, но позже был адаптирован к реалиям мобильных приложений. Service Oriented Architecture задает строгий каркас в части обработки данных, фиксируя ответственность компонентов. Такой подход оказывается крайне полезным как в части поддержки и рефакторинга, так и при последующем расширении приложения.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
Rambler.iOS #8: Make your app extensible with JavaScriptCoreRAMBLER&Co
This document discusses using JavaScriptCore to extend the functionality of apps. It provides an example of using JavaScriptCore to evaluate JavaScript code and access the results. It also outlines how JavaScriptCore maps JavaScript types to Objective-C and Swift types. The document describes how JavaScriptCore creates a virtual machine and handles single-threaded execution. It then shows how to export Swift classes to JavaScript using a protocol. Finally, it lists some ways apps like Paw could leverage JavaScriptCore, such as for code generators, importers, and dynamic values.
Rambler.iOS #8: Как не стать жертвой бэкендеровRAMBLER&Co
Клиент-серверное взаимодействие лежит в основе большинства мобильных приложений. Язык общения между клиентом и сервером всегда закреплён определённым контрактом. Однако валидация этого контракта незаслуженно остаётся в стороне. Отсюда и большинство проблем на клиенте — некорректное отображение, неконсистентность данных и падения.
Как избежать этих проблем и повысить уровень crash-free ваших приложений, добавив предварительную валидацию, расскажет Ирина Дягилева.
Rambler.iOS - митапы iOS-разработчиков, организуемые компанией RAMBLER&Co.
RDSDataSource: iOS Reverse Engineering for inexperiencedRAMBLER&Co
Валерий Попов рассказывает о том, как организован процесс реверс-инжиниринга iOS приложений.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
RDSDataSource: Автогенерация документации для SDKRAMBLER&Co
Помимо различных приложений в нашей команде разрабатывается несколько SDK, и вопрос с генерацией документации становится всё более актуальным. Михаил рассказал какие системы для создание документации существуют, чем они хороши и какую из них мы выбрали для своих нужд. Кроме этого освещаются вопросы исползования такой документации и ее автоматического деплоя через Jenkins и fastlane.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
Михаил Рахманов рассказывает о паттерне Promise и его использовании в iOS разработке.
Краткие тезисы:
- Что такое promises?
- Использование promises в iOS разработке (существующие библиотеки и подходы)
- Реализация promises библиотекой PromiseKit (основные методы, цепочки promises, обработка ошибок)
- Какие задачи можно решить с помощью promises, а какие - нельзя
- Использование promises на примере приложения: драм-машины с возможностью сохранять аудио-дорожки
- Подведение итогов: преимущества и недостатки.
RDSDataSource - внутренние пятничные митапы iOS-команды RAMBLER&Co.
3. • Реагирует на получение уведомлений
• Реагирует на ключевые изменения в
состоянии вашего приложения
• Реагирует на события, которые
нацелены на само приложение
• Управляет процессом сохранения и
восстановления состояния приложения
5. import Shared
import Storage
import AVFoundation
import XCGLogger
import Breakpad
import MessageUI
import WebImage
import SwiftKeychainWrapper
import LocalAuthentication
private let log = Logger.browserLogger
let LatestAppVersionProfileKey = "latestAppVersion"
let AllowThirdPartyKeyboardsKey = "settings.allowThirdPartyKeyboards"
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var browserViewController: BrowserViewController!
var rootViewController: UINavigationController!
weak var profile: BrowserProfile?
var tabManager: TabManager!
var adjustIntegration: AdjustIntegration?
weak var application: UIApplication?
var launchOptions: [NSObject: AnyObject]?
let appVersion = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as! String
var openInFirefoxURL: NSURL? = nil
func application(application: UIApplication, willFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Hold references to willFinishLaunching parameters for delayed app launch
self.application = application
self.launchOptions = launchOptions
log.debug("Configuring window…")
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window!.backgroundColor = UIConstants.AppBackgroundColor
// Short circuit the app if we want to email logs from the debug menu
if DebugSettingsBundleOptions.launchIntoEmailComposer {
self.window?.rootViewController = UIViewController()
presentEmailComposerWithLogs()
return true
} else {
return startApplication(application, withLaunchOptions: launchOptions)
}
}
Импорты
Зависимости
WINDOW
startApplication
6. private func startApplication(application: UIApplication, withLaunchOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
log.debug("Setting UA…")
// Set the Firefox UA for browsing.
setUserAgent()
log.debug("Starting keyboard helper…")
// Start the keyboard helper to monitor and cache keyboard state.
KeyboardHelper.defaultHelper.startObserving()
log.debug("Starting dynamic font helper…")
// Start the keyboard helper to monitor and cache keyboard state.
DynamicFontHelper.defaultHelper.startObserving()
log.debug("Setting custom menu items…")
MenuHelper.defaultHelper.setItems()
log.debug("Creating Sync log file…")
let logDate = NSDate()
// Create a new sync log file on cold app launch. Note that this doesn't roll old logs.
Logger.syncLogger.newLogWithDate(logDate)
log.debug("Creating corrupt DB logger…")
Logger.corruptLogger.newLogWithDate(logDate)
log.debug("Creating Browser log file…")
Logger.browserLogger.newLogWithDate(logDate)
log.debug("Getting profile…")
let profile = getProfile(application)
if !DebugSettingsBundleOptions.disableLocalWebServer {
log.debug("Starting web server…")
// Set up a web server that serves us static content. Do this early so that it is ready when the UI is presented.
setUpWebServer(profile)
}
log.debug("Setting AVAudioSession category…")
do {
// for aural progress bar: play even with silent switch on, and do not stop audio from other apps (like music)
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, withOptions:
AVAudioSessionCategoryOptions.MixWithOthers)
} catch _ {
log.error("Failed to assign AVAudioSession category to allow playing with silent switch on for aural progress bar")
}
Настройка
приложения
7. let defaultRequest = NSURLRequest(URL: UIConstants.DefaultHomePage)
let imageStore = DiskImageStore(files: profile.files, namespace: "TabManagerScreenshots", quality:
UIConstants.ScreenshotQuality)
log.debug("Configuring tabManager…")
self.tabManager = TabManager(defaultNewTabRequest: defaultRequest, prefs: profile.prefs, imageStore: imageStore)
self.tabManager.stateDelegate = self
// Add restoration class, the factory that will return the ViewController we
// will restore with.
log.debug("Initing BVC…")
browserViewController = BrowserViewController(profile: self.profile!, tabManager: self.tabManager)
browserViewController.restorationIdentifier = NSStringFromClass(BrowserViewController.self)
browserViewController.restorationClass = AppDelegate.self
browserViewController.automaticallyAdjustsScrollViewInsets = false
rootViewController = UINavigationController(rootViewController: browserViewController)
rootViewController.automaticallyAdjustsScrollViewInsets = false
rootViewController.delegate = self
rootViewController.navigationBarHidden = true
self.window!.rootViewController = rootViewController
log.debug("Configuring Breakpad…")
activeCrashReporter = BreakpadCrashReporter(breakpadInstance: BreakpadController.sharedInstance())
configureActiveCrashReporter(profile.prefs.boolForKey("crashreports.send.always"))
log.debug("Adding observers…")
NSNotificationCenter.defaultCenter().addObserverForName(FSReadingListAddReadingListItemNotification, object: nil, queue: nil)
{ (notification) -> Void in
if let userInfo = notification.userInfo, url = userInfo["URL"] as? NSURL {
let title = (userInfo["Title"] as? String) ?? ""
profile.readingList?.createRecordWithURL(url.absoluteString, title: title, addedBy: UIDevice.currentDevice().name)
}
}
// check to see if we started 'cos someone tapped on a notification.
if let localNotification = launchOptions?[UIApplicationLaunchOptionsLocalNotificationKey] as? UILocalNotification {
viewURLInNewTab(localNotification)
}
adjustIntegration = AdjustIntegration(profile: profile)
// We need to check if the app is a clean install to use for
// preventing the What's New URL from appearing.
if getProfile(application).prefs.intForKey(IntroViewControllerSeenProfileKey) == nil {
getProfile(application).prefs.setString(AppInfo.appVersion, forKey: LatestAppVersionProfileKey)
}
log.debug("Updating authentication keychain state to reflect system state")
self.updateAuthenticationInfo()
log.debug("Done with setting up the application.")
return true
}
8. func applicationWillTerminate(application: UIApplication) {
log.debug("Application will terminate.")
// We have only five seconds here, so let's hope this doesn't take too long.
self.profile?.shutdown()
// Allow deinitializers to close our database connections.
self.profile = nil
self.tabManager = nil
self.browserViewController = nil
self.rootViewController = nil
}
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
var shouldPerformAdditionalDelegateHandling = true
log.debug("Did finish launching.")
log.debug("Setting up Adjust")
self.adjustIntegration?.triggerApplicationDidFinishLaunchingWithOptions(launchOptions)
log.debug("Making window key and visible…")
self.window!.makeKeyAndVisible()
// Now roll logs.
log.debug("Triggering log roll.")
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) {
Logger.syncLogger.deleteOldLogsDownToSizeLimit()
Logger.browserLogger.deleteOldLogsDownToSizeLimit()
}
if #available(iOS 9, *) {
// If a shortcut was launched, display its information and take the appropriate action
if let shortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem {
QuickActions.sharedInstance.launchedShortcutItem = shortcutItem
// This will block "performActionForShortcutItem:completionHandler" from being called.
shouldPerformAdditionalDelegateHandling = false
}
}
log.debug("Done with applicationDidFinishLaunching.")
return shouldPerformAdditionalDelegateHandling
}
Quick Actions
9. func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
if let components = NSURLComponents(URL: url, resolvingAgainstBaseURL: false) {
if components.scheme != "firefox" && components.scheme != "firefox-x-callback" {
return false
}
var url: String?
for item in (components.queryItems ?? []) as [NSURLQueryItem] {
switch item.name {
case "url":
url = item.value
default: ()
}
}
if let url = url, newURL = NSURL(string: url.unescape()) {
// If we are active then we can ask the BVC to open the new tab right away. Else we remember the
// URL and we open it in applicationDidBecomeActive.
if application.applicationState == .Active {
if #available(iOS 9, *) {
self.browserViewController.switchToPrivacyMode(isPrivate: false)
}
self.browserViewController.openURLInNewTab(newURL)
} else {
openInFirefoxURL = newURL
}
return true
}
}
return false
}
func application(application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: String) -> Bool {
if let thirdPartyKeyboardSettingBool = getProfile(application).prefs.boolForKey(AllowThirdPartyKeyboardsKey) where
extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier {
return thirdPartyKeyboardSettingBool
}
return true
}
Открытие URL’ов
Разрешения для
расширений
10. func applicationDidBecomeActive(application: UIApplication) {
guard !DebugSettingsBundleOptions.launchIntoEmailComposer else {
return
}
self.profile?.syncManager.applicationDidBecomeActive()
// We could load these here, but then we have to futz with the tab counter
// and making NSURLRequests.
self.browserViewController.loadQueuedTabs()
// handle quick actions is available
if #available(iOS 9, *) {
let quickActions = QuickActions.sharedInstance
if let shortcut = quickActions.launchedShortcutItem {
// dispatch asynchronously so that BVC is all set up for handling new tabs
// when we try and open them
quickActions.handleShortCutItem(shortcut, withBrowserViewController: browserViewController)
quickActions.launchedShortcutItem = nil
}
// we've removed the Last Tab option, so we should remove any quick actions that we already have that are last tabs
// we do this after we've handled any quick actions that have been used to open the app so that we don't b0rk if
// the user has opened the app for the first time after upgrade with a Last Tab quick action
QuickActions.sharedInstance.removeDynamicApplicationShortcutItemOfType(ShortcutType.OpenLastTab, fromApplication:
application)
}
// If we have a URL waiting to open, switch to non-private mode and open the URL.
if let url = openInFirefoxURL {
openInFirefoxURL = nil
// This needs to be scheduled so that the BVC is ready.
dispatch_async(dispatch_get_main_queue()) {
if #available(iOS 9, *) {
self.browserViewController.switchToPrivacyMode(isPrivate: false)
}
self.browserViewController.switchToTabForURLOrOpen(url)
}
}
}
func applicationWillEnterForeground(application: UIApplication) {
// The reason we need to call this method here instead of `applicationDidBecomeActive`
// is that this method is only invoked whenever the application is entering the foreground where as
// `applicationDidBecomeActive` will get called whenever the Touch ID authentication overlay disappears.
self.updateAuthenticationInfo()
}
private func updateAuthenticationInfo() {
if let authInfo = KeychainWrapper.authenticationInfo() {
if !LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil) {
authInfo.useTouchID = false
KeychainWrapper.setAuthenticationInfo(authInfo)
}
}
}
Quick Actions
11. func applicationDidEnterBackground(application: UIApplication) {
self.profile?.syncManager.applicationDidEnterBackground()
var taskId: UIBackgroundTaskIdentifier = 0
taskId = application.beginBackgroundTaskWithExpirationHandler { _ in
log.warning("Running out of background time, but we have a profile shutdown pending.")
application.endBackgroundTask(taskId)
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) {
self.profile?.shutdown()
application.endBackgroundTask(taskId)
}
// Workaround for crashing in the background when <select> popovers are visible (rdar://24571325).
let jsBlurSelect = "if (document.activeElement && document.activeElement.tagName === 'SELECT')
{ document.activeElement.blur(); }"
tabManager.selectedTab?.webView?.evaluateJavaScript(jsBlurSelect, completionHandler: nil)
}
func application(application: UIApplication, handleActionWithIdentifier identifier: String?, forLocalNotification notification:
UILocalNotification, completionHandler: () -> Void) {
if let actionId = identifier {
if let action = SentTabAction(rawValue: actionId) {
viewURLInNewTab(notification)
switch(action) {
case .Bookmark:
addBookmark(notification)
break
case .ReadingList:
addToReadingList(notification)
break
default:
break
}
} else {
print("ERROR: Unknown notification action received")
}
} else {
print("ERROR: Unknown notification received")
}
}
func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {
viewURLInNewTab(notification)
}
Загрузка данных
в фоне
Локальные и
удаленные
уведомления
12. func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) ->
Void) -> Bool {
if let url = userActivity.webpageURL {
browserViewController.switchToTabForURLOrOpen(url)
return true
}
return false
}
@available(iOS 9.0, *)
func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem,
completionHandler: Bool -> Void) {
let handledShortCutItem = QuickActions.sharedInstance.handleShortCutItem(shortcutItem, withBrowserViewController:
browserViewController)
completionHandler(handledShortCutItem)
}
var activeCrashReporter: CrashReporter?
func configureActiveCrashReporter(optedIn: Bool?) {
if let reporter = activeCrashReporter {
configureCrashReporter(reporter, optedIn: optedIn)
}
}
public func configureCrashReporter(reporter: CrashReporter, optedIn: Bool?) {
let configureReporter: () -> () = {
let addUploadParameterForKey: String -> Void = { key in
if let value = NSBundle.mainBundle().objectForInfoDictionaryKey(key) as? String {
reporter.addUploadParameter(value, forKey: key)
}
}
addUploadParameterForKey("AppID")
addUploadParameterForKey("BuildID")
addUploadParameterForKey("ReleaseChannel")
addUploadParameterForKey("Vendor")
}
if let optedIn = optedIn {
// User has explicitly opted-in for sending crash reports. If this is not true, then the user has
// explicitly opted-out of crash reporting so don't bother starting breakpad or stop if it was running
if optedIn {
reporter.start(true)
configureReporter()
reporter.setUploadingEnabled(true)
} else {
reporter.stop()
}
}
// We haven't asked the user for their crash reporting preference yet. Log crashes anyways but don't send them.
else {
reporter.start(true)
configureReporter()
}
}
Пользовательска
я активность
Пользовательска
я активность
ThirdParties
13. // MARK: - Root View Controller Animations
extension AppDelegate: UINavigationControllerDelegate {
func navigationController(navigationController: UINavigationController,
animationControllerForOperation operation: UINavigationControllerOperation,
fromViewController fromVC: UIViewController,
toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
if operation == UINavigationControllerOperation.Push {
return BrowserToTrayAnimator()
} else if operation == UINavigationControllerOperation.Pop {
return TrayToBrowserAnimator()
} else {
return nil
}
}
}
extension AppDelegate: TabManagerStateDelegate {
func tabManagerWillStoreTabs(tabs: [Browser]) {
// It is possible that not all tabs have loaded yet, so we filter out tabs with a nil URL.
let storedTabs: [RemoteTab] = tabs.flatMap( Browser.toTab )
// Don't insert into the DB immediately. We tend to contend with more important
// work like querying for top sites.
let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(ProfileRemoteTabsSyncDelay * Double(NSEC_PER_MSEC))), queue) {
self.profile?.storeTabs(storedTabs)
}
}
}
extension AppDelegate: MFMailComposeViewControllerDelegate {
func mailComposeController(controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error:
NSError?) {
// Dismiss the view controller and start the app up
controller.dismissViewControllerAnimated(true, completion: nil)
startApplication(application!, withLaunchOptions: self.launchOptions)
}
}
Стек навигации