-
Notifications
You must be signed in to change notification settings - Fork 262
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
Not working on iOS 13 Beta #504
Comments
After turning on verbose logging for the OneSignal SDK, I've noticed the following difference: On iOS 12.2, the following is sent in OSRequestRegisterUser:
while on iOS 13 the following is sent:
|
I'm also having the same issue. |
Thank you for bringing this up. Because iOS 13 is still in Beta, this issue may be resolved before the release this fall. However, we will keep a close eye on this leading up to the release. Thanks again |
According to https://forums.developer.apple.com/thread/117545, the issue might be caused by incorrectly using the [NSData description] method to convert the identifier to a String, and the correct way would be to format the bytes into the desired form, as explained in the example by vasyl.liutikov (or at the link he provides to facebook sdk: https://github.com/facebook/facebook-objc-sdk/blob/37bb3901a65d9f229171c25ed8db0297dc171f76/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKInternalUtility.m#L521 ) |
@henning-cg , |
Is that possible to show errors more obviously? For me, it took me for a long time until I found the error message on the console. Why not just crashing the app at least in Debug mode? |
line 2091 of OneSignal.m probably here. |
Same here in iOS 13 Beta 3. In Since we, developers, are already testing for iOS 13 (that's why beta program is for), I think this needs to be addressed with high priority. |
We're running into this as well and would appreciate a quick turnaround. |
Yup, @owenzhao is right. It's that line. I've made a temporary fix: THIS IS A TEMPORARY FIX, USE ONLY UNTIL OFFICIAL LIBRARY IS UPDATED FOR iOS 13ANY CHANGES DONE MAY BE PURGED WHEN PACKAGES FROM COCOAPODS/CARTHAGE/NPM/YARN ETC. ARE UPDATED I've taken this answer and pasted somewhere at top into
Then, inside OneSignal class, change
If you're just referencing OneSignal as a subproject/side project you don't need to do anything, you're ready. If you are statically linking or using a package manager (e.g. CocoaPods, Carthage, or yarn/npm if on React Native like me): Archive and export the library, find I haven't tested this in pre-iOS 13 as I only have an iOS 13 device, but it should work. It works on iPhone X, iOS 13 Developer Beta 3 in my React Native app as of speaking (though it should work on regular iOS apps since I haven't touched React Native or React Native bridge project and I've only touched the native iOS project). Again, use this for development until the library is officially updated, then go back to using the original library. |
@canpoyrazoglu do you know how to improve this for cocoapods? |
@janczakb I haven't spent time for forking the repo and changing the dependencies as this is a temporary solution just for developer testing, so just open the project from the pods, change the code, build it, and it should work until you regenerate/reinstall the pods for whatever reason. To be sure you can check the last modified date of the pod library/framework for the OneSignal project. |
Just wanted to say that I am currently testing on beta 4 and the same issue exists. |
I have the same issue |
I'm having the same issue using the iOS 13 Beta 4. |
I’ll create a PR for this tomorrow if no one beats me to the punch ;) |
@Nightsd01 , |
When will this be fixed for iOS 13 users? |
Wanted to jump back in here and say that I am using my app on iOS 13 and it seems to work fine-ish? There are still errors and such but I do register for notifications and can receive them which I did not expect. I'm currently on beta 5 |
Created a PR to fix this (#509) |
this is still not working on beta 5 |
As the PR has not been accepted. We need the new release on cocoapods. |
@jkasten2 When will the next build be released? |
We just released 2.10.1 with this fix. |
@jkasten2 Did the fix make it into the Unity sdk as well? I'm still seeing the error with ios 13.1 beta 2 and xcode beta 7. |
Ok thanks 👍 |
I am still getting this error when using OneSignal iOS SDK version 2.11.1 on iOS 13.1. This may be caused by the Xcode 11 compiler. Upon calling this code below: I am also getting this exact same error when I run it on iOS 13.1.
Am I missing something? Is there anything that I should update? At this time of writing OneSignal iOS SDK version 2.11.1 is the latest release. |
The latest SDK is 2.11.1. I am using it against iOS 13.1 with Xcode 11.1 GM. No issue so far. Did you try to remove Xcode derived folder and build again first?
Zhao Xin
… 在 2019年9月27日,下午2:51,Trevin Wisaksana ***@***.***> 写道:
I am still getting this error when using OneSignal iOS SDK version 2.11.0 on iOS 13.1. This maybe caused because of the Xcode 11 compiler.
Upon calling this code below:
OneSignal.getPermissionSubscriptionState().subscriptionStatus.userId It is always giving me an empty string even though I have given permission for push notification.
I am also getting this exact same error when I run it on iOS 13.1.
ERROR: Encountered error during push registration with OneSignal: Error Domain=OneSignalError Code=400 "(null)" UserInfo={returned={ errors = ( "[\"Identifier invalid format.\"]" ); success = 0; }}
Am I missing something? Is there anything that I should update? At this time of writing OneSignal iOS SDK version 2.11.0 is the latest release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I tried it just now and it's still not working. The biggest different between what we did is I am using Xcode 11 and you're using Xcode 11.1 GM. Theoretically, this shouldn't affect it. But I guess this should be put to the test. |
I don't think so. I had been using Xcode 11 betas, GM and GM 2 for quite a while. As Xcode 11.1 GM came suddenly without any prior betas two days ago. I have not encounter this issue ever since " 2.10.1" released on Aug 2. |
I see. But what other issues could trigger this error message?
I ran the same code on iOS 12 and it works normally. But for iPad OS and iOS 13 it suddenly stops working. |
I’m always seeing this error in Xcode but in production people are registered properly. I’m pretty sure you can disregard it. It could be because of a dev/production certificates mismatch. If possible, it’ would be worth testing by releasing your app, watching your one signal dashboard and checking new people are being added. The dashboard displays the app BUILD number (not version number for some reason!) so you can set that to 99 or whatever in Xcode and check your new app is working ok.
|
Thanks for bringing this up. After we tested it on Test Flight, it works! I don't know if it's just us but testing it by installing the app directly from Xcode doesn't work for devices using iOS 13. But anyways, it solved our problem 😃 |
Ha, amazing :)
|
Yup I ran into this issue as well. I don't see my device show up on the OneSignal dashboard. |
I was facing this same problem and was a iOS13 issue. (On iOS12 there is no problem) The version of the One signal iOS SDK on Xcode must appear '2.11.0' |
For React Native 0.61.1
|
After update cordova plugin version, should run |
Please replace your one signal pod version from pod 'OneSignal', '>= 2.6.2', '< 3.0' to pod 'OneSignal', '>= 2.11.2', '< 3.0' |
@NupendraVerma |
This is showing up in my debugger log,
problem: I was version locked to 2.5.1. |
pod 'OneSignal', '>= 2.11.2', '< 3.0' This is give me error like this [!] Invalid |
I get this error in log, using onesignal 2.9.0,
My podfile is this
|
@priyankastridhyatech Maybe you're missing an 'end' statement in your podfile? |
Okay so I found the issue for me, so in my app initialization i used:
But the issue was actually a null string, meaning that the app was not successfully importing the variable "environment.ONESIGNAL_APP_ID". I fixed that by simply hardcoding the App ID in the actual "OneSignalPush.m" file... It's not good practice but it stops the app from crashing. |
I'm stuck on this, can you show me where to hardcode it? @AhrenFullStop Edit: I finally got it work, using version 2.10.1 of the plugin, which fixes the identifier bug and still works with non-wkwebview (removed in 2.10.2). |
pod 'OneSignal', '>= 2.11.2', '< 3.0' Works for me! |
Description:
While trying our app on iOS 13 Beta 2, I noticed that OneSignal does not work. We are initializing the SDK in "didFinishLaunchingWithOptions", and after that the following log gets printed:
Environment
Steps to Reproduce Issue:
Anything else:
The app does not crash, it simply does not register with OneSignal. Above log messages get repeated after some time, probably the SDK re-trying to register
The text was updated successfully, but these errors were encountered: