Skip to content
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

Error adaptyUI after update adapty_flutter 3.2.2 -> 3.2.4 #136

Closed
Silverviql opened this issue Dec 16, 2024 · 7 comments
Closed

Error adaptyUI after update adapty_flutter 3.2.2 -> 3.2.4 #136

Silverviql opened this issue Dec 16, 2024 · 7 comments

Comments

@Silverviql
Copy link

Silverviql commented Dec 16, 2024

After update package return this error

/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Elements/AdaptyUIElementView.swift:98:13 Call to main actor-isolated initializer 'init(_:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context

/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Templates/AdaptyUIFlatContainerView.swift:30:17 Call to main actor-isolated initializer 'init(:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context
/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Templates/AdaptyUIFlatContainerView.swift:34:13 Call to main actor-isolated initializer 'init(
:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context

  • Adapty (3.2.2)
  • adapty_flutter (3.2.4):
    • Adapty (= 3.2.2)
    • AdaptyPlugin (= 3.2.2)
    • AdaptyUI (= 3.2.2)
    • Flutter
  • AdaptyPlugin (3.2.2):
    • Adapty (= 3.2.2)
    • AdaptyUI (= 3.2.2)
  • AdaptyUI (3.2.2):
    • Adapty (= 3.2.2)

pod --version
1.16.2
ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]

@x401om
Copy link
Collaborator

x401om commented Dec 16, 2024

Hi @Silverviql, please provide your flutter doctor output and the Podfile

@Silverviql
Copy link
Author

Silverviql commented Dec 16, 2024

@x401om
programming@MacBook-Pro ios % fvm flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.5, on macOS 14.1 23B2073 darwin-arm64, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] Connected device (4 available)
! Error: Browsing on the local area network for iPhone 12. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for Emil’s Apple Watch. Ensure the device is unlocked and discoverable via Bluetooth. (code -27)
[✓] Network resources

• No issues found!
programming@MacBook-Pro ios %

# Uncomment this line to define a global platform for your project
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

@x401om
Copy link
Collaborator

x401om commented Dec 16, 2024

@Silverviql do you have the same error while building our Example app?

@Silverviql
Copy link
Author

@x401om
yes, only I had to edit the Podfile for the pod install to happen

me change platform :ios, '15.0' and target 'Runner' do
use_frameworks! # if needed for dynamic frameworks
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE))

end

this is what android studio returns

Swift Compiler Error (Xcode): Call to main actor-isolated initializer 'init(_:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context
/Users/programming/localhost/package_example/AdaptySDK-Flutter/example/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Elements/AdaptyUIElementView.swift:97:12

Swift Compiler Error (Xcode): Call to main actor-isolated initializer 'init(_:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context
/Users/programming/localhost/package_example/AdaptySDK-Flutter/example/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Templates/AdaptyUIFlatContainerView.swift:29:16

Swift Compiler Error (Xcode): Call to main actor-isolated initializer 'init(_:additionalPadding:drawDecoratorBackground:)' in a synchronous nonisolated context
/Users/programming/localhost/package_example/AdaptySDK-Flutter/example/ios/Pods/AdaptyUI/AdaptyUI/Rendering/Templates/AdaptyUIFlatContainerView.swift:33:12

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

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.

@Silverviql
Copy link
Author

Silverviql commented Dec 16, 2024

@x401om I ran your example through xcode, this is what it returns essentially the same as in debug

image

@x401om
Copy link
Collaborator

x401om commented Dec 18, 2024

Hi @Silverviql, please try 3.2.5

@Silverviql
Copy link
Author

@x401om Hi, I have already rolled back to version 3.2.2 in my project, so I checked it in the Example app, it started for me and there is no more error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants