OneSignal-iOS-SDK icon indicating copy to clipboard operation
OneSignal-iOS-SDK copied to clipboard

[question]: After successfully upgrading to 5.0.1 - it is not working in Simulator anymore?

Open sabiland opened this issue 2 years ago • 6 comments

How can we help?

I successfully upgraded to 5.0.1 version. Tested on physical device - everything OK. But version 3 worked in simulator, 5.0.1 seems not to be working?

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

sabiland avatar Aug 11 '23 07:08 sabiland

Thank you for reaching out can you clarify what is not working?

emawby avatar Aug 11 '23 14:08 emawby

Version 3 worked in simulator:

  1. There was shown dialog for accepting APN
  2. There was dialog about New Features
  3. etc.

Now it seems nothing of above works in Simulator. I have latest Prod Xcode 14.3.1.

sabiland avatar Aug 12 '23 12:08 sabiland

@sabiland It sounds like you are using In App Messages, but they are not displaying? Can you describe how to are integrating OneSignal (Swift Package Manager or Cocoapods). If you are using Swift PM make sure you have added the new OneSignalInAppMessages product to your app and that you have also added WebKit

emawby avatar Aug 14 '23 16:08 emawby

  1. Yes I am using In App Messages, they are not showing in Simulator.
  2. They are showing correctly on physical device. I have integrated OneSignal via Swift Package Manager with selecting all options.

If I run app in simulator I always get at the beginning, but I am not sure this is related.

2023-08-16 11:21:34.750797+0200 Tizima[59174:1211992] ERROR: OSUserExecutor create user request failed with error: Optional(Error Domain=OneSignalError Code=400 "(null)" UserInfo={returned={
    errors =     (
                {
            title = "The provided language value is not a supported ISO 639-1 value";
        }
    );
    httpStatusCode = 400;
}})

sabiland avatar Aug 16 '23 09:08 sabiland

@sabiland Could you turn on verbose logging. Not creating a user is definitely the issue here. What language code could the SDK be trying to send?

emawby avatar Sep 06 '23 22:09 emawby

@emawby I noticed there are no problems on iOS 17 simulator, only on iOS 16.4 simulator. On iOS 17 simulator everything works ok.

sabiland avatar Sep 09 '23 08:09 sabiland

@sabiland Perhaps the two simulators are using different language codes. Regardless, since then, wrong language codes will not block user creation anymore, so I will close out this issue.

Feel free to follow up with any further comments or questions if you have them.

nan-li avatar May 15 '24 19:05 nan-li