Xcode will build/run but archive fails with "No such module Google" - Swift iOS - xcode

My app has been working fine until Xcode 7.1. In fact, it still runs on both the simulator and iPhone, but when I archive it, I get the error "No such module Google." I have cocoa pods updated to 0.39 and have tried for hours with tweaking the options, from reinstalling cocoa pods to removing the Google Analytics cocoa pod and adding it manually, etc. However, nothing has worked, and whenever I archive the app, I receive an error, yet it still runs fine.
Any thoughts?
Thanks!

Turns out the issue was with Google Analytics for cocoa pods. I completely removed the cocoapod and switched to Flurry.

For me it turned out, that I had forgotten to put
use_frameworks!
into the Podfile. After adding this line and updating the pods it worked. Just make sure to import all modules in all depending classes.
Edit:
Official blog resource from cocoapods

Related

How to handle MISSING_PLUGIN_EXEPTION in Flutter with Firebase Core Plugin on IOS

for several days I have tried to link my Flutter app with Firebase Database. But unfortunately, whenever I want to start debugging the compiler gives back a missing plugin exemption concerning the firebase_core package. I have already seen some entries referring to this issue here on stack overflow but none of them worked for me.
I have already followed the instruction steps by the installation guide on Firebase and included the Google Service File in my Xcode project.
I already did flutter clean, deleted the pods folder and the pod file.lock file in IOS, tried to include the Firebase SDK package by using the add package option in Xcode.
In the past, the connection between my Flutter project and the Firebase Database already worked but somehow it won't work now.
I think that my issue deals with the new step in the installation process for Firebase Connection when I am asked to make use of the Firebase SDK in Xcode.
In the following I'll add some more pictures for illustration. If someone had the same/a similar issue, it would be a huge help for me.
error Message
podfile
main_dart
Xcode runner workspace including google Service
AppDelegate in Xcode
pubspec yaml

Xcode 12 update breaks Pods and Products

I just updated Xcode to version 12. When I open up a previously working project I now get an error No such module 'GRDB'. I have tried deintegrating and reinstalling the Pods, cleaning the build folder, and restarting Xcode. Additionally, when I look under my Pods the Products and Frameworks are colored red (view picture).
One observation: This issue only appears when building for the Simulator, building for the device works fine.
I go to build settings and find the problem my Architectures is arm64:
and I change to Standard architectures for every target in my Pods project :
I came across a "solution". I am not sure why this fixed the problem but when I was running into build issues, I was building for an iOS simulator. If I change the build to "Any iOS Device (arm64)" or to my iPhone then the issue goes away.

Pods : Xcode Library not found for -lGoogleToolboxForMac

Recently I installed cocoapods and wanted to add Firebase analytics to my app. The first time a published the app worked, but now it started showing me that: Library not found for -lGoogleToolboxForMac.
I install again pods but still the same.
What should I do in this case? I mention that I use VirtualBox.
Please ensure successful installation of pods.
Also, after installation close current project .xcodeproj and open up .xcworkspace.

Issue after submitting my app to TestFlight

We have discovered one or more issues with your recent delivery for "AppName". To process your delivery, the following issues must be corrected:
Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team
For me the following worked:
i updated cocoapods if You have troubles doing so this link may help
deleted MyProjectTests (that i wasn't using)
deleted my Pods/ folder and Podfile.lock
made pod install
rebooted my mac
and the problem is gone
I have just seen the problem after install the app in a real device, but crashed (in the simulator works). My app missing a library installed with Cocoapods.

dyld: Library not loaded. Reason : no suitable image found

I've looked at a bunch of answers here and none have fixed my issue.
I have an Xcode workspace with a custom framework and an iOS app project. The project has been working fine until this morning, now it builds but immediately crashes:
dyld: Library not loaded: #rpath/ONCKit.framework/ONCKit
Referenced from: /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/atero_t
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit: mmap() error 1 at address=0x100118000, size=0x000B8000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit
/private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit: mmap() error 1 at address=0x100280000, size=0x000B8000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit
I've been experimenting with build settings all day and I'm just totally lost.
Incase this helps anyone, none of the solutions I kept finding on the web were working for me. Pulled my hair our for 2 days, and tried everything. I revoked in-house cert, new provisioning profile, added files to embedded, etc.
Could not for the life of me figure out what was wrong until I noticed that in Keychain access my Apple WWDR and iOS Distributions certs were being set to "Always Trust" instead of "Use Systems Default". Switched my certs back to "Use Systems Defaults" and everything went back to working as it should. I have no idea why and how this works but it did.
I came across this issue today and resolved it the same way. Revoke and regenerate code signing solves this issue. But to shed some light on the "why" part of it.
Apple went ahead and changed the certificate contents. To be more precise, it added a new "OU" (organizational unit) field under Subject. By revoking and regenerating the code signing, it added the missing field and the problems went away.
It turns out that Xcode cache some device specific stuff which can get mixed up if you are running your apps on multiple devices. The simple fix is to delete Xcode cache. The following command clean it up for you
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
Just changing the code signing profile fixed the issue. Go to Target. Then selected a different option in General->Signing->Team
Just for any other people that, like me, come across this problem more recently and are wondering where and how exactly to revoke which code signing entity (it's in Preferences > Account):
Everything was working fine for me, too, in the morning. I read somewhere else about rebooting. So, before going through another lengthy signing-identities-provisioning-profiles session, I just restarted my machine. And that fixed it apparently without any further efforts needed.
Swift, Xcode 7.3 on OS X 10.11.4.
Clean Xcode's derived data
Launch Finder > Go > Go To Folder > Paste the line below
~/Library/Developer/Xcode/DerivedData
Now restart Xcode.
Well, in my case, I'm using cocoapods, and from the pod files, change:
target 'CoreMotionExample' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for CoreMotionExample
pod 'Firebase/Analytics'
to
target 'CoreMotionExample' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
# Pods for CoreMotionExample
pod 'Firebase/Analytics'
Then things begin to work... I don't know why
my problem was solved by removing "use_frameworks!" and replacing it with "use_modular_headers!" in Podfile and doing pod update and pod install in terminal.
hope this will help you as it did for me after scratching my head for a week in this problem.

Resources