Last Updated on : 2023-09-19 03:01:05download

1. Why is the navigation bar style of other view controllers changed after the push method is called to navigate to the panel?

Device Control UI BizBundle is designed to provide a view controller that loads a rendered React Native page. During this process, this view controller hides the navigation bar by modifying the transparency.

Therefore, after the push method is called to access the panel controller, when you pop back to the controller, the style will be restored. This is because the push and pop animations for iOS are managed by NavigationController. Only one NavigationBar is used. On the Stack storage structure of NavigationController, when the navigation bar of a ViewController on Stack is modified, the style of other ViewControllers is modified accordingly.

You can use any of the following two methods to restore the style:

  • Method 1:

    // 1. Import the header file.
    #import <ThingNavigationController/ThingNavigationTopBarProtocol.h>
    // 2. Display the navigation bar.
    self.thing_topBarHidden = NO;
    self.thing_topBarAlpha = 1.0;
    // 3. Restore the style of the navigation bar. For example, modify the background color.
    self.thing_topBarBackgroundImage = <#Image#>;
    // Or
    self.thing_topBarBackgroundColor = <#Color#>;
  • Method 2:

    // 1. Import the header file.
    #import <ThingNavigationController/ThingNavigationCallbackProtocol.h>
    // 2. Implement the delegate method of `ThingNavigationCallbackProtocol`.
    - (void)thing_naviTransitioning:(id<UIViewControllerTransitionCoordinatorContext>)context {
        // 3. Display the navigation bar.
        [self.navigationController setNavigationBarHidden:false animated:true];
        // 4. Restore the style of the navigation bar. For example, modify the background color.
        [self.navigationController.navigationBar setBarTintColor:<#Color#>];
        // Or
        [self.navigationController.navigationBar setBackgroundImage:<#Image#> forBarMetrics:UIBarMetricsDefault];

2. Why does pod update returns an error message during the process to load dependent plug-ins?

CocoaPods can be used to integrate with the UI BizBundle. In this case, due to the logic of the pod, when the version of each pod library is not specified in the Podfile, the latest official version number will be integrated by default. The version format is x.y.z, where x, y, and z are numbers.

To depend on the extension features as the plug-ins provided by the Device Control UI BizBundle, you must set the baseline version number denoted by the latest date of the UI BizBundle in the Podfile. This is because the versions of the plug-ins are the pre-release versions. For more information about the version history of the UI BizBundle, see Version History.

3. Why does the system returns the error message “The current version is unavailable. Please update the app” after navigation to the panel?

Before the API request is made to access the Device Details UI BizBundle, the device information must be queried with the following API method of Smart Life App SDK:

 *  After init home, need to get home details
 *  Returns the details of a specific home after the home object is initialized. This way, the home instance object can have data respecting the properties `homeModel`, `roomList`, `deviceList`, and `groupList`.
 *  @param success     Success block
 *  @param failure     Failure block
- (void)getHomeDetailWithSuccess:(void (^)(ThingSmartHomeModel *homeModel))success

If the error message still appears in follow-up operations, the causes might be that:

  • The Message Queuing Telemetry Transport (MQTT) communication protocol supported by the current SDK is earlier than the firmware communication protocol. This means that deviceModel.pv is earlier than THING_CURRENT_GW_PROTOCOL_VERSION.
  • The current local area network (LAN) communication protocol supported by the SDK is earlier than the firmware communication protocol. This means that deviceModel.lpv is earlier than THING_CURRENT_LAN_PROTOCOL_VERSION.
  • The Panel Multilingual BizBundle does not support the current version. This means that deviceModel.rnFind is false.
  • No suitable view controller has been found by the panel.

4. My app for iOS did not pass the review, because an error about the App Tracking Transparency permission has occurred to the app. How can I deal with this error and pass the review?

The following example shows the reason for rejection:

Guideline 2.5.1 - Performance - Software Requirements

We noticed your app's binary contains references to App Tracking Transparency, but you have indicated you do not intend to ask users for permission to track at this time.

Since App Tracking Transparency is only intended to be used by apps requesting authorization to track, it would be appropriate to disable App Tracking Transparency before resubmitting your app for review.

If any error about the App Tracking Transparency, HealthKit, or Siri permission has occurred to your app, you must update the UI BizBundles to the latest version and submit your app for review again. Then, your app will be approved for launching.

Write the Podfile in any of the following ways:

  • Method 1:
    pod 'ThingSmartXXXBizBundle', '~> 3.34.5'
  • Method 2:
    pod 'ThingSmartXXXBizBundle', '~> 4.0.0'