Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on XCode 16 /node_modules/react-native-zip-archive/ios/RNZipArchive.m unsupported option '-G' for target 'arm64-apple-ios14.0-simulator' #220

Open
andorsk opened this issue Sep 24, 2024 · 3 comments

Comments

@andorsk
Copy link

andorsk commented Sep 24, 2024

Describe the bug
I was trying to build the app from scratch, and ran into the following issue on XCode 16 ios target:

/node_modules/react-native-zip-archive/ios/RNZipArchive.m unsupported option '-G' for target 'arm64-apple-ios14.0-simulator'

Which seems to be a bug related to mockingbot/react-native-zip-archive#307. XCode 16.

To Reproduce
Steps to reproduce the behavior:

  1. Download Xcode 16
xcodebuild -version
Xcode 16.0
Build version 16A242d
  1. Open project in XCode
  2. Click run. Output should show
/Users/andor/workspace/github.com/gan/demo/client-demo/adeya-fork/node_modules/react-native-zip-archive/ios/RNZipArchive.m unsupported option '-G' for target 'arm64-apple-ios11.0-simulator'
image

Expected behavior
After steps 1-2, 3 should build the project.

Logs

ScanDependencies /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.o /Users/andor/workspace/github.com/gan/demo/client-demo/adeya-fork/node_modules/react-native-zip-archive/ios/RNZipArchive.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNZipArchive' from project 'Pods')
cd /Users/andor/workspace/github.com/gan/demo/client-demo/adeya-fork/ios/Pods

Using response file: /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp

builtin-ScanDependencies -o /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.o.scan -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/andor/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/andor/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 -Wno-trigraphs -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 -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Index.noindex/DataStore @/Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp -GCC_PREPROCESSOR_DEFINITIONS\=HAVE_INTTYPES_H\ HAVE_PKCRYPT\ HAVE_STDINT_H\ HAVE_WZAES\ HAVE_ZLIB\ MZ_ZIP_NO_SIGNING\  -include /Users/andor/workspace/github.com/gan/demo/client-demo/adeya-fork/ios/Pods/Target\ Support\ Files/RNZipArchive/RNZipArchive-prefix.pch -MMD -MT dependencies -MF /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.d --serialize-diagnostics /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.dia -c /Users/andor/workspace/github.com/gan/demo/client-demo/adeya-fork/node_modules/react-native-zip-archive/ios/RNZipArchive.m -o /Users/andor/Library/Developer/Xcode/DerivedData/AdeyaWallet-evguykojuobejcfsuymkiudslpqy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/RNZipArchive.build/Objects-normal/arm64/RNZipArchive.o

error: unsupported option '-G' for target 'arm64-apple-ios11.0-simulator' (in target 'RNZipArchive' from project 'Pods')

Desktop (please complete the following information):

  • MacBook Pro 14 in
  • OS: 14.6 Beta (23G5061b)
  • XCode Version:
(base) andor@magic-pro-3 adeya-fork % xcodebuild -version
Xcode 16.0
Build version 16A242d

Smartphone (please complete the following information):
Targeting iPad Pro 13 in M4 ios 17.4

Additional context
Add any other context about the problem here.

@andorsk
Copy link
Author

andorsk commented Sep 24, 2024

@andorsk
Copy link
Author

andorsk commented Sep 24, 2024

My workaround in the Podfile got me through it.

installer.pods_project.targets.each do |target|
      if target.name == 'RNZipArchive'
        target.source_build_phase.files.each do |file|
          if file.settings && file.settings['COMPILER_FLAGS']
            file.settings['COMPILER_FLAGS'] = ''
          end
        end
      end
    end

@sairanjit
Copy link
Collaborator

@andorsk Thanks for looking into the issue.I think we can fix this by updating the react-native-zip-archive package and increase the min_ios_supported_version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants