I created a private pods that does not support the simulator, and now I run pod lib lint and I get an error:
-ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
Then I used --verbose and saw that it was compiled using the emulator:
CompileC /Users/xx/Library/Developer/Xcode/DerivedData/App-ctxhalwvkdrxongrjlngrlahubld/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/main.o /var/folders/ mb/b7p9jyj93j75p9gl9m0c5yg00000gn/T/CocoaPods-Lint-20200609-54993-yfocd9-xxSDK/App/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/xx/Library/Developer/Xcode/DerivedData/App-ctxhalwvkdrxongrjlngrlahubld/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/i386/main.o /var/folders/ mb/b7p9jyj93j75p9gl9m0c5yg00000gn/T/CocoaPods-Lint-20200609-54993-yfocd9-xxSDK/App/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
Obviously, my private pods do not support the simulator. Is there any setting to avoid compiling with the simulator?
I made some attempts, although pod lib lint --skip-import-validation --allow-warnings works, but pod repo push MySpec xxSDK.podspec --skip-import-validation --allow-warnings does not work.
Private Pods I created, using :path =>'../' works, but only for Devices.
Related
I am working on a private iOS Swift CocoaPod which is supposed to be used for DEBUG builds only. It uses one other CocoaPod as a dependency, which should also be included for DEBUG only. All code in the source files that use this dependency are inside the if #DEBUG swift flag, To achieve this I added it to my PodSpec with the following line:
s.dependency 'OHHTTPStubs/Swift', '~> 9.0', :configurations => :debug
However when I run pod lib lint it fails on Building with `xcodebuild`. step, when I run the lint with --verbose argument I get the following result:
ld: framework not found OHHTTPStubs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
** BUILD FAILED **
The following build commands failed:
Ld /Users/<username>/Library/Developer/Xcode/DerivedData/App-dvhxmheoxqefvffloemufugtmpli/Build/Products/Release-iphonesimulator/<cocoapod_name>/<cocoapod_name>.framework/<cocoapod_name> normal
(1 failure)
When I don't include , :configurations => :debug argument everything works as expected, however when I then add my CocoaPod to my iOS project, this will include the OHHTTPStubs framework in release builds, even when I add my CocoaPod with the , :configurations => :debug argument in the Podfile of my iOS project.
I am trying to add Firebase into my project. I just added below pods into my Xcode project.
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Database'
pod 'Firebase/Auth'
After installing podfile, I try to import firebase into my project. But it gives me an error that Firebase.h is not found.
Above issue will occur when I uncheck the Run script only when installing from [CP] Check pods Manifest.lock. After that I will installed pod using pod install. And then issue will occur.
Error which I got after uncheck the checkbox:
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
I had the same issues on my project,
I wrote manually link the project and its libraries to solve the problem I followed this link steps it worked
https://github.com/invertase/react-native-firebase-docs/blob/master/docs/installation/ios.md
Also, you must check you link binary with libraries on your Xcode project.
Another solution you can delete all pod depend on libs then you pod init
add manual pod libs after pod install
I am having the same error when I execute, on command line, "cordova build ios --release --device" and I am sure the compilation is using the .xcworkspace file. When I build the project from xCode is working ok.
Cordova version: 8.0.0 and 9.0.0
Ionic: 1.0.0
cordova-android: ^8.1.0
cordova-ios: ^5.1.1
This is the log ...
Checking config.xml for pods.
No new pods detects
Reading build config file: /mobile/build.json
Building project: /mobile/platforms/ios/MyProject.xcworkspace
Configuration: Release
Platform: device
Target:
Adding xcodebuildArg: -UseModernBuildSystem=0
Running command: xcodebuild -workspace MyProject.xcworkspace -scheme MyProject -configuration Release -destination generic/platform=iOS -archivePath MyProject.xcarchive archive CONFIGURATION_BUILD_DIR=/mobile/platforms/ios/build/device SHARED_PRECOMPS_DIR=/mobile/platforms/ios/build/sharedpch -UseModernBuildSystem=0
User defaults from command line:
IDEArchivePathOverride = /mobile/platforms/ios/MyProject.xcarchive
UseModernBuildSystem = 0
Build settings from command line:
CONFIGURATION_BUILD_DIR = /mobile/platforms/ios/build/device
SHARED_PRECOMPS_DIR = /mobile/platforms/ios/build/sharedpch
Prepare build
note: Using legacy build system
...
/mobile/platforms/ios/MyProject/Plugins/cordova-plugin-fcm-with-dependecy-updated/FCMPlugin.m:7:9: fatal error:
'Firebase.h' file not found
#import "Firebase.h"
^~~~~~~~~~~~
1 error generated.
** ARCHIVE FAILED **
The following build commands failed:
CompileC /Users/myUser/Library/Developer/Xcode/DerivedData/MyProject-dwfxupwwzcbssmamqfftsijvblyb/Build/Intermediates.noindex/ArchiveIntermediates/MyProject/IntermediateBuildFilesPath/MyProject.build/Release-iphoneos/MyProject.build/Objects-normal/armv7/FCMPlugin.o MyProject/Plugins/cordova-plugin-fcm-with-dependecy-updated/FCMPlugin.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
(node:8380) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/mobile/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:197:13)
at maybeClose (internal/child_process.js:984:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
(node:8380) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8380) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I've been struggling with getting my react native instance to run and i keep hitting this:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/alexvallejo/Sites/myProj/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/BannerComponent.o /Users/alexvallejo/Sites/myProj/node_modules/react-native-firebase/ios/RNFirebase/admob/BannerComponent.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/alexvallejo/Sites/myProj/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/NativeExpressComponent.o /Users/alexvallejo/Sites/myProj/node_modules/react-native-firebase/ios/RNFirebase/admob/NativeExpressComponent.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Installing build/Build/Products/Debug-iphonesimulator/myProj.app
An error was encountered processing the command (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/alexvallejo/Library/Developer/CoreSimulator/Devices/31C5C7FC-9DE4-4F95-A7F5-50296C8CC6CB/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/0170A665-460A-4CDF-92B4-0FAC8FBE2224/myProj.app/myProj : No such file or directory
Launching org.reactjs.native.example.myProj
Any ideas on what's going on here? I dont have pod 'Firebase/AdMob' in my Podfile so i don't know why BannerComponent is trying to load.
Make sure you're building with the latest Xcode version. Had the same issue with outdated Xcode.
It's possible use this library with pod install?
My project already uses pod install and when I add this library, crash with:
"(UIImageView+AFNetworking.o) ld: 76 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
VIMNetworking worked out its Cocoapods issues - see https://github.com/vimeo/VIMNetworking
The Podfile entries that worked for me were
pod 'VIMNetworking', '~>5.4.2'
pod 'VIMVideoPlayer', '~>5.4.2'
and deleting the line for AFNetworking since the VIMNetworking pulls AFNetworking in as a dependecy.
My project start with cocos2d v3 and run smooth. However, when I add AFNetworking to my project,
the problem
"ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)" happen.
I used pod install and pod file is
platform :ios, ‘7.0’
pod 'AFNetworking', '~> 2.0'
during the installing, below messages show out
[!] The abc [Debug] target overrides the HEADER_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
[!] The abc [Release] target overrides the HEADER_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
so I go to project->target->build setting-> header search paths and put $(inherited) inside, then it can install success.
However, the cocos2d library wasn't call. So I go to Pods.debug.xcconfig and Pods.release.xcconfig to add
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/kazmath/include" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/Chipmunk/chipmunk/include" "$(SRCROOT)/$(PROJECT_NAME)/Libraries/Chipmunk/objectivec/include"
finally the problem "ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)" still happen.
Are the above steps not correct? Or is there any other way to add cocos2d and AFNetworking together? Thank you.