Closed CarlosMedina10 closed 4 years ago
@CarlosMedina10 do you mind sharing some logs with the crash? Thanks!
Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running pod install... Xcode build done. 94,8s Failed to build iOS app Exited (sigterm)
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)
Xcode build done. 57,6s
Connecting to VM Service at ws://localhost:60559/ws
Lost connection to device.
Exited (sigterm)
could you try heading over to the directory where your iOS project is located, and running pod install --repo-update
to see if that part is happening successfully?
could you try heading over to the directory where your iOS project is located, and running
pod install --repo-update
to see if that part is happening successfully?
I don't know if it was due to that, but I was able to open it again now. Thanks.
could you try heading over to the directory where your iOS project is located, and running
pod install --repo-update
to see if that part is happening successfully?
I run cd iOS in VS terminal. running pod install --repo-update
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
@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.
@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') cd /Users/carlos10medina/Documents/EntrenaApp/ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios9.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/AppAuth -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FMDB -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseAuth -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseCore -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseCoreDiagnostics -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseDatabase -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseInstallations -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/FirebaseStorage -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/GTMAppAuth -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/GTMSessionFetcher -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/GoogleDataTransport -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/GoogleUtilities -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/PromisesObjC -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/Purchases -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/PurchasesCoreSwift -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/PurchasesHybridCommon -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/apple_sign_in -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/device_info -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/firebase_admob -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/firebase_auth -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/firebase_core -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/firebase_database -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/firebase_storage -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/flutter_animation_set -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/flutter_keyboard_visibility -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/google_sign_in -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/image_picker -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/leveldb-library -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/nanopb -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/path_provider -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/purchases_flutter -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/shared_preferences -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/social_share -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/sqflite -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/url_launcher -L/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/video_player -L/Users/carlos10medina/Documents/EntrenaApp/ios/Flutter -F/Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/../Flutter -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/FirebaseAnalytics/Frameworks -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework-Current -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/GoogleAppMeasurement/Frameworks -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/GoogleSignIn/Frameworks -F/Users/carlos10medina/Documents/EntrenaApp/ios/Pods/GoogleUserMessagingPlatform/Frameworks/Release -F/Users/carlos10medina/Documents/EntrenaApp/ios/Flutter -filelist /Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Objects-normal/arm64/EntrenaAPP.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Objects-normal/arm64/EntrenaAPP_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lAppAuth -lFMDB -lFirebaseAuth -lFirebaseCore -lFirebaseCoreDiagnostics -lFirebaseDatabase -lFirebaseInstallations -lFirebaseStorage -lGTMAppAuth -lGTMSessionFetcher -lGoogleDataTransport -lGoogleUtilities -lPromisesObjC -lPurchases -lPurchasesCoreSwift -lPurchasesHybridCommon -lapple_sign_in -lc++ -ldevice_info -lfirebase_admob -lfirebase_auth -lfirebase_core -lfirebase_database -lfirebase_storage -lflutter_animation_set -lflutter_keyboard_visibility -lgoogle_sign_in -licucore -limage_picker -lleveldb-library -lnanopb -lpath_provider -lpurchases_flutter -lshared_preferences -lsocial_share -lsqflite -lsqlite3 -lurl_launcher -lvideo_player -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreTelephony -framework CoreText -framework CoreVideo -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework Flutter -framework Foundation -framework GoogleAppMeasurement -framework GoogleMobileAds -framework GoogleSignIn -framework LocalAuthentication -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework UserMessagingPlatform -framework WebKit -weak_framework AdSupport -weak_framework AuthenticationServices -weak_framework JavaScriptCore -weak_framework SafariServices -weak_framework WebKit -framework Flutter -framework StoreKit -lPods-Runner -Xlinker -dependency_info -Xlinker /Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Objects-normal/arm64/EntrenaAPP_dependency_info.dat -o /Users/carlos10medina/Library/Developer/Xcode/DerivedData/Runner-cxvgcbqekbkwkgahnxpmkqjnkbmo/Build/Products/Debug-iphoneos/EntrenaAPP.app/EntrenaAPP
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility51'
ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
Undefined symbols for architecture arm64:
"protocol conformance descriptor for Swift.UInt8 : Swift.FixedWidthInteger in Swift", referenced from:
lazy protocol witness table accessor for type Swift.UInt8 and conformance Swift.UInt8 : Swift.FixedWidthInteger in Swift in libPurchasesCoreSwift.a(UInt8+Extensions.o)
"protocol conformance descriptor for Swift.UInt8 : Swift.UnsignedInteger in Swift", referenced from:
lazy protocol witness table accessor for type Swift.UInt8 and conformance Swift.UInt8 : Swift.UnsignedInteger in Swift in libPurchasesCoreSwift.a(UInt8+Extensions.o)
"method descriptor for Foundation.LocalizedError.failureReason.getter : Swift.String?", referenced from:
l_got.$s10Foundation14LocalizedErrorP13failureReasonSSSgvgTq in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"method descriptor for Foundation.LocalizedError.errorDescription.getter : Swift.String?", referenced from:
l_got.$s10Foundation14LocalizedErrorP16errorDescriptionSSSgvgTq in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"protocol descriptor for Foundation.LocalizedError", referenced from:
l_got.$s10Foundation14LocalizedErrorMp in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"method descriptor for Swift.Error._domain.getter : Swift.String", referenced from:
l_got.$ss5ErrorP7_domainSSvgTq in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Foundation):Foundation.LocalizedError.recoverySuggestion.getter : Swift.String?", referenced from:
protocol witness for Foundation.LocalizedError.recoverySuggestion.getter : Swift.String? in conformance PurchasesCoreSwift.ReceiptReadingError : Foundation.LocalizedError in PurchasesCoreSwift in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Foundation):Foundation.LocalizedError.failureReason.getter : Swift.String?", referenced from:
protocol witness for Foundation.LocalizedError.failureReason.getter : Swift.String? in conformance PurchasesCoreSwift.ReceiptReadingError : Foundation.LocalizedError in PurchasesCoreSwift in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Swift):Swift.Error._userInfo.getter : Swift.AnyObject?", referenced from:
protocol witness for Swift.Error._userInfo.getter : Swift.AnyObject? in conformance PurchasesCoreSwift.ReceiptReadingError : Swift.Error in PurchasesCoreSwift in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Swift):Swift.Error._code.getter : Swift.Int", referenced from:
protocol witness for Swift.Error._code.getter : Swift.Int in conformance PurchasesCoreSwift.ReceiptReadingError : Swift.Error in PurchasesCoreSwift in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Swift):Swift.Error._domain.getter : Swift.String", referenced from:
protocol witness for Swift.Error._domain.getter : Swift.String in conformance PurchasesCoreSwift.ReceiptReadingError : Swift.Error in PurchasesCoreSwift in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"method descriptor for Swift.Error._getEmbeddedNSError() -> Swift.AnyObject?", referenced from:
l_got.$ss5ErrorP19_getEmbeddedNSErroryXlSgyFTq in libPurchasesCoreSwift.a(ReceiptParsingError.o)
"(extension in Foundation):Swift.Set._bridgeToObjectiveC() -> C.NSSet", referenced from:
@nonobjc C.SKProductsRequest.init(productIdentifiers: Swift.Set
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.
could you try heading over to the directory where your iOS project is located, and running
pod install --repo-update
to see if that part is happening successfully?
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. I've seen this happen before, where for some reason Xcode is just not linking the Swift runtime. You can usually solve this by adding one empty Swift file to your project from Xcode. Could you give that a shot?
@CarlosMedina10 thanks for the update. From the Xcode error message it looks like it's just not linking Swift files correctly. I've seen this happen before, where for some reason Xcode is just not linking the Swift runtime. You can usually solve this by adding one empty Swift file to your project from Xcode. Could you give that a shot?
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.
@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 AppDelegate.swift
file, so this wouldn't be a problem.
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:
await Purchases.setDebugLogsEnabled(true);
await Purchases.setup(_publicSdkKey);
Purchases.addAttributionData({}, PurchasesAttributionNetwork.facebook);
purchaserInfo = await Purchases.getPurchaserInfo();
if (entitlements != purchaserInfo.entitlements.active) {
_onPurchaserInfoUpdated(purchaserInfo);
}
offerings = await Purchases.getOfferings();
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 addAttributionData
API or make it incompatible, what you're experiencing is a bug, reported here. The bug has been fixed here: https://github.com/RevenueCat/purchases-ios/pull/359, but we haven't released a flutter update with the fix just yet, although we'll be doing it shortly. The bug happens when you send null
values in keys for addAttributionData
, and it was introduced in 1.3.0.
As a workaround, if you don't send values that are null
to addAttributionData
, things should work as expected.
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 addAttributionData
crash, it was a bug caused by a bad refactor. addAttributionData
will stick around for a while before it gets removed, and when it does, it'll be in a major release and not a patch, as you'd expect.
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
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 pod install --repo-update
?
Sorry, after i deleted line //Purchases.addAttributionData({}, PurchasesAttributionNetwork.facebook); - all started to work. Thank you !
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:
pod update PurchasesHybridCommon
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.