prscX / react-native-app-tour

React Native: Native App Tour Library
Apache License 2.0
640 stars 118 forks source link

iOS Failing to build with GoogleMaps? #118

Closed n3rd253 closed 3 years ago

n3rd253 commented 3 years ago

Hello,

I have just added this project to my app and it is working so great on android, however when I go to use with iOS, making only changes to PodFile, I receive error from GoogleMaps (this is not present, and app is working 100% fine in iOS, prior to adding readct-native-app-tour)

POD FILE:

flipperkit_version = '0.96.0'
platform :ios, '12.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target ' App' do
  pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
  # ...unfortunately at this time that means you'll need to explicitly mark
  # transitive dependencies as being for debug build only as well:
  pod 'Flipper-DoubleConversion', :configuration => 'Debug'
  pod 'Flipper-Folly', :configuration => 'Debug'
  pod 'Flipper-Glog', :configuration => 'Debug'
  pod 'Flipper-PeerTalk', :configuration => 'Debug'
  pod 'CocoaLibEvent', :configuration => 'Debug'
  pod 'boost-for-react-native', :configuration => 'Debug'
  pod 'OpenSSL-Universal', :configuration => 'Debug'
  pod 'CocoaAsyncSocket', :configuration => 'Debug'
  # ...except, of course, those transitive dependencies that your
  # application itself depends, e.g.:
  pod 'ComponentKit', '~> 0.31'  
  # Pods for  App
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  target ' AppTests' do
    inherit! :complete
    # Pods for testing
  end
  # React Native Maps dependencies
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  # Install additional dependencies
  pod 'RNSquareInAppPayments', :path => '../node_modules/react-native-square-in-app-payments'
  pod 'RNFS', :path => '../node_modules/react-native-fs'
  pod 'react-native-geolocation', path: '../node_modules/@react-native-community/geolocation'
  use_native_modules!
  pod 'RNAppTour', :path => '../node_modules/react-native-app-tour/ios'
  use_frameworks! :linkage => :static
  pod 'MaterialShowcase'
  # Follow [Flipper iOS Setup Guidelines](https://fbflipper.com/docs/getting-started/ios-native)
  # This is required because iOSPhotoEditor is implemented using Swift and we have to use use_frameworks! in Podfile
  $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
  'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',
  'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
  'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
  pre_install do |installer|
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  installer.pod_targets.each do |pod|
      if $static_framework.include?(pod.name)
        def pod.build_type;
          Pod::BuildType.static_library
        end
      end
    end
  end
end
target ' App-tvOS' do
  # Pods for  App-tvOS
  target ' App-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end
post_install do |installer|
  ## Fix for XCode 12.5
  find_and_replace("../node_modules/react native/React/CxxBridge/RCTCxxBridge.mm", "NSArray<id<RCTBridgeModule>> *)modules", "NSArray<Class> *)modules")
  find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm", "RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))")
end
def find_and_replace(dir, findstr, replacestr)
  Dir[dir].each do |name|
      text = File.read(name)
      replace = text.gsub(findstr,replacestr)
      if text != replace
          puts "Fix: " + name
          File.open(name, "w") { |file| file.puts replace }
          STDOUT.flush
      end
  end
  Dir[dir + '*/'].each(&method(:find_and_replace))
end

ERROR:

CompileC /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/Objects-normal/x86_64/AIRGoogleMapPolylineManager.o /Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'react-native-google-maps' from project 'Pods')
    cd /Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios8.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path\=/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=react_native_google_maps -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Index/DataStore -iquote /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/react_native_google_maps-generated-files.hmap -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/react_native_google_maps-own-target-headers.hmap -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/react_native_google_maps-all-non-framework-target-headers.hmap -ivfsoverlay /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/all-product-headers.yaml -iquote /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/react_native_google_maps-project-headers.hmap -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/react-native-google-maps/include -I/Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/Headers/Public -I/Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/Headers/Public/Yoga -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/DerivedSources-normal/x86_64 -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/DerivedSources/x86_64 -I/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/DerivedSources -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/react-native-google-maps -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/Folly -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/Google-Maps-iOS-Utils -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/React-Core -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Products/Debug-iphonesimulator/glog -F/Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/GoogleMaps/Base/Frameworks -F/Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/GoogleMaps/Maps/Frameworks -fmodule-map-file\=/Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DHAVE_GOOGLE_MAPS\=1 -DHAVE_GOOGLE_MAPS_UTILS\=1 -fno-modules -include /Users/michaelsampsell/src/gruther/SnackDispatcherRN/ios/Pods/Target\ Support\ Files/react-native-google-maps/react-native-google-maps-prefix.pch -MMD -MT dependencies -MF /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/Objects-normal/x86_64/AIRGoogleMapPolylineManager.d --serialize-diagnostics /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/Objects-normal/x86_64/AIRGoogleMapPolylineManager.dia -c /Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m -o /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/SnackDispatcherRN-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/Objects-normal/x86_64/AIRGoogleMapPolylineManager.o
/Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m:17:9: fatal error: 'RCTConvert+AirMap.h' file not found
#import "RCTConvert+AirMap.h"
        ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

** BUILD FAILED **

The following build commands failed:
    CompileC /Users/michaelsampsell/Library/Developer/Xcode/DerivedData/app-esdlfydslukdvhajayvtperzfoic/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-google-maps.build/Objects-normal/x86_64/AIRGoogleMapPolylineManager.o /Users/michaelsampsell/src/gruther/app/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolylineManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

PACKAGE JSON

{
  "name": "App",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },
  "dependencies": {
    "@invertase/react-native-apple-authentication": "^2.0.2",
    "@react-native-community/async-storage": "^1.12.0",
    "@react-native-community/google-signin": "^4.0.3",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/toolbar-android": "0.1.0-rc.2",
    "@react-native-firebase/app": "^11.4.1",
    "@react-native-firebase/auth": "^11.4.1",
    "@react-native-firebase/messaging": "^11.4.1",
    "@react-native-picker/picker": "^1.9.10",
    "@types/react-native-fbsdk": "^1.1.0",
    "@types/react-native-vector-icons": "^6.4.5",
    "json2typescript": "^1.4.1",
    "native-base": "^2.15.2",
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-app-tour": "^1.0.5",
    "react-native-date-picker": "^3.2.10",
    "react-native-fbsdk": "^2.0.0",
    "react-native-fs": "^2.18.0",
    "react-native-geolocation-service": "^4.0.0",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-image-picker": "^3.0.1",
    "react-native-image-resizer": "^1.4.5",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-maps": "github:react-native-community/react-native-maps",
    "react-native-modal-dropdown": "^1.0.0",
    "react-native-ratings": "^7.2.0",
    "react-native-reanimated": "^1.8.0",
    "react-native-router-flux": "^4.2.0",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.7.0",
    "react-native-square-in-app-payments": "^1.5.0",
    "react-native-swipe-list-view": "^3.2.5",
    "react-native-toast-message": "^1.4.9",
    "react-native-vector-icons": "^7.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^1.0.0",
    "@types/jest": "^24.0.24",
    "@types/react-native": "^0.62.0",
    "@types/react-native-loading-spinner-overlay": "^0.5.2",
    "@types/react-native-modal-dropdown": "^0.7.0",
    "@types/react-native-square-in-app-payments": "^1.4.0",
    "@types/react-test-renderer": "16.9.2",
    "@typescript-eslint/eslint-plugin": "^2.27.0",
    "@typescript-eslint/parser": "^2.27.0",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.58.0",
    "prettier": "^2.0.4",
    "react-test-renderer": "16.11.0",
    "typescript": "^3.8.3"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}

Any help would be amazing :D

n3rd253 commented 3 years ago

@prscX seems same as this on another of your repos?

http://5.9.10.113/66966465/react-native-maps-ios-build-issues-when-using-use-frameworks-linkage-stati