Skip to main content
Version: 7.0.0

Release Notes, 6.16.7

🚧 Minimum required:

Android Player&Emulator: v6.16.7 🚀
Firebase Plugin: v6.0.1 🚀
@smartface/native: v4.3.5 🚀

This beta release contains the FirebaseCrashlytics migration and gradle plugin & build machine upgrades. If you are using firebase in your Smartface Application, this changes will be important to be made.

There are also version updates on other modules within this release. Smartface Helloworld Boilerplate always have the up-to-date packages and versions in them, feel free to compare your versions and update them accordingly:

https://github.com/smartface/helloworld-boilerplate

🆕 What's New

  • Prior to Firebase Changes on Android, equivalent changes have been done for iOS as well. Simply update your firebase version to 6.0.3 and the migration will be complete!
  • EventEmitter has been integrated into the native side
  • SSL Pinning have been added for both platforms
  • Jitsi Meet Plugin have been implemented and ready to use for iOS. Check the documentation for details

🐞 Bug Fix

  • Fixed wrong typing on scrollView.addChild method. ScrollView has a layout in it, so in order to add a View inside of it, you should be using scrollView.layout.addChild instead.
  • Fixed wrong typing on Application.Android.keyboardModeinputs.
  • Fixed wrong typing on Image.createSystemIcon function.
  • Fixed Application.call method not working properly on Android 11 devices.
tip

If you are looking for Android 11 changes and Migration, refer to the previous release note:

Release Notes 6.16.6

📑 Documentation

  • Prior to changes which has been done on @smartface/extension-utils , the documentation have been improved drastically and have a different location right now. You can check the documentation at the link below

https://smartface.github.io/sf-extension-utils/

  • SSL Pinning Dtocumentation have been implemented. Click here to access it.
  • Jitsi Meet Plugin Documentation have been implemented. Click here to access it.
  • Picture in Picture Documentation have been added for iOS 14 or above. Click here to access it.

EventEmitter

Within the Native modules, Smartface now adapts with modern EventEmitter methodology to define\&call events prior to callback.

To get more information, click here to access Handling Events documentation below:

Old Usage:

import Button from "@smartface/native/button";
//...
this.button = new Button();
this.button.onPress = () => {
alert("button pressed");
};

New Usage

import Button from "@smartface/native/button";
//...
this.button = new Button();
this.button.on('press', () => {
alert("button pressed");
});

Advantages

  • While defining Events instead of callbacks, now you can define multiple events and when the touch is done or event is fired, all of the events will be fired.
  • Events can be terminated easily.
info

While the callbacks are deprecated, they will still be usable and will not be removed in the short run. Your current project will work as is.

Smartface App Adaption for 6.16.7

On this release, there will be changes to be done on your Smartface Project. The changes contain:

  • [Android] build.gradle changes and version adaptations
  • Firebase Adaptations
  • External Module Updates
  • Android Manifest Updates
tip

Don't forget to update your @smartface/native module to its latest version. If you prefer to be automatically updated release-to-release, simply change your package.json entry like shown below

scripts/package.json
{
"@smartface/native": "latest" // or "beta" if you like to receive newer feature sets.
}

Updating External Modules

All modules now have full Type-Safe support with fully Typescript implementation

info

Smartface recommends to keep your packages up-to-date to provide the best support\&coverage over your Smartface Application.

The modules below are converted to Typescript and have full type-safe implementations. Your intelliSense will pick up what's right immediately!

In order to update the modules;

  • open your scripts/package.json file
  • Change the versions of the modules which you use
  • Launch yarn install or yarn on your scripts folder.
Disclaimer about Router

The pathing of Router module have been changed from @smartface/router/src/... to 0smartface/router/lib/... . Therefore, it is advised to use module require shown like below:

// ⌛️ Old usage, is not supported anymore and will throw error if unchanged
import NativeStackRouter from `@smartface/router/src/native/NativeStackRouter`;

// ❌ Don't
import NativeStackRouter from `@smartface/router/lib/native/NativeStackRouter`;
import BottomTabBarRouter from `@smartface/router/lib/native/BottomTabBarRouter`;

// ✅ Do
import { NativeStackRouter, BottomTabbarRouter } from `@smartface/router`;

Android Usage of Native Libraries

  • Whether or not the package installer extracts native libraries from the APK to the filesystem. If set to "false", then your native libraries must be page aligned and stored uncompressed in the APK. Although your APK might be larger, your application should load faster because the libraries are directly loaded from the APK at runtime

The default value is "true" if extractNativeLibs is not configured in AndroidManifest.xml previously. However, when building your app using 6.16.7-beta.1 or higher, this property is reset to "false" if it is NOT configured in AndroidManifest.xml .

<application android:extractNativeLibs="true">
...
</application>
  • Remove previously added services & receiver from AndroidManifest.xml.
    <receiver android:exported="true" android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>

<service android:exported="false" android:name="com.google.firebase.messaging.FirebaseMessagingService">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<service android:name="com.google.firebase.components.ComponentDiscoveryService">
<meta-data android:name="com.google.firebase.components:com.google.firebase.iid.Registrar" android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
danger

If those services & receivers wasn't removed, might lead to unexpected build errors.

  • The minSdk version should not be declared in the android manifest file.
    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
  • Interact with a speech recognition service need to add the following <queries> element to their manifest files:
<queries>
<intent>
<action
android:name="android.speech.RecognitionService" />
</intent>
</queries>
  • Package Visibility

When an app targets Android 11 (API level 30) or higher and queries for information about the other apps that are installed on a device, the system filters this information by default. The limited package visibility reduces the number of apps that appear to be installed on a device, from your app's perspective.

It effects the Application.call methods by failing if intended queries won't defined in AndroidManifest.xml.

For example:

//Calling youtube video with url
Application.call({
uriScheme: "https://www.youtube.com/watch?v=VMLU9mfzHYI",
data: {},
onSuccess: function () {
alert("Application call completed");
},
onFailure: function () {
alert("Application call failed");
},
isShowChooser: true,
chooserTitle: "Select an Application",
});

In above code snippet, the youtube video url being send as a request to another apps like browser and youtube app to open and play it. By default your app couldn't determine which apps are available to catch the send uri-scheme.

It's important to consider the set of other installed apps on the device that your app intends to access.If your app targets Android 11 (API level 30) or higher, the system makes some apps visible to your app automatically, but it filters out other apps by default. The below example describes how to make these other apps visible to your app.

Add the <queries> element in your app's manifest file. Within the <queries> element, specify the other apps by package name, by intent signature, or by provider authority.

For example:

<manifest>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="*/*" />
</intent>
</queries>
...
</manifest>

For more detail please visit here.

FirebaseCrashlytics Migration

If your app includes the firebase-plugin, you should follow steps;

  • You must also disable the Pointer Tagging feature in your app by adding the following to your AndroidManifest.xml
<application android:allowNativeHeapPointerTagging="false">
...
</application>
  • Remove Fabric api key assignments from AndroidManifest.xml
<meta-data android:name="io.fabric.ApiKey" android:value="6c83c9c1986d62695522c4bc4f0274deda6a7934" />
  • Finally, increase your firebase-plugin version to 6.0.0^ and then go to the firebase plugin, to apply changes by checking newly described configuration changes & crashlytics code refactor.

Push Notification

This statements concerns the project who aren't using smartface'sfirebase-plugin for push notification. If you're using firebase-plugin for push notification, you can simply ignore this section.

Previously configuring push notification is done by passing senderID information to project.json file. By upgrading the firebase messaging, we have removed this configuration and instead added much simply way to configure.

To migrate, follow below steps;

  • Download google-services.json from Firebase console.

  • Place google-services.json file into ~/workspace/config/Android

  • apply plugin in dependencies.gradle which is located under ~/workspace/config/Android folder.

    apply plugin:  'com.google.gms.google-services'

    dependencies {
    ...
    }