Every version I've submitted via App Store Connect passes the verification process and the TestFlight version, as well as on Xcode, work fine. However, as soon as I download the app from the app store, it crashes after pressing a specific button.
I don't understand the Crash Log. The only thing I've added to it, is a trial version, where I write a date to the Key Chain and check if it's been 7 days since the first download or not. The in-App subscription that get's checked during that button press shouldn't be causing the issue, because it worked before. I did end up creating a new in-app subscription to be sure.
So basically I check if the app's been installed before and then enable/disable features and pop the subscription screen if the trial has ended.
Instead, it just crashes on that screen.
Here is what I do:
func trialCheck() { // creating a keychain let keychain = Keychain() let timestamp = Date() //Adding to keychain keychain["my_keychain_name"] = "123456" // Checking Creation Date let creationDate = keychain[attributes: "my_keychain_name"]?.creationDate //Format differece between creation and timestamp to minutes let diffComponents = Calendar.current.dateComponents([.second], from: creationDate!, to: timestamp) //let hours = diffComponents.hour let secondsAfterFirstInstall = diffComponents.second! //let test_seconds = 700000 // What to do if over 7 days if secondsAfterFirstInstall > 604800 { trialLabel.text = "Your Trial Has Ended" } else { // Format text to show how many days + hours trial is left let interval = 604800 - secondsAfterFirstInstall let formatter = DateComponentsFormatter() formatter.allowedUnits = [.day, .hour] formatter.unitsStyle = .full let formattedString = formatter.string(from: TimeInterval(interval))! //print(formattedString) trialLabel.text = "Free Trial: " + formattedString // Actions to enable features while in trial // For Preview Recording listenButton.isEnabled = true micButton.isEnabled = false //unlockButton.isHidden = true pairViaQRCodeButton.isEnabled = true } }
Here's the Crash log I get, when using the app (only App Store version): Please help me out, I've resubmitted over 10 times
{"app_name":"Babyphone","timestamp":"2021-01-18 17:08:25.00 +0100","app_version":"1.82","slice_uuid":"abd9ae9f-888c-3559-b877-8e2dac8c94d4","adam_id":1534587849,"build_version":"3","platform":2,"bundleID":"com.meier.BabyphoneApp","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 14.3 (18C66)","incident_id":"CE831135-D604-4C34-80FD-D1E2F9D8E452","name":"Babyphone"} Incident Identifier: CE831135-D604-4C34-80FD-D1E2F9D8E452 CrashReporter Key: a27fd0ee501979c2ec25fb64701f6e8d5dd60e1f Hardware Model: iPhone13,2 Process: Babyphone [979] Path: /private/var/containers/Bundle/Application/0B84FD57-3FB5-43B0-8288-DF28650CB872/Babyphone.app/Babyphone Identifier: com.meier.BabyphoneApp Version: 3 (1.82) AppStoreTools: 12C29 AppVariant: 1:iPhone13,2:14 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.meier.BabyphoneApp [597] Date/Time: 2021-01-18 17:08:25.3941 +0100 Launch Time: 2021-01-18 17:07:43.9274 +0100 OS Version: iPhone OS 14.3 (18C66) Release Type: User Baseband Version: 1.31.03-5 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 7 Application Specific Information: abort() called Last Exception Backtrace: (0x1a0ab186c 0x1b5a20c50 0x1b5cc8208 0x1b5cc84e8 0x1a38c0df0 0x1a38c0b98 0x1a38bfd34 0x1a38c1344 0x1a38b4b64 0x1a38b51ec 0x1b5ce3304 0x1018997ac 0x101898a64 0x100eecc14 0x100eef194 0x10189c538 0x101899170 0x1a10cef18 0x1a10e1548 0x1a06a424c 0x1a06a5db0 0x1a06ad10c 0x1a06adc90 0x1a06b7d78 0x1ec283804 0x1ec28a75c) Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x00000001ce8042d0 0x1ce800000 + 17104 1 libsystem_kernel.dylib 0x00000001ce803660 0x1ce800000 + 13920 2 CoreFoundation 0x00000001a0a2cc30 0x1a098c000 + 658480 3 CoreFoundation 0x00000001a0a26c14 0x1a098c000 + 633876 4 CoreFoundation 0x00000001a0a2621c 0x1a098c000 + 631324 5 GraphicsServices 0x00000001b852a784 0x1b8527000 + 14212 6 UIKitCore 0x00000001a3464fe0 0x1a289c000 + 12357600 7 UIKitCore 0x00000001a346a854 0x1a289c000 + 12380244 8 Babyphone 0x0000000100ee1dc8 0x100ed8000 + 40392 9 libdyld.dylib 0x00000001a06e66b0 0x1a06e5000 + 5808 Thread 1 name: Dispatch queue: com.apple.root.utility-qos Thread 1: 0 libswiftCore.dylib 0x00000001a4a39b8c 0x1a469f000 + 3779468 1 libswiftCore.dylib 0x00000001a4a39cb4 0x1a469f000 + 3779764 2 libswiftCore.dylib 0x00000001a4a399e0 0x1a469f000 + 3779040 3 AttributeGraph 0x00000001c9dad088 0x1c9d9b000 + 73864 4 AttributeGraph 0x00000001c9d9eb40 0x1c9d9b000 + 15168 5 AttributeGraph 0x00000001c9d9e2ec 0x1c9d9b000 + 13036 6 AttributeGraph 0x00000001c9dae18c 0x1c9d9b000 + 78220 7 AttributeGraph 0x00000001c9daf558 0x1c9d9b000 + 83288 8 libdispatch.dylib 0x00000001a06a5db0 0x1a06a2000 + 15792 9 libdispatch.dylib 0x00000001a06b6a68 0x1a06a2000 + 84584 10 libdispatch.dylib 0x00000001a06b7120 0x1a06a2000 + 86304 11 libsystem_pthread.dylib 0x00000001ec2837c8 0x1ec280000 + 14280 12 libsystem_pthread.dylib 0x00000001ec28a75c 0x1ec280000 + 42844 Thread 2: 0 libsystem_pthread.dylib 0x00000001ec28a754 0x1ec280000 + 42836 Thread 3: 0 libsystem_pthread.dylib 0x00000001ec28a754 0x1ec280000 + 42836 Thread 4 name: com.apple.uikit.eventfetch-thread Thread 4: 0 libsystem_kernel.dylib 0x00000001ce8042d0 0x1ce800000 + 17104 1 libsystem_kernel.dylib 0x00000001ce803660 0x1ce800000 + 13920 2 CoreFoundation 0x00000001a0a2cc30 0x1a098c000 + 658480 3 CoreFoundation 0x00000001a0a26c14 0x1a098c000 + 633876 4 CoreFoundation 0x00000001a0a2621c 0x1a098c000 + 631324 5 Foundation 0x00000001a1cd5df0 0x1a1ccd000 + 36336 6 Foundation 0x00000001a1cd5cbc 0x1a1ccd000 + 36028 7 UIKitCore 0x00000001a3518d48 0x1a289c000 + 13094216 8 Foundation 0x00000001a1e47a34 0x1a1ccd000 + 1550900 9 libsystem_pthread.dylib 0x00000001ec281b40 0x1ec280000 + 6976 10 libsystem_pthread.dylib 0x00000001ec28a768 0x1ec280000 + 42856 Thread 5: 0 libsystem_pthread.dylib 0x00000001ec28a754 0x1ec280000 + 42836 Thread 6 name: com.apple.NSURLConnectionLoader Thread 6: 0 libsystem_kernel.dylib 0x00000001ce8042d0 0x1ce800000 + 17104 1 libsystem_kernel.dylib 0x00000001ce803660 0x1ce800000 + 13920 2 CoreFoundation 0x00000001a0a2cc30 0x1a098c000 + 658480 3 CoreFoundation 0x00000001a0a26c14 0x1a098c000 + 633876 4 CoreFoundation 0x00000001a0a2621c 0x1a098c000 + 631324 5 CFNetwork 0x00000001a12fc2c0 0x1a10b0000 + 2409152 6 Foundation 0x00000001a1e47a34 0x1a1ccd000 + 1550900 7 libsystem_pthread.dylib 0x00000001ec281b40 0x1ec280000 + 6976 8 libsystem_pthread.dylib 0x00000001ec28a768 0x1ec280000 + 42856 Thread 7 name: Dispatch queue: com.apple.NSURLSession-delegate Thread 7 Crashed: 0 libsystem_kernel.dylib 0x00000001ce828414 0x1ce800000 + 164884 1 libsystem_pthread.dylib 0x00000001ec282b40 0x1ec280000 + 11072 2 libsystem_c.dylib 0x00000001a9e4eb74 0x1a9dd8000 + 486260 3 libc++abi.dylib 0x00000001b5b26cf8 0x1b5b13000 + 81144 4 libc++abi.dylib 0x00000001b5b17e4c 0x1b5b13000 + 20044 5 libobjc.A.dylib 0x00000001b5a20f64 0x1b5a1a000 + 28516 6 libc++abi.dylib 0x00000001b5b260e0 0x1b5b13000 + 78048 7 libc++abi.dylib 0x00000001b5b2606c 0x1b5b13000 + 77932 8 libdispatch.dylib 0x00000001a06a5dc4 0x1a06a2000 + 15812 9 libdispatch.dylib 0x00000001a06ad10c 0x1a06a2000 + 45324 10 libdispatch.dylib 0x00000001a06adc90 0x1a06a2000 + 48272 11 libdispatch.dylib 0x00000001a06b7d78 0x1a06a2000 + 89464 12 libsystem_pthread.dylib 0x00000001ec283804 0x1ec280000 + 14340 13 libsystem_pthread.dylib 0x00000001ec28a75c 0x1ec280000 + 42844
https://stackoverflow.com/questions/65778699/why-does-my-ios-app-only-crashes-in-app-store January 19, 2021 at 12:47AM
没有评论:
发表评论