Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: UI unresponsiveness if invoked on the main thread #354

Closed
NikolasManiatis opened this issue Jan 19, 2023 · 3 comments
Closed

[Bug]: UI unresponsiveness if invoked on the main thread #354

NikolasManiatis opened this issue Jan 19, 2023 · 3 comments
Labels

Comments

@NikolasManiatis
Copy link

Platform

iOS

Platform Version

iOS 16.2

Braze SDK Version

4.5.2

Xcode Version

14.2

Integration Method

Cocoapods

Computer Processor

Apple (M1)

Repro Rate

100%

Steps To Reproduce

Example:

  1. Add pod 'Appboy-iOS-SDK' to the Podspec file.
  2. Add
    Appboy.start( withApiKey: key, in: application, withLaunchOptions: launchOptions, withAppboyOptions: [ ABKInAppMessageControllerDelegateKey: self, ABKEnableAutomaticLocationCollectionKey: true, ABKEnableGeofencesKey: true ] ) Appboy.sharedInstance()?.inAppMessageController.inAppMessageUIController?.setInAppMessageUIDelegate?( self )
    method in application:didFinishLaunchingWithOptions: method in AppDelegate.swift.
  3. Enable Location services
  4. Run the app.
  5. Accept the location services & re-run the app.

Expected Behavior

We should expect no warnings from Xcode regarding multithreading issues.

Actual Incorrect Behavior

Xcode presents a warning in the Issue Navigator that
AppboyKit/AppboyKit/AppboyKit/Location/ABKLocationUtilities.m:29 This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization:callback and checkingauthorizationStatusfirst.
The Xcode Issue Navigation will be attached here:
Screenshot 2023-01-19 at 12 56 00 PM

Verbose Logs

No response

Additional Information

No response

@NikolasManiatis NikolasManiatis changed the title [Bug]: [Bug]: UI unresponsiveness if invoked on the main thread Jan 19, 2023
@jerielng
Copy link
Collaborator

jerielng commented Jan 20, 2023

Hi @NikolasManiatis, thanks for submitting this - we're looking into this and will get back to you with a resolution when we have all the details. Just to confirm, this is occurring upon initializing your Appboy session, correct?

Furthermore, if you are able to upgrade, our new Swift SDK has a dedicated library for location features and would have more robust handling in line with your request.

@NikolasManiatis
Copy link
Author

Hi @jerielng,
Yes its during the initialisation, it was introduced with iOS 16 SDK / Xcode 14. Apple seems to changed the way developers ask for the CLLocationManager.CLAuthorizationStatus but I have't looked into it deeply.

I will definitely check the Swift SDK and let you know!

@jerielng
Copy link
Collaborator

Hi @NikolasManiatis, we have just released version 4.5.3. of AppboyKit, which should resolve the warnings you're seeing in this instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants