You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed iOS params issue related to the second init for wrappers (#594)
* Fixed params issue related to the second init
* On first init call the app id is null form some wrappers
* Now every time init is called we try to download the params if the `didCallDownloadParams` false
* Fix for OneSignal wrappers in native init
* Wrapper SDKs call init twice, once with a null app id and once with a valid app id
- On first init: null app id prevents iOS params and initDone will be set true
- On second init: valid app id will allow iOS params to be pulled down and init is done already
* Log level is now being set to default VERBOSE in NSE
- This is so any logs get recorded for the device even when coming from the NSE
- The customer will have control app level for showing OneSignal logs, but NSE will always log out logs
* Unit test written for checking that init called twice (once with null app id and once with valid app id) does not effect iOS params request
* Updated the log when entering the NSE of the SDK
[selfonesignal_Log:ONE_S_LL_VERBOSE message:@"iOS Parameters for this application has not yet been downloaded. Delaying call to setEmail: until the parameters have been downloaded."];
NOTE: The init method uses flags initDone, didCallDownloadParameters, downloadedParameters and these prevent code from executing more than once in specific cases
1829
+
initDone BOOL is used to return early in the event of init being called more than once
1830
+
didCallDownloadParameters BOOL is used to determine whether iOS params have started being pulled down
1831
+
downloadedParameters BOOL is used to determine whether iOS params have successfully been pulled down
0 commit comments