Changelog
Major changes
- Time to move forward : We dropped old platforms under 3% of worldwide usage : iOS 6 and 7. And Android versions below 4.1.
- We removed the CLI. not ready for production, newcommers had too much problems with it. #139
- Javascript file is now a single file, the same for every platforms (more about it below).
Native bars fixes and cobalt.conf features
- You can now enable iOS scrollToTop in cobalt.conf #109.
- You can now set webview background color from cobalt.conf #106
- A lot of bugfixes have been made on native bars : #94, #96, #113, #125, #127
Web API changes
- A single cobalt.js/cobalt.min.js is now available for every platforms. Platform is detected automagically and debugInBrowser mode too. This make it easier to use in your native projects and simpler to debug in the browser. You can forget about debugInBrowser boolean. New cobalt.js is hosted in repository Cobalt-Web
- popTo navigation method has been removed. It is now included in pop method. #108
- weblayers can now move forward/backward for multi-layered web layouts
- More developper-friendly cobalt.platform infos #46
- Zoom has been enabled on cobalt fragments webviews (main and weblayer) if you change your meta tag accordingly. #145
and a few other fixes...
... that you can find here if you want.
/ ! \ Android migration
1. In order to update the Android target to Android 8.0 / API 26, we needed to update also the Android support library which is now hosted on maven.
So you need to update your main build.gradle
like below:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
2. Due to the WebLayers update, you know have to use the following layout in your activities
<FrameLayout
android:id="@+id/fragments_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0" />
<FrameLayout
android:id="@+id/webview_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/weblayer_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</FrameLayout>
Of course, you are still able to use your own ids, but note that methods have been renamed/added:
- int getFragmentsContainerId()
;
- int getFragmentContainerId()
;
- int getWebLayerFragmentContainerId()
;
3. The onUnhandledMessage
method of classes inheriting from CobaltFragment
are now required to return a boolean showing if they catched the message or not.