Obscure issue, Google AdMob SDK, XCode 8.2 + Cocoapods integration - swift

I have come across a really strange issue that has kept me busy for over a week which i believe to be a bug with the GoogleAdMob SDK, Xcode 8.2, cocoapods or a combination of those.
I am posting it here, in hopes an engineer can confirm the bug and point our team in the right direction to resolution.
The problem goes like this:
Create an empty Xcode project
Add/Install GoogleAds-IMA-iOS-SDK-For-AdMob pod
Commit everything and delete the repository from local machine
Check out repository again
Hit Build. Project will fail to build with error ld: framework not found GoogleMobileAds
To fix, comment out the GoogleAds-IMA-iOS-SDK-For-AdMob pod and run pod update, then uncomment it again and run pod update again, project will build.
If you try to commit at this point, git will pick up no changes
Repeat steps 3 and 4, and you will be back at step 5
I have created a repository here https://github.com/piterwilson/testAdmob where the bug can be reproduced.
The 'fix' that i have found will not work for our team as we commit our code and send it to a Jenkins server that creates a lot of builds with different code signatures required by our business.
The Jenkins build always fails with ld: framework not found GoogleMobileAds
Extra information : This has only happened starting this year. Maybe because of Xcode 8.2 (?) but we can't be sure where the problem is exactly.

I created a PR that resolves the issue in a reliable manner: https://github.com/piterwilson/testAdmob/pull/1
The repository was missing the GoogleAdMobs binary. It's a rather large file (38M), so perhaps the submitter of the question has some local configuration that automatically ignores large files? The binary should have been in this commit: https://github.com/piterwilson/testAdmob/commit/a0834a4d2f2b82da98add1bc3c49d8c0c28ffd86 (at least that's when it appeared for me when I tried to reproduce the issue.)

Related

DevTools Lighthouse: Best Practices displays "..." as a Deprecation/Warning

I'm testing the performance of my website with Lighthouse DevTool but I can't score 100% in Best Practices because keeps showing this as a problem:
Does anybody know what this means? How could I solve it?
You can find the specific errors in the "Issues" tab where the "Console" output is.
Also getting this, so you're not alone. Wondering if it was a recent Chrome bug I tried here - https://www.webpagetest.org/ and got the same useless error.
After a bit more digging, I found this closed issue on the lighthouse github repo.
https://github.com/GoogleChrome/lighthouse/issues/14233
So, it's been fixed, but only in version 10. Chrome 105 seems to be using lighthouse 9.6.2 and npm at the present time seems to install 9.6.7 (which has the same bug).
You can run the latest version by pulling the repo from github, building and running on the command line. See instructions here
https://github.com/GoogleChrome/lighthouse#develop
Note, the build doesn't work on an M1 mac, due to i386 specific build tools. I had to dig out my old macbook to get this working.

Workflow to upgrade a Flutter project/application

I have several Flutter projects that I have been working with for some time. Some a rather new and others are older. I constantly upgrade my Flutter SDK and switch between stable and beta channels. Everything works but the newer projects have different file layouts, for example .gitignore in android/ios folders, new XCode config files etc.
How do I update an older project to the new layout so as if it was just generated with flutter create?
Also there is this .metadata file generated which makes no sense to me. It never gets updated and only has it's project_type read by flutter_tools during flutter create. What is this for, why is it not being updated to the correct channel/rev?
Due to my research for the former question, I have run flutter create . in an existing project which generates some new files. Is this the only way, together with manually diffing to a new pristine project? And why is the .metadata file still outdated?
If anyone has some insights or documentation links regarding this, that would be great. I didn't find anything.
Update:
Apparently one can update the initially generated Flutter configuration files by re-running flutter create ..
Old:
Somewhat answering my own question here.
On March 3rd a commit was added to Flutter that added the notion of migrations to the iOS template/configuration (https://github.com/flutter/flutter/commit/e491544588e8d34fdf31d5f840b4649850ef167a).
These migrations take care of bringing the XCode configuration files to the latest version.
This commit has been ported back until Flutter 1.15.x.
This a great step forward. Hopefully similar migrations will be added for Android configurations and basic project files in the future.

Where can I find the latest Movesense Showcase app source?

According to https://www.movesense.com/news/2020/02/movesense-showcase-ios-app-is-now-open-source/ the showcase app source is open source. But the source code that’s there in the repo is at least couple of versions behind in terms of UI.
Is there an updated repo location for the latest? Our client is looking at the app in AppStore thinking the source code should be the same.
Well, the source code in the repository is exactly the same as has been used for generating and compiling the app store version. Could you please make sure you are using the master branch of this repo: https://bitbucket.org/suunto/movesense-mobile-lib/ ?
Also, please make sure that you are opening the folder MovesenseShowcase in xcode, not IOS-example (which is the old example app for iOS)
In addition, please make sure you are using Xcode 11 (latest) and following the instructions in readme.md

How to resolve this Xcode Server Bot Integration Error?

I am new to CI. I am trying to integrate. I am using Xcode Server & Bots btw. I have followed this tutorial:
Xcode 10 CI- Medium
So, when I integrate I get this error:
As you can see these are the errors which I am getting. I do not have these pods now as I have removed both these pods. Why does it give me errors?
When I started developing I pushed pods to the source control and now, these a days I just push the Podfile and not the pods. Is this the reason? How can I resolve it?
And, if everything goes well, what will happen when I integrate like the new code will add up in my Xcode, like when we pull?

No such module 'FBAudienceNetwork' in XCode 9 Swift 4

I installed the FBAudienceNetwork (version 4.26.0) with CocoaPods (version 1.3.1). I followed the official manual as published at https://developers.facebook.com/docs/audience-network/ios, but the Xcode still not recognized the framework.
Just to be clear - I opened the project from xcworkspace file.
I tried the following steps with no success:
Install the framework manually, adding the ~/Documents/FacebookSDK path to Framework Search Path
Make sure that the pods project compiled using Swift 4
Added also FBSDKCoreKit (with Bolts) and FBSDKShareKit (both frameworks imported successfully)
Clean the project, delete DerivedData and also clean the pods cache and reinstalling the pods
Nothing worked so far. Anyone faced the same issue and know the reason?
Fixed in v4.27.0
Another solution that uses latest SDK (until Facebook fixes this) is to add a line to your Objc bridging header:
#import <FBAudienceNetwork/FBAudienceNetwork.h>
Of course this assumes you are using a bridging header, and if you're not then you could add one but that defeats the point of using modules. Hopefully Facebook fixes this soon.
I'm also seeing the same problem. I'm watching the Facebook bug report, but it's already been closed so I don't have high hopes of it being fixed anytime soon. Facebook suggested adding "$(SRCROOT)" to your Framework Search Paths as a work around, but it didn't work for me.
For now, I've manually locked my "FBAudienceNetwork" pod to version 4.25.0 with the following line in my Podfile:
pod 'FBAudienceNetwork', '4.25.0'
Try this solution it will fix your issue.
You need to rename FBAudienceNetwork.modulemap to module.modulemap in FBAudienceNetwork.framework/Modules folder.
v4.26
From the audience network installation guide
Good luck
Following this post:
https://developers.facebook.com/bugs/185968218614056/
and after downgrade to version 4.23 (supported by MoPub mediation as written here: https://github.com/mopub/mopub-ios-sdk/wiki/Integrating-Native-Third-Party-Ad-Networks) the integration is working (by adding the framework manually).
This is a bug in 4.26 version, so anyone that encourage the same issue, you have to wait for Facebook fixing this bug. I recommend to subscribe and follow the discussion I posted.
It works when I'm using only the framework within the "static" folder.