@nativescript/ios >= 7.0.1: Undefined symbols for architecture i386
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- ios, javascript
- Área
- build-system, mobile
Línea de trabajo
Reproduce la compilación del simulador usando App_Resources/iOS/Podfile con la dependencia de Mapbox-iOS-SDK o Braintree, comparando @nativescript/ios 7.0.0 con 7.0.1–7.1.0. Empiece con la salida de compilación de platforms/ios y las entradas internas de metadata-generator para i386 y x86_64; se considera completado cuando la aplicación configurada se compila y se ejecuta en el simulador de iOS sin los errores del enlazador de arquitectura.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
My config
- NativeScript CLI 7.1.2 (also tried previous versions)
- @nativescript/ios 7.1.0 (problem exists since 7.0.1, 7.0.0 is working)
- xcode 12.2 (also tried 12.1 and 12.3 but same issue)
The problem
When creating a new NativeScript app and adding the following to App_Resources/iOS/Podfile:
platform :ios, '9.0'
pod 'Mapbox-iOS-SDK', '~> 6.3.0'
or
pod 'Braintree', '4.36.1'
I have trouble to build the app and run the app on iOS in some situations.
-
Using @nativescript/ios 7.0.0**
- app is building and running on simulator and device
-
Using @nativescript/ios 7.0.1 - 7.1.0
- app is running on physical device
- app is NOT running on simulator
- tns run ios --release is failing with the same error message as trying to run it on device:
Project successfully prepared (ios)
Building project...
Xcode build...
warning: Stale file '/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/1429772644690191759/testapp-Prefix.pch.gch' is located outside of the allowed root paths.warning: Stale file '/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/9659924947654793526/testapp-Prefix.pch.gch' is located outside of the allowed root paths.
./.build_env_vars.sh: line 441: declare: UID: readonly variable
NSLD: Swift bridging header '*-Swift.h' not found under '/Users/felixkrautschuk/Library/Developer/Xcode/DerivedData/testapp-cefposwjsgscvxbviyywdtdofqkw/Build/Intermediates.noindex/testapp.build/Debug-iphonesimulator/testapp.build/Objects-normal/i386'
Generating metadata...~/Downloads/testapp/platforms/ios/internal/metadata-generator/bin ~/Downloads/testapp/platforms/ios
Python version: 2.7.16 (default, Jun 5 2020, 22:59:21)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-
Generating metadata for x86_64
Metadata Generator Arguments:
./objc-metadata-generator -verbose -output-bin /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/metadata-x86_64.bin -output-umbrella /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/umbrella-x86_64.h -docset-path /Users/felixkrautschuk/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset Xclang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -mios-simulator-version-min=9.0 -std=gnu99 -target x86_64-apple-ios13.0-macabi -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/include -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents/MapboxMobileEvents.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents/MaterialComponents.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/Swift-Modules -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../App_Resources/iOS/src -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/ -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/Pods/Mapbox-iOS-SDK/dynamic -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios -DCOCOAPODS=1 -DDEBUG=1
Clang Arguments:
"-v", "-x", "objective-c", "-fno-objc-arc", "-fmodule-maps", "-ferror-limit=0", "-Wno-unknown-pragmas", "-Wno-ignored-attributes", "-Wno-nullability-completeness", "-Wno-expansion-to-defined", "-D__NATIVESCRIPT_METADATA_GENERATOR=1", "-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk", "-mios-simulator-version-min=9.0", "-std=gnu99", "-target", "x86_64-apple-ios13.0-macabi", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/include", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents/MapboxMobileEvents.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents/MaterialComponents.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/Swift-Modules", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../App_Resources/iOS/src", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/Pods/Mapbox-iOS-SDK/dynamic", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios", "-DCOCOAPODS=1", "-DDEBUG=1",
Merged 849 categories.
Result: 46392 declarations from 156 top level modules
Done! Running time: 5.495 sec
Saving metadata generation's stderr stream to: /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/metadata-generation-stderr-x86_64.txt
Generating metadata for i386
Metadata Generator Arguments:
./objc-metadata-generator -verbose -output-bin /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/metadata-i386.bin -output-umbrella /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/umbrella-i386.h -docset-path /Users/felixkrautschuk/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset Xclang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk -mios-simulator-version-min=9.0 -std=gnu99 -target i386-apple-ios13.0-macabi -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/include -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents/MapboxMobileEvents.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents/MaterialComponents.framework/Headers -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/Swift-Modules -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../App_Resources/iOS/src -I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/ -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/Pods/Mapbox-iOS-SDK/dynamic -F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios -DCOCOAPODS=1 -DDEBUG=1
Clang Arguments:
"-v", "-x", "objective-c", "-fno-objc-arc", "-fmodule-maps", "-ferror-limit=0", "-Wno-unknown-pragmas", "-Wno-ignored-attributes", "-Wno-nullability-completeness", "-Wno-expansion-to-defined", "-D__NATIVESCRIPT_METADATA_GENERATOR=1", "-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk", "-mios-simulator-version-min=9.0", "-std=gnu99", "-target", "i386-apple-ios13.0-macabi", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/include", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents/MapboxMobileEvents.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents/MaterialComponents.framework/Headers", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/Swift-Modules", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../App_Resources/iOS/src", "-I/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios/src", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/internal/", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/Pods/Mapbox-iOS-SDK/dynamic", "-F/Users/felixkrautschuk/Downloads/testapp/platforms/ios/../../node_modules/@nativescript/core/platforms/ios", "-DCOCOAPODS=1", "-DDEBUG=1",
Merged 849 categories.
Result: 46392 declarations from 155 top level modules
Done! Running time: 5.2533 sec
Saving metadata generation's stderr stream to: /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/metadata-generation-stderr-i386.txt
~/Downloads/testapp/platforms/ios
ld: warning: ld: warning: ignoring file /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/TKLiveSync.framework/TKLiveSync, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64ignoring file /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/NativeScript.framework/NativeScript, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64ld: warning: ignoring file /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MDFInternationalization/MDFInternationalization.framework/MDFInternationalization, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64
ld: warning: ignoring file /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MapboxMobileEvents/MapboxMobileEvents.framework/MapboxMobileEvents, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64
ld: warning: ignoring file /Users/felixkrautschuk/Downloads/testapp/platforms/ios/build/Debug-iphonesimulator/MaterialComponents/MaterialComponents.framework/MaterialComponents, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture i386:
"OBJC_CLASS$_Config", referenced from:
objc-class-ref in main.o
"OBJC_CLASS$_NativeScript", referenced from:
objc-class-ref in main.o
(maybe you meant: OBJC_CLASS$_NativeScriptEmbedder)
"_TNSInitializeLiveSync", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override:
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'MDFInternationalization' from project 'Pods')
** BUILD FAILED **Unable to apply changes on device: D4022399-722F-4DC5-92B0-6001474E4A7B. Error is: Command xcodebuild failed with exit code 65.
So I guess the important part is:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Config", referenced from:
objc-class-ref in main.o
"_OBJC_CLASS_$_NativeScript", referenced from:
objc-class-ref in main.o
(maybe you meant: _OBJC_CLASS_$_NativeScriptEmbedder)
"_TNSInitializeLiveSync", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The newly created NativeScript app using @nativescript/ios 7.1.0 and the Mapbox-iOS-SDK Podfile can be found here:
testapp.zip
There is already a discussion on Github for the nativescript mapbox plugin here: https://github.com/nativescript-community/ui-mapbox/issues/3#issuecomment-732140591 . Yes, it might be related to the Mapbox-iOS-SDK somehow, as this problem does not exist for all Pods, for example pod 'Google-Mobile-Ads-SDK', '7.67.0' is working fine with the latest ios v8 runtime.
BUT the error message above sounds like a NativeScript issue, and when I create a new native Xcode iOS App Project and add the Mapbox Pod there, xcode is building and running the project in Simulator as expected.
The native xcode project can be found here:
iosmapboxapp.zip
(Run pod install first, when you want to try it out).
It would be nice if we could use the latest ios runtime and also all ios pods without having problems to build the ios app.
Thanks in advance!
- Lenguaje dominante
- JavaScript
- Estrellas
- 150
- Forks
- 43
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 22
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NativeScript/ios
-
isImplementedInClass leaks the losing sample instance on re-entrant or racing cache population Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
NativeScript/ios#459 · 1 comentario ·
-
worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
NativeScript/ios#445 ·
-
Dificultad 3/5 3-5 días Aptitud para principiantes 66/100
NativeScript/ios#414 ·
-
question
Dificultad 4/5 3-5 días Aptitud para principiantes 34/100
NativeScript/ios#364 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NativeScript/ios#355 ·
Todos los issues de NativeScript/ios
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
avniproject/avni-client#2135 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
matrix-org/matrix.org#3649 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
vadimdemedes/ink#1029 ·