forcedotcom / SalesforceMobileSDK-iOS

iOS SDK for Salesforce
Other
538 stars 421 forks source link

Live reload not working with SDK 12.1.1 when `isLocal` is set to false #3761

Open serhii-filko-ct opened 1 month ago

serhii-filko-ct commented 1 month ago

Version of Mobile SDK Used: 12.1.1
Issue found: Hybrid App
OS Version: iOS 17.5
Device: iPad Pro 11-inch, 4th generation (Simulator)
Error Log: No errors.

Description
After upgrading from Salesforce SDK 11.0.1 to 12.1.1, there is an issue with Live Reload in my Ionic hybrid app. In version 11.0.1, after successful authentication, the app would correctly load the start page from the address and port specified by the Live Reload server. However, in version 12.1.1, the app now loads the page from the Salesforce API address instead of the local server when isLocal is set to false in the bootconfig.json file.

When running the app with isLocal: true, everything works as expected, and the app loads correctly after authentication. The issue only occurs when isLocal is set to false.

Steps to Reproduce

  1. Set isLocal to false in the bootconfig.json file.
  2. Run the following command in the terminal:
    ionic cordova emulate ios --debug --livereload --emulator --external
  3. Authenticate using Salesforce.

Expected Behavior
After successful authentication, the app should load the start page from the local server as specified in config.xml when isLocal is set to false. The example of relevant settings in the config.xml are:

<content src="http://192.168.1.35:8100" />
<allow-navigation href="http://192.168.1.35:8100" sessionid="a86f71bc" />

Actual Behavior
After authentication, the app loads the page from the Salesforce API address (e.g., https://test.salesforce.com/index.html or your env), instead of the local server.

wmathurin commented 1 week ago

What is the value for startPage ?