Mastersam07 / Mastersam07/hubspot

iOS conflict with other plugins Unsupported Swift architecture

Open
#2 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hi,

I was able to run your plugin on Android, but I have issues on iOS. Example works fine, but when I've added it to my project, I got errors with Swift architecture. I tried to solve this with AI, Google, etc for a few days now.

User-Defined Issue (Xcode): Unsupported Swift architecture
/Users/marcinpelka/Library/Developer/Xcode/DerivedData/Runner-ffgommgupknvaygfmovucgomxzld/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator/path_provider_foundation-Swift.h:324:1

User-Defined Issue (Xcode): Unsupported Swift architecture
/Users/marcinpelka/Library/Developer/Xcode/DerivedData/Runner-ffgommgupknvaygfmovucgomxzld/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator/hubspot-Swift.h:326:1

User-Defined Issue (Xcode): Unsupported Swift architecture
/Users/marcinpelka/Library/Developer/Xcode/DerivedData/Runner-ffgommgupknvaygfmovucgomxzld/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator/connectivity_plus-Swift.h:337:1

User-Defined Issue (Xcode): Unsupported Swift architecture
/Users/marcinpelka/Library/Developer/Xcode/DerivedData/Runner-ffgommgupknvaygfmovucgomxzld/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator/sqlite3_flutter_libs-Swift.h:324:1

User-Defined Issue (Xcode): Unsupported Swift architecture
/Users/marcinpelka/Library/Developer/Xcode/DerivedData/Runner-ffgommgupknvaygfmovucgomxzld/Build/Intermediates.noindex/GeneratedModuleMaps-iphonesimulator/shared_preferences_foundation-Swift.h:330:1

My podfile:

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

# 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!

  pod 'PhoneNumberKit', '~> 3.7.11'
  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)

    target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',
        'PERMISSION_BLUETOOTH=1',
      ]

      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
      config.build_settings['SWIFT_VERSION'] = '5.0'
      config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone' if config.name == 'Debug'

    end
  end
end

Could you help me with this one?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Podfile's post_install settings and reproduce the iOS build using the listed plugins. Inspect the generated Swift headers named in the Xcode errors and compare the combined plugin configuration. Done means the project builds for the iOS simulator without the Unsupported Swift architecture errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.