When i run the UITest in my phone it installs and runs as a separate app while giving the following error.
2017-07-27 10:44:33.892639+0700 XCTRunner[11886:3502890] Running
tests... 2017-07-27 10:44:34.137927+0700 XCTRunner[11886:3502890] The
bundle “...UITests” couldn’t be loaded because it is damaged or
missing necessary resources. Try reinstalling the bundle. 2017-07-27
10:44:34.137999+0700 XCTRunner[11886:3502890]
(dlopen_preflight(/var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/...UITests-Runner.app/PlugIns/...UITests.xctest/...UITests):
Library not loaded:
#rpath/GoogleToolboxForMac.framework/GoogleToolboxForMac Referenced
from:
/var/containers/Bundle/Application/75C9B589-CCD4-480D-9E23-BA86878E8B37/...UITests-Runner.app/PlugIns/...UITests.xctest/...UITests
Reason: image not found)
I am trying to find a solution for this problem more than a day.
I wanted to add UITests to my existing app and added UITest target to my app. I am using both carthage and cocoa-pod. I updated pod file and updated pod then i added frameworks to the UITest target which are installed by carthage.
This is my pod file
platform :ios, '9.0'
use_frameworks!
target 'ExampleApp' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod 'Crashlytics'
pod 'Google/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
end
target 'ExampleAppTests' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod 'Crashlytics'
end
target 'ExampleAppUITests' do
pod 'Charts'
pod 'ReachabilitySwift', '~> 3'
pod 'Fabric'
pod 'Crashlytics'
end
This is my cartfile
github "Alamofire/Alamofire" ~> 4.0
github "SwiftyJSON/SwiftyJSON" "3.0.0"
github "Friend-LGA/LGSideMenuController" ~> 1.0.0
github "TTTAttributedLabel/TTTAttributedLabel" ~> 1.13.4
github "MagicalPanda/MagicalRecord"
I could find a related question from stack overflow but unfortunately it was not helpful. can you please help me to add the UITest target to my project without a issue.
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
use_frameworks!
def base_pods
pod 'FBSDKCoreKit', '4.24.0'
pod 'FBSDKLoginKit', '4.24.0'
pod 'FBSDKShareKit', '4.15.0'
pod 'FacebookCore', '0.2.0'
pod 'FacebookLogin', '0.2.0'
pod 'FacebookShare', '0.2.0'
end
target 'App' do
base_pods
target 'AppTests' do
inherit! :search_paths
# Pods for testing
end
target 'AppUITests' do
inherit! :complete
# Pods for UI testing
end
end
the line inherit! :complete is key here
and in settings for the UITest target
NEXT:
clear derived data
pod deintegrate && pod install
Related
I am getting error when added a new pod. My initial pod file was
#platform :ios, '9.0'
target 'xxxxxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TPV Plus
pod 'IQKeyboardManagerSwift'
pod 'SDWebImage'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'EVReflection/MoyaRxSwift'
pod 'SwifterSwift'
pod 'Crashlytics'
pod 'Fabric'
pod 'LGSideMenuController'
pod 'CCBottomRefreshControl'
pod 'MaterialComponents/ActivityIndicator'
pod 'TweeTextField'
pod 'DropDown'
pod 'DisPlayers-Audio-Visualizers'
pod 'MaterialComponents/BottomSheet'
# pod 'GooglePlacePicker'
pod 'GooglePlaces', '3.6.0'
pod 'GoogleMaps', '3.6.0'
I have commented few and added FirebaseCrashlytics. Below is the updated one
#platform :ios, '9.0'
target 'xxxx' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TPV Plus
pod 'IQKeyboardManagerSwift'
pod 'SDWebImage'
# pod 'Firebase/Core'
# pod 'Firebase/Messaging'
pod 'EVReflection/MoyaRxSwift'
pod 'SwifterSwift'
# pod 'Crashlytics'
# pod 'Fabric'
pod 'LGSideMenuController'
pod 'CCBottomRefreshControl'
pod 'MaterialComponents/ActivityIndicator'
pod 'TweeTextField'
pod 'DropDown'
pod 'DisPlayers-Audio-Visualizers'
pod 'MaterialComponents/BottomSheet'
# pod 'GooglePlacePicker'
pod 'GooglePlaces', '3.6.0'
pod 'GoogleMaps', '3.6.0'
pod 'FirebaseCrashlytics'
end
But when I build the project getting error error build: 13 duplicate symbols for architecture arm64
In the project all other library files are duplicated as shown in picture. The project is git integrated.
How will I solve this issue.
I figured out the issue happened here. During the git commit, the pod files were committed partially to git. So I deleted the entire pod folder and kept the pod.lock file as such. After that did the pod install. So all the duplicate files were deleted and project is building successfully.
I'm trying to build Javascript source code as an iOS app using Cordova.
I have introduced firebase with CocoaPods, and I am very troubled because I can not build.
this is wannings
Ignoring file /Users/MYNAME/Library/Developer/Xcode/DerivedData/ProductName/Build/Products/Debug-iphonesimulator/CocoaLumberjack/CocoaLumberjack.framework/CocoaLumberjack, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64
This is Error
Undefined symbols occur in large numbers
This is my Cocoapod profile.
platform :ios, '10.0'
use_frameworks!
target 'product_name' do
use_frameworks!
project 'product_name.xcodeproj'
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift', '~> 0.2'
# ID Instance
pod 'Firebase/Messaging'
# config
pod 'CocoaLumberjack/Swift'
# Pods for PodTest
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
# Bluetooth
pod 'RxBluetoothKit'
# debug
pod 'SimulatorStatusMagic', :configurations => ['Debug']
# design pattern
pod 'Swinject'
# zip
pod 'Zip'
# Protect UI
pod 'iOSDFULibrary'
pod 'libb2s'
end
target 'shareExtension' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift', '~> 0.2'
# ID Instance
pod 'Firebase/Messaging'
# config
pod 'CocoaLumberjack/Swift'
# Pods for PodTest
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
# Bluetooth
pod 'RxBluetoothKit'
# debug
pod 'SimulatorStatusMagic', :configurations => ['Debug']
# design pattern
pod 'Swinject'
# zip
pod 'Zip'
# Protect UI
pod 'iOSDFULibrary'
pod 'libb2s'
end
My Enviroment:
XCode Version 11.5
CocoaPods Version 1.9.3
What I have done so far.
STEP 1 : Solved CocoaPods Warnnings.
STEP 2 : Error Id: library Not Found XXXX
→ I installed the Not Found framework with CocoaPod(And decided to install a lot)
STEP3 : Modify Library Search Paths
STEP4 : Set Build Active Architecture Only explicitly to No
If anyone has experienced a similar error, I would like some advice on the current error.
Thanks.
I solved my problem.
I found an explanation in the condition of the build using the simulator.
Premise:
Why does the iOS simulator require i386 and x86_64 symbols even though I'm on an x86_64 system only?
Implementation example:
Could not find module for target 'x86_64-apple-ios-simulator'
In my project, I have to cleat Cordiva - Firebase relationship.
After,question,I did two Implementation.
STEP1: Find out why I can't build
Refer to the above article or build on the our iPhone.
STEP2: Organize compatibility
Make CORDOVA a parent element and make other targets child elements
THANKS!!
I'm trying to update my pods, I list the pods updates through
pod outdated
podfile ( Further more I have even tried to out 'Firebase/Auth', '6.3.1' in podfile to specify the version but no use ["-" used in place of app, NDA -_- ] )
# Uncomment the next line to define a global platform for your project
use_frameworks!
platform :ios, '9.0'
def extension_pod
# pod 'ReadabilityKit', '0.7.1'
pod 'SDWebImage', '~> 4.0'
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'FirebaseUI/Database'
pod 'Firebase/Storage'
pod 'Firebase/Core'
end
target '-' do
extension_pod
pod 'LGSideMenuController'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionTextModel'
#pod 'FirebaseUI', '~> 5.0'
pod 'Firebase/Messaging'
pod 'TOCropViewController'
# [START google_pod]
pod 'GoogleSignIn', '4.1.2'
pod 'ARSLineProgress'
#pod 'TesseractOCRiOS', '4.0.0'
# [END google_pod]
pod 'TwitterKit'
pod 'DateTools'
pod 'Fabric'
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for -
target '-Tests' do
inherit! :search_paths
# Pods for testing
end
target '-UITests' do
inherit! :search_paths
# Pods for testing
end
target '-E' do
extension_pod
end
end
Commands that I have done so far to update my Firebase/Auth repo,
pod update 'Firebase'
pod update 'Firebase/Auth'
pod install --no-repo-update
pod repo update && pod update 'Firebase/Auth'
All of these show as follow, but does not update to the specific version shown by pod outdated, am I missing some command for update process to occur?
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 17 dependencies from the Podfile and 33 total pods installed.
Another dependency requires FirebaseAuth to be a lower version. See the Podfile.lock to get the details.
Note that you want to update the FirebaseAuth pod - not Firebase/Auth which is the Auth subspec in the Firebase pod.
It might be related to locking the GoogleSignIn pod to an old version.
Change platform :ios, '9.0' to platform :ios, '10.0'
I have the below Podfile.
target '*****' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for *****
# pod 'Netcore-Smartech-iOS-SDK'
pod 'TPKeyboardAvoiding'
pod 'AMSlideMenu', '~> 1.5.4'
pod 'SVProgressHUD'
pod 'Google/SignIn'
pod 'Google/Analytics'
pod 'MZFormSheetController'
pod 'AFNetworking'
pod 'Fabric'
pod 'Crashlytics'
pod 'LTHMonthYearPickerView'
target '****CabsTests' do
inherit! :search_paths
# Pods for testing
end
target '***CabsUITests' do
inherit! :search_paths
# Pods for testing
end
#pod 'AFNetworking', '~> 2.5.4'
end
Its working fine ,
But when I start importing the below , it give me error:
"
Showing Recent Messages
: Library not found for -lAFNetworking
: Linker command failed with exit code 1 (use -v to see invocation)"
use_frameworks!
pod 'MapboxNavigation', '~> 0.6.0'
pod 'TPKeyboardAvoiding'
pod 'AMSlideMenu', '~> 1.5.4'
pod 'SVProgressHUD'
pod 'Google/SignIn'
pod 'Google/Analytics'
pod 'MZFormSheetController'
pod 'AFNetworking'
pod 'Fabric'
pod 'Crashlytics'
pod 'LTHMonthYearPickerView'
Please suggest what make me wrong.
The linker flag has been renamed to:
-lAFNetworking
but the Cocoapods settings have not been updated yet. Rename the entry in "Other Linker Flags" and your problem will be solved.
Also, the library does not support Bitcode yet, thus please turn off Bitcode in Build Options > Enable Bitcode > Select "No". Clean & Rebuild afterwards.
You should add 'https://github.com/CocoaPods/Specs.git'.
Like this:
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
target 'ProjectName' do
pod 'AFNetworking', '~> 3.0'
# Pods for ProjectName
end
I have a pod file as below -
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
target 'OSLMobile' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
target 'OSLMobileTests' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
I want to update the library 'libPhoneNumber-iOS'. For this I am going in my project directory and typing
pod update libPhoneNumber-iOS.
But this is giving me the error -
[!] Unable to add a source with urlhttps://github.com/CocoaPods/Specs.gitnamed master.
You can try adding it manually in ~/.cocoapods/repos or via pod repo add.
Can some on please help me how can I update libPhoneNumber-iOS?
Other details - XCode 8.0, Swift 2.3
Thanks.
Run pod init
If you get [!] Existing Podfile found in Directory
Go to ~/.cocoapods/repos and run git clone https://github.com/CocoaPods/Specs.git master
Then run your
pod update libPhoneNumber-iOS
Reference
Go to ~/.cocoapods/repos and run
git clone https://github.com/CocoaPods/Specs.git master
Referenced from here
There is no need to specify source.
platform :ios, '8.0'
use_frameworks!
target 'OSLMobile' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
target 'OSLMobileTests' do
pod 'AFNetworking'
pod 'libPhoneNumber-iOS', '~> 0.8'
end
Also update your master repo before installing or updating the pods. You can update master repo with command in terminal.
pod repo update
iOS9:
# Uncomment this line to define a global platform for your project
# platform :ios, ‘9.0’
pod 'Alamofire'
pod 'libPhoneNumber-iOS', '~> 0.8'
target 'OSLMobile' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for OSLMobile
target 'OSLMobileTests' do
inherit! :search_paths
# Pods for testing
end
target 'OSLMobileUITests' do
inherit! :search_paths
# Pods for testing
end
end