purchases-flutter icon indicating copy to clipboard operation
purchases-flutter copied to clipboard

Swift Compiler Error (Xcode): '@objc' property in extension of subclass

Open spn107 opened this issue 1 year ago • 8 comments

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

  • [ ] Output of flutter doctor [✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-BD) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.2) [✓] VS Code (version 1.87.2) [✓] Connected device (3 available) [✓] Network resources

  • [ ] Version of purchases-flutter -> purchases_flutter: ^6.29.1

  • [ ] Testing device version -> iOS 15.5

Describe the bug

Failed to build iOS app

Swift Compiler Error (Xcode): '@objc' property in extension of subclass of 'Offering' requires iOS 13.0.0 /Users/noob/Documents/Spondonit_office/lms_flutter_app/lms_flutter_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/Offering+HybridAdditions.swift:13:14

Swift Compiler Error (Xcode): '@objc' property in extension of subclass of 'PromotionalOffer' requires iOS 13.0.0 /Users/noob/Documents/Spondonit_office/lms_flutter_app/lms_flutter_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/PromotionalOffer+HybridAdditions.swift:13:8

Swift Compiler Error (Xcode): '@objc' static method in extension of subclass of 'Purchases' requires iOS 13.0.0 /Users/noob/Documents/Spondonit_office/lms_flutter_app/lms_flutter_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/Purchases+HybridAdditions.swift:15:16

Swift Compiler Error (Xcode): '@objc' static method in extension of subclass of 'Purchases' requires iOS 13.0.0 /Users/noob/Documents/Spondonit_office/lms_flutter_app/lms_flutter_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/Purchases+HybridAdditions.swift:73:16

Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code

spn107 avatar May 22 '24 08:05 spn107

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar May 22 '24 08:05 RCGitBot

Hi @spn107 what is your iOS deployment target? Open the Xcode project in the ios folder, click on your target, Build, iOS Deployment Target. You can follow this guide as a reference: https://www.avanderlee.com/workflow/minimum-ios-version/

mshmoustafa avatar May 24 '24 16:05 mshmoustafa

Hello

Hi @spn107 what is your iOS deployment target? Open the Xcode project in the ios folder, click on your target, Build, iOS Deployment Target. You can follow this guide as a reference: https://www.avanderlee.com/workflow/minimum-ios-version/

I am using minimum deployment ios 13

Screenshot 2024-05-29 at 1 56 57 PM

spn107 avatar May 29 '24 07:05 spn107

I am also facing this issue

almzayyen avatar Jun 14 '24 23:06 almzayyen

Hello,

Apologies for the delay, this issue got lost in our ticket tracking system. I'll make sure to watch this issue so that it doesn't go unattended for too long again.

Are you building from Xcode or using flutter build ios? Does building from Xcode work? You might have some mismatch between the podfile and the pubspec but building from Xcode should bypass all of that.

mshmoustafa avatar Jul 02 '24 03:07 mshmoustafa

It not work not from xcode neither from flutter build ios. Ios build version 13 , purchases_flutter 6.29.4 - 6.30.2 same problem with latest flutter + latest xcode

dirol90 avatar Jul 27 '24 10:07 dirol90

Снимок экрана 2024-07-27 в 13 18 50

dirol90 avatar Jul 27 '24 10:07 dirol90

updating to purchases_flutter: ^8.1.6 has resolved this issue for me

Alisa-Mak avatar Oct 30 '24 17:10 Alisa-Mak