Looks like Cocoapods and XCode12 are throwing lot of issues that are difficult to manage. In XCode12, it prompted me to perform a settings update of project to update deployment target of all pods to iOS 12 and I did it. But immediately after updating settings, I get these errors in nanopb-umbrella.h:
There are also pod warnings such as:
The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.
I thought upgrading project settings that updates deployment target of each pod to iOS 12.0 will fix it but instead it causes build errors. Pod update doesn't help either. Neither does pod deintegrate and reinstall along with removing DerivedData.
A fix is at CocoaPods/CocoaPods#9905 and targeted for CocoaPods 1.10. As a (temporary) workaround you can set "Quoted include in framework headers" in pods project build settings to NO.
Related
On xcode, I'm trying to use a pod to implement a mail API in Swift. When I try to build the framework, I get this error:
Compiling for iOS 8.0, but module 'Alamofire' has a minimum deployment target of iOS 10.0
How do I change the pod so it builds for iOS 10.0 or above?
The problem occurs due to the Alamofire has updated its library. While Evreflection has not updated for the Alamofires updated version. You need to specify the Version of Alamofire here.
Use this line in podfile to specify the version
pod 'EVReflection/Alamofire','~> 5.10.1'
pod 'Alamofire','~> 4.9.1'
Then deintegrate the pods from project and install it again.
This would solve the problem you are facing
You should up Deployment Target of your app to 10.0 in your project's settings because you can't use pods with highest iOS version than you use in the project.:
Well This is a very common error by xcode and it has so [many] 2 answer on StackOverflow still I am facing this in a particular situation.
My project is running fine on iOS 11 Deployment target but when I try to downgrade my deployment target to iOS 10, it start to throw Module map file not found for every pod library.
What Have I tried:
Updated Podfile platform :ios, '10.0'
pod deintegrate then 'pod cleanand after that runpod install`
Clean DerivedData folder
Clean project couple of times using the combination cmd+opt+shift+k & cmd+shift+k
Check Objective-C Bridging Header.
Revert back deployment target to iOS 11 and it works on iOS 11
Removing pod which showing Module map file not found and then it's throwing build error where I have used those library.
How can I get out from this error?
P.S.:
It's a mixed project of obj-c and swift 4.2.
Xcode version 11.2.1(11B53).
Cocoapods version 1.8.4
model Map file not found
faild to emit precompiled header
From given set of information, it seems you are using color as an asset in your asset catalog like following screenshot
It requires min deployment target ios 11 to work. Stop using this feature if you want to run in ios 10.
Hope it helps.
I'm trying to run the UITests for my App but it's crashing as soon as it loads. Here's the error.
2018-09-29 16:19:49.577151+1000 xxxUITests-Runner[6007:69633] (dlopen_preflight(/Users/Acc/Library/Developer/Xcode/DerivedData/xxx-bjuwemcifadxhlhgojgfktmmades/Build/Products/Debug-iphonesimulator/xxxUITests-Runner.app/PlugIns/xxxUITests.xctest/xxxUITests): Library not loaded: #rpath/libswiftContacts.dylib
Referenced from: /Users/Acc/Library/Developer/Xcode/DerivedData/xxx-bjuwemcifadxhlhgojgfktmmades/Build/Products/Debug-iphonesimulator/xxxUITests-Runner.app/PlugIns/xxxUITests.xctest/Frameworks/MapboxGeocoder.framework/MapboxGeocoder
Reason: image not found)
I'm using CocoaPods (v1.6.0.beta.1) to install my frameworks. I'm running Xcode 10 with Swift 4.2 and iOS 12. Also, Git is used as version control with other developers (Perhaps there're conflicts?).
My target app works perfectly, both on a simulator and a real phone, and so does my unit tests. But my UITest target fails as soon as it launches up. This problem happens on both a simulator and a real machine.
There have been many posts on the issue before, but none of them have helped me so far. I've had 2 isolated occurrences before, the first time I've solved by adding dependencies into my pod file for the UITest unit, and the second time by simply removing my target and copy & pasting the classes back into the new target (unconstructive, but last resort). I can do the same this time as well but it's a bit of a waste of time and I'm afraid that this will crop up again in the future.
This is what I've done so far:
Clean Xcode builds folder and deleted derived data, IOS device logs, and User Data folders.
Restarted Xcode, Mac, as well as my device and simulators, and recloned repository, and pod update && pod install
Have 'Always embed swift standard libraries' as yes
Checked my Target Application is correct
Made sure offending framework (MapboxGeocoder.framework) is included in Embed Pod Frameworks
So after 5 days, I managed to solve my own problem.
I solved it by moving my UITests target out of the scope of my main app in Podfile.
From:
target 'App' do
use_frameworks!
pods 'Firebase'
target 'AppUITests' do
pods 'Testingpod'
end
end
To:
target 'App' do
use_frameworks!
pods 'Firebase'
end
target 'AppUITests' do
pods 'Testingpod'
end
Has found another solution suggested in Cocoapods issue.
As my project is a framework, so the test does not have a host application.
Changed Podfile
target 'framework' do
use_ frameworks!
pods my_dependencies
target 'framework_tests' do
inherit! :search_paths
end
end
To
target 'framework' do
use_ frameworks!
pods my_dependencies
target 'framework_tests'
end
https://github.com/CocoaPods/CocoaPods/issues/8139
enter image description herewhen I am installing pod file for latest parse sdk by using the below syntax in podfile:
pod 'Parse'
pod 'Facebook-iOS-SDK'
pod 'ParseFacebookUtils'
pod 'ParseFacebookUtils'
pod 'ParseFacebookUtilsV4'
Getting error like ld: library not found for -lPods
Please help me.
Your podfile should have platform same as set in your Project target->General-> Deployment Info.
Like if deployment info is set to be 9.0, then add the line to your podfile.
platform :ios, '9.0'
This problem could happen in the latest React Native 0.63, which I had just experienced. RN 0.63 required iOS 10 or higher. The solution is just platform :ios in Podfile to 10 or higher.
I was running into this same issue, make sure that every Deployment Target in your project is at least 8.1 for every Project and Target.
This includes Pods > Build Settings > iOS Deployment Target, all Targets there, and your main Project and Targets.
System information: Xcode 7.0.1 w/ iOS 9
The issue i am having is: After adding the GoogleMaps pod (1.10.3) to my podfile, the application builds in Xcode for the iOS Simulator, but not for a device.
The error that occurring is as follows:
ld: '/Users/<username>/Projects/Arsenal/LitterBug/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps(GMSCachedTile.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Every post I have found mentions setting the ENABLE_BITCODE flag to 'No' for the pod target in the Pods project. That would be a viable option, if only to allow development to continue until Google updates the SDK, if the GoogleMaps target was being created in the Pods project.
My current podfile looks like:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'AppName' do
pod "Parse"
pod "SwiftOverlays"
pod "FBSDKCoreKit"
pod "GoogleMaps"
pod "FBSDKLoginKit"
pod "FBSDKShareKit"
end
target 'AppNameTests' do
end
When i run pod install --verbose or pod update --verbose, the 'install targets' phase appears to NOT install the GoogleMaps target in the Pods project. This is indeed confirmed by viewing the project in the workspace.
There IS a target created along-side the other pod targets called 'Pods-appname'. I've tried disabling bitcode for this target, but it did not fix the issue.
If anyone else has experienced this issue, please let me know. The original error i received is currently being tracked as an issue and can be viewed here: GoogleMaps issue 8219
The current workaround requires a GoogleMaps target existing in the Pods project in the workspace.
I solved this problem by Setup Enable Bitcode = NO in Build Settings.
Project>Build Settings>All>Build Options>Enable Bitcode = NO
Just select Pods in PROJECT and set Use Legacy Swift Language Version to YES.