-
Notifications
You must be signed in to change notification settings - Fork 169
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
iOS crash #108
Comments
@CarlosMedina10 do you mind sharing some logs with the crash? Thanks! |
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... I get this from VS, where I can find more info about this problem? The failure is 100% sure when I add this plugin because without it everything works correctly. Thanks you. |
I'll get there. (iOS 14 Build)
|
could you try heading over to the directory where your iOS project is located, and running |
I don't know if it was due to that, but I was able to open it again now. Thanks. |
I run cd iOS in VS terminal. But it doesn't work :( |
@CarlosMedina10 could you share the output? Without it, it's not going to be possible for us to determine the cause of the issues you're seeing |
I'm trying, but I don't know how i can get the output from Visual studio. Im from android, so sorry if I ask a lot. |
I also had this problem when I called .identify(...) too early (the initialization was not ready yet). I solved this problem by using a temporary buffer which calls identify(...) as soon as the initialization is finished to prevent the race condition. |
Ld /Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/EntrenaAPP.app/EntrenaAPP normal (in target 'Runner' from project 'Runner') ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' This is one of the errors that I get from Xcode. I try with Xcode 11.7 and Xcode 12 and not work :( Any idea? thanks in advance. |
This part is happening correctly :) Sorry, yesterday I think that I don't understand 100% your question, im trying to get more logs for showing you. Thanks! |
@CarlosMedina10 thanks for the update. From the Xcode error message it looks like it's just not linking Swift files correctly. |
Hi, actually i could install version 1.2.1 and it apparently works well, so its version 1.3.1 problem. I hope this info will be useful for your team. Thanks you! If its help for you I will try to take your advice :) |
@CarlosMedina10 version 1.3.1 adds Swift files, which is why you are seeing linking errors on that one and not 1.2.1. I'd recommend adding an empty swift file and using 1.3.1. It's usually a good idea to stick with the latest stable version available. |
Okey, i will try later , thank you very much. Can you correct it in the next update? |
I'm not sure it's something that can be corrected from the plugin side, to be honest - it seems to just be a factor of the plugin containing Swift files and Flutter not adding Swift support to the project. For new projects, Flutter does add Swift support by default (the generated app includes an I just tried this on flutter 1.20.2 by creating a new app and it works correctly. |
+1 from me too. Just upgraded to XCode 12/iOS14/Flutter 1.22, upgraded purchases_flutter to 1.3.1 and it bombs out, killing the app completely without warning. Not entirely sure why, as Flutter has been very robust for me up to now, but in this case it's just dying without any logs or warning whatsoever. The only way I know it's caused by purchases_flutter is by going through the whole app commenting out code. I'll try to add more info as I get it, but this is the code which I commented out and stopped the crashing:
|
I've just now noticed that you've gone from 1.2.1 to 1.3.1 and not only deprecated the Purchases.addAttributionData method (as used in the example for the previous version on the pub.dev purchases_flutter page - see https://pub.dev/packages/purchases_flutter/versions/1.2.1/example), but made it unusable without any warning! I've commented that line out that calls addAttributionData and it works again. I don't normally get annoyed over code that's there to help me out and provided free-of-charge to me, but you are a service and didn't give any warning or information about this! It's an incompatible API to the previous version so you should have bumped it up a whole major version number according to semantic versioning. Then it wouldn't have updated itself with a flutter pub update. If you couldn't do that, you could have put a big red warning on your flutter readme. Please do that for so everyone else can avoid wasting a day's work on this too. |
Hi @richardbushnell I apologize for the inconvenience. Just want to add a few clarifications: we did not remove the As a workaround, if you don't send values that are I understand your frustration and how you could see this as a weird and overly-aggressive deprecation, but I hope you understand that that's not really what happened - we didn't remove or intend to make We do have to update our docs in the meantime. Let me know if you have any questions and again, sorry for the trouble. |
for me also ios crashes, guys please fix it. IT NOT WORKS, FETCHING OF PURCHASES PRODUCTS FAILS, BUSINESS STUCKED ON PURCHASES |
Why does it crash? Any error logs? Did you try deleting |
Sorry, after i deleted line //Purchases.addAttributionData({}, PurchasesAttributionNetwork.facebook); - all started to work. |
Going to close this out since there isn't enough context to identify the original issue back to a reproducible problem with the Flutter SDK. |
Bit more context of my situation: I updated from version 1.2 to 1.4. Managed to fix this error by running the following command in the ios directory in my Flutter project: |
Hello, i had an issue with this plugin. My App is working fine on android (it's published) and in app purchases work well.
Actually I'm trying to make it work on iOS, it work well but when I try to add this plugin, the app crashes after it init.
Any reason for that?
Thanks in advance.
The text was updated successfully, but these errors were encountered: