react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

no such module 'XCTest' after upgrade

Open rochapablo opened this issue 6 years ago • 11 comments

Configuration

Run react-native info in your project and share the content.

info Fetching system and libraries information...
System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Memory: 399.43 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.11.1 - /usr/local/bin/node
    Yarn: 1.19.0 - /usr/local/bin/yarn
    npm: 6.13.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.12.0 => 16.12.0
    react-native: 0.61.5 => 0.61.5
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2

What react-native-track-player version are you using?

"react": "16.12.0",
"react-native": "0.61.5",
"react-native-track-player": "^1.2.2",

Issue

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "react-native-track-player-umbrella.h"
        ^
ios/Pods/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h:25:9: note: in file included from ios/Pods/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h:25:
#import "Quick.h"
        ^
node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h:9:9: note: in file included from node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h:9:
#import "QuickSpec.h"
        ^
node_modules/react-native-track-player/ios/RNTrackPlayer/Vendor/AudioPlayer/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h:1:9: error: 'XCTest/XCTest.h' file not found
#import <XCTest/XCTest.h>
        ^
<unknown>:0: error: could not build Objective-C module 'react_native_track_player'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/XCTest.swiftmodule/x86_64.swiftinterface:6:19: error: no such module 'XCTest'
@_exported import XCTest
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/XCTest.swiftmodule/x86_64.swiftinterface:6:19: error: no such module 'XCTest'
@_exported import XCTest
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/XCTest.swiftmodule/x86_64.swiftinterface:6:19: error: no such module 'XCTest'
@_exported import XCTest
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/XCTest.swiftmodule/x86_64.swiftinterface:6:19: error: no such module 'XCTest'
@_exported import XCTest

Code

It was all good, but due new versions I have decide to upgrade all my libs and now I can't build the application.

rochapablo avatar Jan 23 '20 14:01 rochapablo

Same here :(

JorgeMoV avatar Jan 23 '20 17:01 JorgeMoV

Maybe this it's related

[!] [Xcodeproj] Generated duplicate UUIDs:

PBXBuildFile -- Pods.xcodeproj/targets/buildConfigurationList:buildConfigurations:baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,defaultConfigurationIsVisible:0,defaultConfigurationName:Release,displayName:ConfigurationList,isa:XCConfigurationList,,buildPhases:buildActionMask:2147483647,displayName:Headers,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXHeadersBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Sources,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXSourcesBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Frameworks,files:,isa:PBXFrameworksBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Copy generated compatibility header,files:,inputFileListPaths:,inputPaths:|,|,|,isa:PBXShellScriptBuildPhase,name:Copy generated compatibility header,outputFileListPaths:,outputPaths:|,|,|,runOnlyForDeploymentPostprocessing:0,shellPath:/bin/sh,shellScript:COMPATIBILITY_HEADER_PATH="${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h"
MODULE_MAP_PATH="${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap"

ditto "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h" "${COMPATIBILITY_HEADER_PATH}"
ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player.modulemap" "${MODULE_MAP_PATH}"
ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h" "${BUILT_PRODUCTS_DIR}"
printf "\n\nmodule ${PRODUCT_MODULE_NAME}.Swift {\n  header \"${COMPATIBILITY_HEADER_PATH}\"\n  requires objc\n}\n" >> "${MODULE_MAP_PATH}"
,,buildRules:,dependencies:displayName:React,isa:PBXTargetDependency,,displayName:react-native-track-player,isa:PBXNativeTarget,name:react-native-track-player,packageProductDependencies:,productName:react-native-track-player,productReference:displayName:libreact-native-track-player.a,explicitFileType:archive.ar,includeInIndex:0,isa:PBXFileReference,name:libreact-native-track-player.a,path:libreact-native-track-player.a,sourceTree:BUILT_PRODUCTS_DIR,

While running pod update and pod install, but still don't know how to fix.

rochapablo avatar Jan 23 '20 18:01 rochapablo

Same!

fritzfr avatar Jan 24 '20 09:01 fritzfr

fast fix: https://github.com/react-native-kit/react-native-track-player/issues/503#issuecomment-578087334.

Also, before build, close the xcode and follow

  1. rm -rf ios/build
  2. rm -rf ~/Library/Developer/Xcode/DerivedData
  3. rm -rf $TMPDIR/ react-*
  4. rm -rf ios/Pods ios/Podfile.lock
  5. (cd ios/ && pod update && pod install)
  6. Open xcode
  7. Clean build folder
  8. Build

Still the fix should be done here in the lib in a new release.

rochapablo avatar Jan 24 '20 12:01 rochapablo

^^ That works, tank you !

czekFREE avatar Feb 08 '20 08:02 czekFREE

Issue persists even with suggested solution :( Same exact config as original description

kreonjr avatar Feb 18 '20 06:02 kreonjr

Unfortunately the suggested solution didn't work for me either :(

jacklj avatar Feb 21 '20 11:02 jacklj

For it to work, you have to follow instructions in #503. as well.

cherifya avatar Feb 22 '20 10:02 cherifya

I'm getting this file, even with a vanilla install.

npm install --save react-native-track-player npm install --save react-native-swift react-native link cd ios pod install (At this point, it fails) Need to change the pod ios to minimum of 10 and add dummy swift file then pod install works react-native run-ios this fails giving me the XCTest error

neoassyrian avatar Feb 29 '20 13:02 neoassyrian

same errors

VitaliyGaliy avatar Mar 01 '20 20:03 VitaliyGaliy

I'm getting this file, even with a vanilla install.

npm install --save react-native-track-player npm install --save react-native-swift react-native link cd ios pod install (At this point, it fails) Need to change the pod ios to minimum of 10 and add dummy swift file then pod install works react-native run-ios this fails giving me the XCTest error

I have this problem .You solved it?

andresteje avatar Mar 27 '20 19:03 andresteje