liodali / osm_flutter

OpenStreetMap plugin for flutter
https://pub.dev/packages/flutter_osm_plugin
MIT License
240 stars 98 forks source link

Can't merge user_target_xcconfig for pod targets: ["OSMFlutterFramework", "metamask-ios-sdk"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values. #522

Closed goldenmoon67 closed 7 months ago

goldenmoon67 commented 7 months ago

I have to use flutter osm plugin and metamask-ios-sdk but I can't . How can I fix this? Someone help me please? ` 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)) pod 'PhoneNumberKit/PhoneNumberKitCore', :git => 'https://github.com/marmelroy/PhoneNumberKit', :tag => '3.6.6' pod 'metamask-ios-sdk', :git => 'https://github.com/MetaMask/metamask-ios-sdk' pod 'OSMFlutterFramework' , '0.4.9' end

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

remove min deployment target

  config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'

  if ['OSMFlutterFramework', 'metamask-ios-sdk'].include? target.name
    config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386'
  end

  # code from https://stackoverflow.com/a/59206937/3506115
  config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
  config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
  config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
  config.build_settings['ENABLE_BITCODE'] = 'NO'

  # You can enable the permissions needed here. For example to enable camera
  # permission, just remove the `#` character in front so it looks like this:
  #
  # ## dart: PermissionGroup.camera
  # 'PERMISSION_CAMERA=1'
  #
  #  Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
  config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
    '$(inherited)',

    ## dart: PermissionGroup.calendar
    # 'PERMISSION_EVENTS=1',

    ## dart: PermissionGroup.reminders
    # 'PERMISSION_REMINDERS=1',

    ## dart: PermissionGroup.contacts
    # 'PERMISSION_CONTACTS=1',

    ## dart: PermissionGroup.camera
    # 'PERMISSION_CAMERA=1',

    ## dart: PermissionGroup.microphone
    # 'PERMISSION_MICROPHONE=1',

    ## dart: PermissionGroup.speech
    # 'PERMISSION_SPEECH_RECOGNIZER=1',

    ## dart: PermissionGroup.photos
    # 'PERMISSION_PHOTOS=1',

    ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
    # 'PERMISSION_LOCATION=1',

    ## dart: PermissionGroup.notification
    'PERMISSION_NOTIFICATIONS=1',

    ## dart: PermissionGroup.mediaLibrary
    # 'PERMISSION_MEDIA_LIBRARY=1',

    ## dart: PermissionGroup.sensors
    # 'PERMISSION_SENSORS=1',

    ## dart: PermissionGroup.bluetooth
    # 'PERMISSION_BLUETOOTH=1',

    ## dart: PermissionGroup.appTrackingTransparency
    # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

    ## dart: PermissionGroup.criticalAlerts
    # 'PERMISSION_CRITICAL_ALERTS=1'
  ]

end

end end `

liodali commented 7 months ago

i will check the issue and i will update ios sdk and let you know

goldenmoon67 commented 7 months ago

thank you @liodali . I am here

goldenmoon67 commented 7 months ago

i will check the issue and i will update ios sdk and let you know

Hi again. Is there anything new? I am stuck on there. I can not solve it. Need your response

liodali commented 7 months ago

try in exclude archs set this : 'i386' to 'i386 arm64'

goldenmoon67 commented 7 months ago

try in exclude archs set this : 'i386' to 'i386 arm64'

I already did all of them. Unfortunately there is no solution . https://stackoverflow.com/questions/63607158/xcode-building-for-ios-simulator-but-linking-in-an-object-file-built-for-ios-f?rq=2 I tried all of them

liodali commented 7 months ago

you're using arm mac machine m1 or m2 or intel mac ?

goldenmoon67 commented 7 months ago

you're using arm mac machine m1 or m2 or intel mac ?

İntel mac

liodali commented 7 months ago

try to do pod update in ios folder of you app and see if the OSMFlutterFramework I removed EXCLUDED_ARCHS[sdk=iphonesimulator*] from our sdk

goldenmoon67 commented 7 months ago

try to do pod update in ios folder of you app and see if the OSMFlutterFramework I removed EXCLUDED_ARCHS[sdk=iphonesimulator*] from our sdk

Thank you very much. It worked. Really thanks