After updating to xcode 14 I'm getting build error
error build: Undefined symbol: _OBJC_CLASS_$_Flurry
error build: Undefined symbol: _OBJC_CLASS_$_FlurrySessionBuilder
I tried cleaning pods and reinstalling pods and also I tried adding libFlurry_11.2.1.a in build phases, it didn't work.
Platform target in pods is '12.1' and for flurry below command is used
pod 'Flurry-iOS-SDK/FlurrySDK', '~> 11.2.0'
I had to contact support but for me this worked:
pod 'Flurry-iOS-SDK/FlurrySDK', '~> 12.1.1'
and the "startSession" has changed to:
Flurry.startSession(apiKey: "***", sessionBuilder: FlurrySessionBuilder.init()
.build(crashReportingEnabled: true)
.build(logLevel: .all))
PS: Your "startSession" might be different. It depends on what you need.
Related
How exactly does xcode or xcode pods get cached?
I've made changes to update react native, or every time I make expo changes, or certain packages. My project is not an expo project but I am using the expo SDK.
Expo 44-45, React Native 67.3 trying to update to 68.5
My pod install command installs all the wrong dependencies.
I get CompileC --> DerivedData or iPhone Deployment Target errors or Simulator cached issues.
I delete derived data and everything, still pod installs all the wrong pods.
I know the cause of the errors, but I'm not sure why if I run npm i and pod install it installs all of a previous cached pods.
Now I'm getting:
Error: Command failed: xcrun simctl list --json devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
at checkExecSyncError (node:child_process:885:11)
at Object.execFileSync (node:child_process:921:15)
at runOnSimulator (/Users/me/repos/MobileApp/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:167:54)
at Object.runIOS [as func] (/Users/me/repos/MobileApp/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
at Command.handleAction (/Users/me/repos/MobileApp/node_modules/#react-native-community/cli/build/index.js:192:23)
at Command.listener (/Users/me/repos/MobileApp/node_modules/commander/index.js:315:8)
at Command.emit (node:events:513:28)
at Command.parseArgs (/Users/me/repos/MobileApp/node_modules/commander/index.js:651:12)
at Command.parse (/Users/me/repos/MobileApp/node_modules/commander/index.js:474:21)```
Remove pod folder and podfile.lock file in iOS folder.
run this command pod install
I created a new Swift app with xcode 11.4 and I am trying to install the pod for Mongodb Realm as per the instructions in the documentation (https://docs.mongodb.com/realm/ios/install/#ios-install). But when I do "pod install" I am getting this error:
*Installing Realm (10.0.0-beta.6)
[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup
Downloading dependency: sync 10.0.0-beta.14 from https://static.realm.io/downloads/sync/realm-sync-cocoa-10.0.0-beta.14.tar.xz
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
realm::util::(anonymous namespace)::ensure_reclaimer_thread_runs() in librealm-sync-ios-dbg.a(file_mapper.o)
realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in librealm-sync-ios-dbg.a(terminate.o)
realm::util::network::SecureTransportErrorCategory::message(int) const in librealm-sync-ios-dbg.a(network_ssl.o)
realm::util::network::ssl::Stream::verify_peer() in librealm-sync-ios-dbg.a(network_ssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)*
My podfile is as per instructions:
*platform :ios, '12.0'
target 'TEST' do
use_frameworks!
pod 'RealmSwift', '=10.0.0-beta.6'
end*
I am following the exact instructions and so why is this happening?
I would say the issue could be the podfile or that XCode was initially launched from another location (like a disk image or the downloads folder) and/or there are multiple XCode versions installed.
Podfile:
Looks like it's missing some components or may be malformed (which is why I asked if it was the exact podfile in my comments)
Here's what it should look like
project 'Test.xcodeproj'
target 'Test' do
use_frameworks!
pod 'RealmSwift', '=10.0.0-beta.6'
# ^^^ or whatever the current vers is
end
I just built a brand new MongoDB Realm project with this podfile and it worked correctly.
Also ensure your cocoapods is up-to-date as well. Either
sudo gem install cocoapods
or for us dealing with an error for that
sudo gem install -n /usr/local/bin cocoapods
Be sure you can access the latest Realm versions by ensuring your pods are up-to-date
pod repo update
XCode:
If it was initially launched from another location is won't know where it's files are. The fix is a delete and reinstall from the AppStore and/or realigning it's files with this in terminal:
xcode-select --switch /Applications/Xcode.app
I previously had Firebase connected to my app with the below pods (excluding pod 'Firebase/DynamicLinks) and it was working just fine. I was using the line 'import Firebase' at the top of each view controller to import the relevant frameworks.
However, today I went to add pod 'Firebase/DynamicLinks' and when I went to run pod install, it got stuck 'analyzing dependencies'. I read through other forums on stackoverflow to fix this issue. I ended up removing cocoapods from my project and reinstalling them. I now have reinstalled the pods, but when I open Xcode I get the message 'No such module 'Firebase'. It essentially wants me to import specific Firebase modules [import FirebaseDatabase, import FirebaseAnalytics, etc.] instead of just [import Firebase]. After updating the import on all of my view controllers, there is 1 issue remaining -> 'Framework not found FirebaseUI'.
Questions
Is going from 'import Firebase' to 'import FirebaseDatabase, etc.' recommended or is this a step backwards?
How can I resolve 'Framework not found FirebaseUI'? I have the pod installed already.
Other info that may help
When running pod install, I get a warning notification: [!] [Xcodeproj] Generated duplicate UUIDs
When trying to build project, I also get: ld: warning: directory not found for option '-F/Users/[myNameHere]/Library/Developer/Xcode/DerivedData/[AppName]-dtipemvgjzrgzvephbatansalrwu/Build/Products/Debug-iphonesimulator/Firebase'
As well as: ld: warning: directory not found for option '-F/Users/[myNameHere]/Library/Developer/Xcode/DerivedData/[AppName]-dtipemvgjzrgzvephbatansalrwu/Build/Products/Debug-iphonesimulator/FirebaseUI'
My podfile
pod 'FirebaseUI'
pod 'FirebaseUI/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Analytics'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'Firebase/DynamicLinks' (new)
After rereading the Firebase documentation, it turns out "You no longer need to add the iOS pod Firebase/Core. This SDK included the Firebase SDK for Google Analytics."
I ended up removing Core and the UI Cocoapods (using my own UI buttons instead) and the project now builds. I assume there may be an error installing the UI Framework with the FirebaseUI Cocoapod - idk.
Pods removed:
- pod 'Firebase/Core'
- pod 'FirebaseUI'
- pod 'FirebaseUI/Auth'
- pod 'FirebaseUI/Google'
- pod 'FirebaseUI/Facebook'
I've downloaded the latest Xcode beta 4. When I build I'm getting the same error with 3 of my pods:
Command CompileSwiftSources failed with a nonzero exit code
<unknown>:0: error: unknown argument: '-w'
<unknown>:0: error: unknown argument: '-Xanalyzer'
<unknown>:0: error: unknown argument: '-analyzer-disable-all-checks'
This is the MarqueeLabel pod logs:
I have tried:
Cleaning and deep cleaning (shift + alt + cmd + k)
Deleting the Derived Data folder
Restarting Xcode
I can't see the error listed in the release notes.
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_4_release_notes
Does anyone know what the problem is or a workaround?
There is a known issue with Cocoapods and Xcode 11 Beta 4 where inhibit_all_warnings! causes arguments to be set for Swift which do not compile. Removing this inhibit resolves the issue, and Swift warnings can be inhibited with SWIFT_SUPPRESS_WARNINGS = YES on targets instead.
CocoaPods had a fix for this that got released as part of CocoaPods 1.7.5.
Below is the answer preceding the 1.7.5 release:
If you need to use Xcode 11 Beta 4 in the mean time, you could install a patched version of CocoaPods from that pull request:
1. Open Gemfile, replace gem 'cocoapods' with
gem 'cocoapods', :git => 'https://github.com/dnkoutso/CocoaPods.git', :branch => "swift_compiler_warnings"
2. Run bundle install and bundle exec pod install
Keep in mind, this is a temporary solution.
The latest version of CocoaPods (1.7.5) has this issue fixed!
In Terminal run
sudo gem update cocoapods
And then, on your project directory
pod install
Resolved for me!!!!
The issue is actually i created two files with same name. So after i renamed one of a file and error cleared.
I'm using SQLite.swift. There's an error "Unknown type name 'NS_ASSUME_NONNULL_BEGIN'" when I build the project.
What I do:
create a demo project 'SqlDemo'
under SqlDemo/, create Podfile
use_frameworks!
source 'http://git.oschina.net/akuandev/Specs.git'
pod 'SQLite.swift', git:'https://github.com/stephencelis/SQLite.swift.git'
# pod 'SQLite.swift/Cipher', git: ... # instead, for SQLCipher support
~
then 'pod install'
after that open SqlDemo.xcworkspace
build the project
this maybe a pretty simple error. I'm new to ios dev.