urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

library not found for -lAirshipExtensions on Xcode 12 Simulator. #258

Closed srinadh-k closed 3 years ago

srinadh-k commented 3 years ago

Preliminary Info

What Airship dependencies are you using?

I am using Airship (14.1.1) and AirshipExtensions (14.1.1) dependencies with help of CocoaPods.

What are the versions of any relevant development tools you are using?

Xcode 12

Report

What unexpected behavior are you seeing?

My application is not able to compile on iOS Simulator and getting the following error after upgrading to Xcode 12 from Xcode 11.7

library not found for -lAirshipExtensions

What is the expected behavior?

I was able to run my iOS app on Xcode 11.7 simulators with the following Airship dependencies. Airship (14.0.0-beta1) AirshipExtensions (14.0.0-beta1)

What are the steps to reproduce the unexpected behavior?

upgrade Airship (14.1.1) and AirshipExtensions (14.1.1) and run on Xcode 12 and getting the following error library not found for -lAirshipExtensions

NOTE: integrated Airship and AirshipExtensions using CocoaPods.

Anyone facing a similar type of issue on Xcode 12?

rlepinski commented 3 years ago

What version of cocoapods are you using? Have you tried clearing your derived data and calling pod install again after updating to latest Xcode? What is the default xcode command line version ?

srinadh-k commented 3 years ago

Cocopods Version: 1.9.3 Default Commander Line: Xcode 12.0 (12A7209)

Yes removed derived data and did pod install and still same issue in simulator.

rlepinski commented 3 years ago

@srinadh-k could you share your pod file? are you using use_frameworks flag ?

srinadh-k commented 3 years ago

@rlepinski no not using in pod file.

rlepinski commented 3 years ago

Could you post the contents of the podfile?

srinadh-k commented 3 years ago

I can not provide all the content of the pod file due to the company policies. Here is a small snippet for AirshipExtensions

target 'NotificationService' do inherit! :search_paths pod 'AirshipExtensions', '~>14.0', :modular_headers => true end

marc-scig commented 3 years ago

@srinadh I'm unable to reproduce this issue. what do the logs look like in the command line when running pod install with your podfile?

srinadh-k commented 3 years ago

@marc-scig I got Pod installation complete! But i am getting an error when I run the application on iOS Simulator but the application compiling and running fine on a real iPhone device.

Please find attached images for your reference.

Screen Shot 2020-09-24 at 4 40 12 PM Screen Shot 2020-09-24 at 4 36 45 PM
rlepinski commented 3 years ago

@srinadh-k I think we will need more information than what you can share in order to reproduce your problem. Please contact support.

srinadh-k commented 3 years ago

@rlepinski can you please tell me what other information required. so i will provide you.

rlepinski commented 3 years ago

I think we need the contents of your pod file, full logs, and if you can somehow reproduce this in a sample app that you can share that would be ideal. When we configure a new app using cocoapods we are not having those issues.

srinadh-k commented 3 years ago

Please check my pod file and I removed all other dependencies and what full logs you needed please let me know.

Podfile.txt

srinadh-k commented 3 years ago

@marc-scig No, if you observer the entire my pod file below you can find test bundle and NotificationService bundle withing main level target.

target 'xxxxxx' do

    pod 'Airship', '~>14.0', :modular_headers => true
    # *************** - React Native Pods ************** #
    pod 'RCTTypeSafety', :path => "../../consumer_apps_rn/node_modules/react-native/Libraries/TypeSafety"
    pod 'React', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-Core', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-CoreModules', :path => '../../consumer_apps_rn/node_modules/react-native/React/CoreModules'
    pod 'React-Core/DevSupport', :path => '../../consumer_apps_rn/node_modules/react-native/'

target 'xxxxTests' do
        inherit! :search_paths
        # Pods for testing
    end
    target 'XXXNotificationService' do
        inherit! :search_paths
        pod 'AirshipExtensions', '~>14.0', :modular_headers => true
    end
end
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
    end
end
marc-scig commented 3 years ago

@srinadh-k OK, I see. The indentation is a bit confusing. Ultimately what I mean though is that your notification service is its own target, not a "subtarget" of your app. You'll probably have an easier time if you break it out into its own top level definition.

srinadh-k commented 3 years ago

@marc-scig you mean to keep it our side top-level as like below? Even still getting the same issue in the simulator.

target 'xxxxxx' do

    pod 'Airship', '~>14.0', :modular_headers => true
    # *************** - React Native Pods ************** #
    pod 'RCTTypeSafety', :path => "../../consumer_apps_rn/node_modules/react-native/Libraries/TypeSafety"
    pod 'React', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-Core', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-CoreModules', :path => '../../consumer_apps_rn/node_modules/react-native/React/CoreModules'
    pod 'React-Core/DevSupport', :path => '../../consumer_apps_rn/node_modules/react-native/'

target 'xxxxTests' do
        inherit! :search_paths
        # Pods for testing
    end
end
target 'XXXNotificationService' do
    inherit! :search_paths
    pod 'AirshipExtensions', '~>14.0', :modular_headers => true
end
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
    end
end
srinadh-k commented 3 years ago

@marc-scig now please check it below. still the same issue.


target 'xxxxxx' do

    pod 'Airship', '~>14.0', :modular_headers => true
    # *************** - React Native Pods ************** #
    pod 'RCTTypeSafety', :path => "../../consumer_apps_rn/node_modules/react-native/Libraries/TypeSafety"
    pod 'React', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-Core', :path => '../../consumer_apps_rn/node_modules/react-native/'
    pod 'React-CoreModules', :path => '../../consumer_apps_rn/node_modules/react-native/React/CoreModules'
    pod 'React-Core/DevSupport', :path => '../../consumer_apps_rn/node_modules/react-native/'
end

target 'xxxxTests' do
        inherit! :search_paths
        # Pods for testing
end

target 'XXXNotificationService' do
    inherit! :search_paths
    pod 'AirshipExtensions', '~>14.0', :modular_headers => true
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        end
    end
end
marc-scig commented 3 years ago

That looks pretty normal to me, and I still can't reproduce this issue with an app of my own either way, so I'm not sure what to make of it. It really would be best to contact support from here. We can go back and forth on how your project is set up ad infinitum, but this is primarily a channel for discussing SDK bug reports, and I'm not convinced there's anything wrong with our SDK or podspecs based on my own testing. Support engineers will be better equipped to walk you through the process of narrowing down what your problem is, providing sample code in less public setting, etc.

srinadh-k commented 3 years ago

@marc-scig Sure. Thanks for your help today. we raise a support ticket.

sridharsaminathn commented 1 year ago

Open your .xcworkspace in Xcode and Make this settings.

Screenshot 2023-07-25 at 8 27 54 PM