AriverFG upgrade FAQ

Background for AriverFG upgrade

During the AriverFG upgrade, the AriverFG engineering framework is reorganized to make the overall project structure more reasonable. The main adjustments include the following:

  • The core code (e.g. AriverKernel, AriverApp, AriverRuntime, AriverSecurity, etc.) is consolidated into AriverCore for better management and clarity.
  • The extensible code within AriverKernel (e.g. RVKExtensionJsapi, RVKBridgeExtension, RVKJsApi, RVKJsApiManager, etc. ) is dissected and relocated to AriverFGExt, which facilitates easier maintenance.
  • The code of AriverDevice and AriverDeviceCore is merged into AriverDevice to improve functionality integration.
  • Part of AriverFileManager code is migrated to GRVAppContainer, and the prefix of some class name is changed.

You can take the following screenshots as references to compare the adjustments:

Before the upgrade

After the upgrade

image.png

image.png

Issues that might occur after the AriverFG upgrade

Due to the adjustments of the AriverFG engineering framework, you may encounter some compilation issues after upgrading to the new version. The followings are possible issues and the solutions accordingly.

No such module 'AriverKernel'/'AriverApp'/'AriverSecurity'

Issues that you might encounter:

  • No such module 'AriverKernel'
  • No such module 'AriverApp'
  • No such module 'AriverSecurity'
  • or some issues like this pattern

Reason

The following components are consolidated into AriverCore for better management and clarity:

AriverKernel, AriverResource, AriverApp, AriverConfig, AriverSecurity, AriverLogger, AriverRuntime.

Solution

Use the import AriverCore statement to replace the original statements.

Code samples

  • Swift
copy
// import AriverKernel 
// import AriverApp 
// import AriverSecurity 
// import AriverResource 
// import AriverConfig 
// import AriverRuntime 
// import AriverLogger 

import AriverCore
  • Objective-C
copy
// #import <AriverKernel/AriverKernel.h>
// #import <AriverApp/AriverApp.h>
// #import <AriverResource/AriverResource.h>
// #import <AriverConfig/AriverConfig.h>
// #import <AriverFileManager/AriverFileManager.h>
// #import <AriverLogger/AriverLogger.h>
// #import <AriverRuntime/AriverRuntime.h>
// #import <AriverSecurity/AriverSecurity.h>
// #import <AriverKernel/RVKBridgeMethodInfoManager.h>
// #import <AriverResource/NSFileManager+RVRTar.h>

#import <AriverCore/AriverKernel.h>
#import <AriverCore/AriverApp.h>
#import <AriverCore/AriverResource.h>
#import <AriverCore/AriverConfig.h>
#import <AriverCore/AriverFileManager.h>
#import <AriverCore/AriverLogger.h>
#import <AriverCore/AriverRuntime.h>
#import <AriverCore/AriverSecurity.h>
#import <AriverCore/RVKBridgeMethodInfoManager.h>
#import <AriverCore/NSFileManager+RVRTar.h>

Cannot find type 'RVKBridgeExtension'/'RVKJsApiConfig'/'RVKJsApiManager' in scope

Issues that you might encounter:

  • Cannot find type 'RVKBridgeExtension' in scope
  • Cannot find type 'RVKJsApiConfig' in scope
  • Cannot find type 'RVKJsApiManager' in scope
  • or some issues like this pattern

Reason

Part of the extensible code within AriverKernel is dissected and relocated to AriverFGExt, which includes the following classes:

RVKBridgeExtension, RVKJsApiConfig, RVKMethodArgument, RVKBridgeMethodInfo, RVKPlugin4JSApiDispatch, RVKJsApiManager, RVKJsApi, RVKExtensionRegistry, RVKExtensionNodeRegistry, RVKExtensionJsapi, RVKBridgeMethodInfoManager, RVKExtensionProtocol4JSApi

Solution

Use the import AriverExtHub statement to replace the original statement.

Code samples

  • Swift
copy
// import AriverKernel 

import AriverExtHub
  • Objective-C
copy
// #import <AriverKernel/RVKBridgeExtension.h>
// #import <AriverKernel/RVKJsApiManager.h>
// #import <AriverKernel/RVKJsApi.h>
// #import <AriverKernel/RVKExtensionJsapi.h>

#import <AriverExtHub/RVKBridgeExtension.h>
#import <AriverExtHub/RVKJsApiManager.h>
#import <AriverExtHub/RVKJsApi.h>
#import <AriverExtHub/RVKExtensionJsapi.h>

No such module 'AriverDeviceCore'

Reason

The code of AriverDevice and AriverDeviceCore is merged into AriverDevice .

Solution

Use the import AriverDevice statement to replace the original statement.

Code samples

  • Swift
copy
// import AriverDeviceCore 

import AriverDevice
  • Objective-C
copy
// #import <AriverDeviceCore/RVDeviceCompass.h>

#import <AriverDevice/RVDeviceCompass.h>

No such module 'AriverFileManager'

Reason

Part of AriverFileManager code is migrated to GRVAppContainer.

Solution

Use the import GRVAppContainer statement to replace the original statement.

Code samples

  • Swift
copy
// import AriverFileManager 
import GRVAppContainer
  • Objective-C
copy
// #import <AriverFileManager/RVFPathUtils.h>

#import <GRVAppContainer/GRVPathUtils.h>

Cannot find type 'RVFPathUtils'/ 'RVFUtils'/'RVFileManagerService' in scope

Issues that you might encounter:

  • Cannot find type 'RVFPathUtils' in scope
  • Cannot find type 'RVFUtils' in scope
  • Cannot find type 'RVFileManagerService' in scope
  • or some issues like this pattern

Reason

Part of AriverFileManager code is migrated to GRVAppContainer, and the prefix of some class name is changed.

Solution

  1. Use the import GRVAppContainer statement to replace the original statement.
  2. Modify the prefix of class name from RVF or RVP to GRV. For example, the RVFPathUtils class name is changed to GRVPathUtils. The following is the mapping relationship for the class names.
copy
//Before the class name is changed ->  After the class name is changed
RVFPathUtils -> GRVPathUtils
RVFUtils -> GRVFileUtils
RVFileManagerService -> GRVFileManagerService
RVPBridgeExtension4RemoveSavedFile -> GRVBridgeExtension4RemoveSavedFile
RVPBridgeExtension4GetSavedFileInfo -> GRVBridgeExtension4GetSavedFileInfo
RVPBridgeExtension4GetSavedFileList -> GRVBridgeExtension4GetSavedFileList
RVPBridgeExtension4GetFileInfo -> GRVBridgeExtension4GetFileInfo
RVPBridgeExtension4SaveFile -> GRVBridgeExtension4SaveFile

Code samples

  • Swift
copy
// import AriverFileManager 
import GRVAppContainer

// use GRVPathUtils to replace RVFPathUtils
// let imagePath = RVFPathUtils.getApFilePath(fromLocal: "", fileType: .image);
let imagePath = GRVPathUtils.getApFilePath(fromLocal: "", fileType: .image);
  • Objective-C
copy
// #import <AriverFileManager/RVFPathUtils.h>
#import <GRVAppContainer/GRVPathUtils.h>

// NSString *filePath = [RVFPathUtils getApFilePathFromLocal:@"" fileType:GRVConvertFileTypeImage];
NSString *filePath = [GRVPathUtils getApFilePathFromLocal:@"" fileType:GRVConvertFileTypeImage];