openid / AppAuth-iOS

iOS and macOS SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-iOS
Apache License 2.0
1.75k stars 768 forks source link

Including Both AppAuth and AppAuth-Core Causes Symbol Warning in App Store Upload #423

Open sebcoh opened 5 years ago

sebcoh commented 5 years ago

Are you filing an issue about iOS 12? We use iOS 12 but I think it's not relevant here.

Describe the bug Including both AppAuth and AppAuth-Core in a project via Podfile apparently causes name-collision issues in relation to symbols creation; App Store review reports issue "ITMS-90381: Too many symbol files - These symbols have no corresponding slice in any binary".

To Reproduce Steps to reproduce the behavior:

  1. Create new project with a podfile, add pod 'AppAuth' to the main target, pod 'AppAuth/Core' to a Siri intents target
  2. Build app
  3. In Xcode, Go to Pods/Products, observe that AppAuth is listed twice, once under path AppAuth, once under AppAuth-Core.
  4. Submit app to App Store, receive warning "ITMS-90381: Too many symbol files - These symbols have no corresponding slice in any binary"

Expected behavior I guess the Product for AppAuth-Core should have a distinct name to avoid confusing the toolchain.

Screenshots

Desktop (please complete the following information):

Related This issue looks related, it is supposedly fixed: https://github.com/CocoaPods/CocoaPods/issues/6819

WilliamDenniss commented 5 years ago

I believe you should only be using AppAuth, OR AppAuth/Core. Does one of your targets include both?

ErmaCKoK commented 4 years ago

@WilliamDenniss Hi,

I have similar error:

Multiple targets match implicit dependency for linker flags '-framework AppAuth'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'Test' from project 'Test') Target 'AppAuth' (in project 'Pods') Target 'AppAuth-Core' (in project 'Pods')

Podfile:

target 'Share' do
  use_frameworks!
  pod 'AppAuth/Core'
end

target 'Test' do
  use_frameworks!
  pod 'AppAuth'
end

If i remove use_frameworks! works good. How i can keep "use_frameworks!" but fixed warning, any idea?

Thanks

Amigo927 commented 3 years ago

When I tried to archve, I got same warning.

Multiple targets match implicit dependency for linker flags '-framework AppAuth'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'Test' from project 'Test') Target 'AppAuth' (in project 'Pods') Target 'AppAuth-Core' (in project 'Pods')

and got this error

Multiple commands produce '/Users/myname/Library/Developer/Xcode/DerivedData/MyApp-/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework':

1) Target 'AppAuth-Core' has create directory command with output '/Users/myname/Library/Developer/Xcode/DerivedData/MyApp-/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework'

2) Target 'AppAuth' has create directory command with output '/Users/myname/Library/Developer/Xcode/DerivedData/MyApp-/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AppAuth.framework'

my podfile

target 'MyApp' do
  use_frameworks!
  pod 'AppAuth'
end

target 'MyAppWidgetExtension' do
  use_frameworks!
  pod 'AppAuth/Core'
end

Is there solution?

ErmaCKoK commented 3 years ago

@Amigo927 My solution is override podspec and renamed pod

Pod::Spec.new do |s|

  s.name         = "AppAuthCore"
  s.version      = "1.4.0"
  s.summary      = "AppAuth for iOS and macOS is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers."

  s.description  = <<-DESC
AppAuth for iOS and macOS is a client SDK for communicating with [OAuth 2.0]
(https://tools.ietf.org/html/rfc6749) and [OpenID Connect]
(http://openid.net/specs/openid-connect-core-1_0.html) providers. It strives to
directly map the requests and responses of those specifications, while following
the idiomatic style of the implementation language. In addition to mapping the
raw protocol flows, convenience methods are available to assist with common
tasks like performing an action with fresh tokens.
It follows the OAuth 2.0 for Native Apps best current practice
([RFC 8252](https://tools.ietf.org/html/rfc8252)).
                   DESC

  s.homepage     = "https://openid.github.io/AppAuth-iOS"
  s.license      = "Apache License, Version 2.0"
  s.authors      = { "William Denniss" => "wdenniss@google.com",
                     "Steven E Wright" => "stevewright@google.com",
                     "Julien Bodet" => "julien.bodet92@gmail.com"
                   }

  # Note: While watchOS and tvOS are specified here, only iOS and macOS have
  #       UI implementations of the authorization service. You can use the
  #       classes of AppAuth with tokens on watchOS and tvOS, but currently the
  #       library won't help you obtain authorization grants on those platforms.

  s.platforms    = { :ios => "7.0", :osx => "10.9", :watchos => "2.0", :tvos => "9.0" }

  s.source       = { :git => "https://github.com/openid/AppAuth-iOS.git", :tag => s.version }
  s.requires_arc = true

  s.source_files = "Source/*.{h,m}", "Source/AppAuthCore/*.{h,m}"
  s.exclude_files = "Source/AppAuth.h"
end
Amigo927 commented 3 years ago

Thank you for replying!! I soleved this problem by modifying my podfile.

use_frameworks!
target 'MyApp' do

  pod 'AppAuth'

  target 'MyAppWidgetExtension' do

    inherit! :search_paths

  end
end