googlemaps / google-maps-ios-utils

Google Maps SDK for iOS Utility Library
https://developers.google.com/maps/documentation/ios-sdk/utility/
Apache License 2.0
716 stars 404 forks source link

Cocoapods issue with use_frameworks #23

Closed jeffbailey closed 4 years ago

jeffbailey commented 8 years ago

We need to specify "use_frameworks!" in our podfile since we have swift pods. However we get the following error with cocoapods 1.0.1 when including the Google Maps Utils pod:

use_frameworks!

pod 'GoogleMaps' pod 'Google-Maps-iOS-Utils'

ERROR: target has transitive dependencies that include static binaries: (/Users/jeff/Documents/Clients/IGS/Projects/Choice360Connect/Pods/GoogleMaps/Subspecs/Base/Frameworks/GoogleMapsBase.framework, /Users/jeff/Documents/Clients/IGS/Projects/Choice360Connect/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMapsCore.framework, and /Users/jeff/Documents/Clients/IGS/Projects/Choice360Connect/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMaps.framework)

domesticmouse commented 8 years ago

Google Maps SDK for iOS is statically built, and will continue to be so until we drop support for iOS 7.

mountainvat commented 8 years ago

You could use the workaround as mentioned in https://github.com/googlemaps/google-maps-ios-utils/issues/17 by manually copying the google-maps-ios-utils classes into your project.

jeffbailey commented 8 years ago

Manually copying the files works as expected. Thanks for verifying this is the only solution until iOS 7 is dropped.

mountainvat commented 8 years ago

It's great to hear! I am just curious did you leave pod 'GoogleMaps' inside your Podfile and just copy the google-maps-ios-utils files?

jeffbailey commented 8 years ago

Yes, I integrated Google Maps as a pod and just copied in the google-maps-iso-utils files.

filipandrei87 commented 8 years ago

Any news on this issue? I'm encountering the same in a Swift project. Not using "!use_frameworks" is not an option as multiple pods are built for Swift.

nmDejamobile commented 8 years ago

marking it as closed is probably not the right way to have users on your side... keep it open and close it once you will have really solved the problem IMO...

mountainvat commented 8 years ago

Unfortunately we do not have a concrete date for dropping iOS7 support that I can give you so this workaround is the best we can think of at the moment.

nmDejamobile commented 8 years ago

@jeffbailey do you mean that you copied files from google-maps-iso-utils/src folder into the pod folder after you used pod install ? Can you show me the final folder tree that you obtained ? Thanks !

jeffbailey commented 8 years ago

@nmDejamobile - No, you don't copy the files to you pod folder. Simply copy them to your project.

nmDejamobile commented 8 years ago

@jeffbailey ok, that's done, I also added the main class to the bridging header file. But I still have errors at build time:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GMUClusterManager", referenced from:
      type metadata accessor for __ObjC.GMUClusterManager in ViewController.o
  "_OBJC_CLASS_$_GMUDefaultClusterIconGenerator", referenced from:
      type metadata accessor for __ObjC.GMUDefaultClusterIconGenerator in ViewController.o
  "_OBJC_CLASS_$_GMUDefaultClusterRenderer", referenced from:
      type metadata accessor for __ObjC.GMUDefaultClusterRenderer in ViewController.o
  "_OBJC_CLASS_$_GMUNonHierarchicalDistanceBasedAlgorithm", referenced from:
      type metadata accessor for __ObjC.GMUNonHierarchicalDistanceBasedAlgorithm in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does it mean that these google maps utils can't be built to be use on simulator ? Do I need to have a real device to work with it ?

jeffbailey commented 8 years ago

It works fine in the simulator. I assume you have these classes added to the appropriate target. I can't think of anything special that needs to be done.

nmDejamobile commented 8 years ago

@jeffbailey I added all files manually to the build phase "compile sources" of the target and now it works. It's an ugly hack imo... I think I'll use mapkit and FBAnnotationClusteringSwift. Even if it's not so advanced, at least it doesn't break my full cocoapod project strategy... I hope google maps ios utils will be updated soon or at least forked for ios 8+ targets.

KellyBennett commented 8 years ago

@domesticmouse iOS 7 is < 3% of the iOS install base (souce: https://developer.apple.com/support/app-store/). What is the hang up on making this library friendly with Swift cocoapods?? This work around is incredibly inconvenient. Simply moving the google-maps-ios-utils files to my project does NOT work, as @nmDejamobile correctly pointed out. It seems like this library should either be available outside of cocoapods, or it should be updated to be use_frameworks! friendly.

domesticmouse commented 8 years ago

@KellyBennett please see @mountainvat's comment above regarding Google Maps SDK for iOS support for iOS 7. When we stop supporting iOS 7 then the Google Maps SDK for iOS can be built in such a way that it allows the project to use use_frameworks!

mdabrarniyazi commented 8 years ago

@nmDejamobile Hi, I copied files too and getting exactly same error. Did you solve it?

ampilogov commented 7 years ago

Do you start support use_frameworks?

ampilogov commented 7 years ago

I getting exactly same error. Did you solve it?

Jianhaos commented 7 years ago

I solved the issue by creating a development pod wrapper for GoogleMaps:

Google-Maps-iOS-SDK-for-Business.zip

We use GoogleMapsM4B but it should be the same idea for regular GoogleMaps. The zip file contains the .podspec file and the dummy class files, you need to copy the real frameworks from Google to make sure your folder looks like this: screen shot 2017-07-27 at 3 24 30 pm

tarikstafford commented 6 years ago

@mountainvat Hey, appreciate all of your work. The instructions were a bit difficult to follow especially since I have never worked with bridging headers before. I needed to manually point to the bridging header file under 'build settings' / 'swift compiler - general' / 'objc bridging header' where i simply entered the file path. I am not sure why it didn't do this automatically, and perhaps its very obvious but this had me bashing my head against a wall for hours haha. Look forward to you guys releasing a dynamic version! :)

jschwendt commented 6 years ago

Given how much iOS 11 has been adopted at this point, I think it's safe to move beyond iOS 7 support. I feel like iOS 9 is a good support floor at this point.

ashleyhenderson commented 6 years ago

Any updates at all?

farshadmb commented 6 years ago

please review and send me feedback #183 @domesticmouse @jeffbailey @Hendies567

renetik commented 5 years ago

So we don't have to use_frameworks! in cocoapods anymore... I switched to static libraries with use_modular_headers! enabled and this library is working well like that. I had it until now copied directly to sources.

ricsantos commented 5 years ago

Unfortunately use_modular_headers! isn't a solution that will work for everyone (eg me!).

@domesticmouse I noticed that GoogleMaps for iOS now targets iOS 9.0 - does this mean it can now be built as a framework?

renetik commented 5 years ago

yes I had issues with modular headers too... copied sources back to my codebase... its ok for now not ideal but ok...

sneps85 commented 5 years ago

Any updates on this?

zyonnetworks commented 5 years ago

Any ETA on updating to Framework?

aha-swipe commented 4 years ago

This issue is open since 2016. We now have iOS 13, iOS 7 is long gone and history but this has still not been solved.

I must ask, is this lib abandonware or still maintained by Google?

tarikstafford commented 4 years ago

This issue is open since 2016. We now have iOS 13, iOS 7 is long gone and history but this has still not been solved.

I must ask, is this lib abandonware or still maintained by Google?

using this fork for now -- https://github.com/aterite/google-maps-ios-utils.git

arriolac commented 4 years ago

This issue is resolved in branch 3.x. The actual fixed version 3.0.0 will be released to CocoaPods soon.

In the meantime, if you want to test this you can include the following in your Podfile.

target 'YOUR_APP' do
  pod 'GoogleMaps', '~> 3.7.0'
  pod 'Google-Maps-iOS-Utils', git: 'git@github.com:googlemaps/google-maps-ios-utils.git', :branch => '3.x'
end
arriolac commented 4 years ago

🎉 v3.0.0 has been published to CocoaPods.

e.g.

target 'YOUR_APP' do
  pod 'Google-Maps-iOS-Utils', '~> 3.0.0'
end

Note that it is a major release so there are some breaking changes (refer to the changelog).

n3rd253 commented 3 years ago

@arriolac i'm trying to use this and https://github.com/react-native-maps/react-native-maps in concert with https://github.com/prscX/react-native-app-tour (this is the assembly which requires use_frameworks! :linkage => :static. I have manually updated the podspec in my local of react-native-maps to use GoogleMaps 3.7.0 and Google-Maps-iOS-Utils ~> 3.0.0 as you've prescribed.

I'm still experiencing the following:

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/AIRGoogleMapPolygonManager.o /Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolygonManager.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/AIRGoogleMapPolygonManager.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/AIRGoogleMapPolygonManager.dia -c /Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolygonManager.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/AIRGoogleMapPolygonManager.o
/Users/michaelsampsell/src/gruther/SnackDispatcherRN/node_modules/react-native-maps/lib/ios/AirGoogleMaps/AIRGoogleMapPolygonManager.m:16:9: fatal error: 'RCTConvert+AirMap.h' file not found
#import "RCTConvert+AirMap.h"

My PodFile

platform :ios, '12.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'SnackDispatcherRN' do
  # Pods for SnackDispatcherRN
  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 'SnackDispatcherRNTests' 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  

  # 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!

###begin breaking portion####
  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 = [ 'CocoaAsyncSocket', 'ComponentKit', 'Yoga', 'YogaKit', 'Google-Maps-iOS-Utils',
    '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 breaking portion### 
end

target 'SnackDispatcherRN-tvOS' do
  # Pods for SnackDispatcherRN-tvOS

  target 'SnackDispatcherRN-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

Any help on how to resolve would be amazing. A note is that this all works 100% fine prior to adding AppTour.

Thanks so much