I'm programming in swift and run into an error that my WKWebView turns black after "open link" or "add to photos" in safari.
So I got my WebView and everything works fine. But when I long press on (e.g. an image) the apple-dropdown-menu opens with "open link", "add to reading list", ..., "add to photos". Now when I just close the dropdown menu again and go to home screen and open the app again, the webview turns black. The console says it's loading and didFinish, but I can't see anything. Anyone knows possible issues?
When I pressed "open link" on the dropdown-menu safari opens with that link. But when I move back to my app, the screen turns black. Here is the code of the console after opening my app again.
--------------------- SCENEDELEGATE sceneWillEnterForeground ---------------------
2020-08-13 13:48:38.560642+0200 GMP[1817:418564] [ProcessSuspension] 0x282f2aa00 - WKProcessAssertionBackgroundTaskManager: Ignored request to start a new background task because the application is already in the background
2020-08-13 13:48:38.561286+0200 GMP[1817:418564] [ProcessSuspension] 0x282f2aa00 - WKProcessAssertionBackgroundTaskManager: Ignored request to start a new background task because the application is already in the background
--------------------- SCENEDELEGATE sceneDidBecomeActive ---------------------
currentUrl: https://myWebPage.com/
loadUrl(link: https://myWebPage.com/)
didStartProvisionalNavigation webView(_:didStartProvisionalNavigation:)
didCommit webView(_:didCommit:)
2020-08-13 13:48:39.341814+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ff4db0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x102c8f640; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.341902+0200 GMP[1817:418614] [ProcessSuspension] 0x1094e0438 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1819
2020-08-13 13:48:39.342137+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0438 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.342917+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ff4de0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x1040ae040; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.342998+0200 GMP[1817:418614] [ProcessSuspension] 0x1094e0460 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1817
2020-08-13 13:48:39.343085+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0460 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.343851+0200 GMP[1817:418614] [assertion] Error acquiring assertion: <NSError: 0x282ffcea0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x10415ddb0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.343954+0200 GMP[1817:418614] [ProcessSuspension] 0x1094e0488 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1818
2020-08-13 13:48:39.344028+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e0488 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.905526+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f3b690; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x10414ea00; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.905574+0200 GMP[1817:418815] [ProcessSuspension] 0x1094e20a8 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1819
2020-08-13 13:48:39.905602+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20a8 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.906163+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f39590; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x102d4d0c0; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.906196+0200 GMP[1817:418815] [ProcessSuspension] 0x1094e20d0 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1817
2020-08-13 13:48:39.906218+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20d0 - ProcessAssertion::processAssertionWasInvalidated()
2020-08-13 13:48:39.906769+0200 GMP[1817:418815] [assertion] Error acquiring assertion: <NSError: 0x282f391d0; domain: RBSAssertionErrorDomain; code: 2; reason: "Client is missing required entitlement"> {
userInfo = {
RBSAssertionAttribute = <RBSLegacyAttribute: 0x102c66420; requestedReason: FinishTaskUnbounded; reason: FinishTaskUnbounded; flags: PreventTaskSuspend>;
}
}
2020-08-13 13:48:39.906803+0200 GMP[1817:418815] [ProcessSuspension] 0x1094e20f8 - ProcessAssertion() PID 1817 Unable to acquire assertion for process with PID 1818
2020-08-13 13:48:39.906828+0200 GMP[1817:418564] [ProcessSuspension] 0x1094e20f8 - ProcessAssertion::processAssertionWasInvalidated()
didFinish webView(_:didFinish:)
didSet currentUrl = https://myWebPage.com/
Related
FATAL EXCEPTION: main
Process: PID: 9915
java.lang.NullPointerException: Attempt to invoke virtual method 'float
com.github.mikephil.charting.data.Entry.getX()' on a null object reference
at com.github.mikephil.charting.renderer.LineChartRenderer.drawCubicBezier(LineChartRenderer.java:236)
at enter code herecom.github.mikephil.charting.renderer.LineChartRenderer.drawDataSet(LineChartRenderer.java:123)
at com.github.mikephil.charting.renderer.LineChartRenderer.drawData(LineChartRenderer.java:101)
at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:237)
I have added flutter vlc player to my app. when i go back from vlc player page, the app suddenly crashes.
i have tried direct example from pub.dev to try it out, but it also results into same.
This is my Error
D/apitrace(22547): apitrace: warning: caught signal 6
D/apitrace(22547): call flush from exceptionCallback
F/libc (22547): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 23200
(AWindowHandler), pid 22547 (.webyte.vidflix)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'OPPO/CPH2015/OP4C7D:9/PPR1.180610.011/1640680627:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 22547, tid: 23200, name: AWindowHandler >>> com.webyte.vidflix <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI GetJavaVM called with pending exception java.lang.RuntimeException: Error during detachFromGLContext (see logcat for details)'
here ismy code
#override
void initState() {
super.initState();
_videoPlayerController = VlcPlayerController.network(
'https://media.w3.org/2010/05/sintel/trailer.mp4',
hwAcc: HwAcc.full,
autoPlay: true,
options: VlcPlayerOptions(),
)..initialize();
}
#override
void dispose() async {
super.dispose();
await _videoPlayerController!.stopRendererScanning();
await _videoPlayerController!.dispose();
}
I'm using Flutter stripe_checkout: ^1.0.0 and saw some odd behaviour.
When the checkout button is clicked just once, the screen would turn blank with the following printout. On Stripe dashboard, it says, "Incomplete - The customer has not entered their payment method'.
I/flutter (32631): Checkout session id cs_test_a10k5Lsopaz9JupfebE9pW77ZgUpucfzCrh1WTKX9KcApdbKztnZiz1SKe
I/WebViewFactory(32631): Loading com.google.android.webview version 83.0.4103.106 (code 410410681)
I/cr_VariationsUtils(32631): Requesting new seed from IVariationsSeedServer
I/cr_LibraryLoader(32631): Loaded native library version number "83.0.4103.106"
I/cr_CachingUmaRecorder(32631): Flushed 3 samples from 3 histograms.
I/TetheringManager(32631): registerTetheringEventCallback:com.healthcare.jaaba
W/GooglePlayServicesUtil(32631): Google Play Store is missing.
W/GooglePlayServicesUtil(32631): Google Play Store is missing.
W/GooglePlayServicesUtil(32631): Google Play Store is missing.
W/GooglePlayServicesUtil(32631): Google Play Store is missing.
E/cr_PlatformSer-Internal(32631): UsageReporting query failed
W/ealthcare.jaab(32631): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
D/HostConnection(32631): HostConnection::get() New Host Connection established 0xf4e7e280, tid 752
E/cr_PlatformSer-Internal(32631): Unable to determine Safe Browsing user opt-in preference
D/HostConnection(32631): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation(32631): eglCreateContext: 0xf4e7c140: maj 3 min 0 rcv 3
D/EGL_emulation(32631): eglMakeCurrent: 0xf4e7c140: ver 3 0 (tinfo 0xaf33b210) (first time)
D/EGL_emulation(32631): eglMakeCurrent: 0xf4e60d10: ver 3 0 (tinfo 0xf51b1d50) (first time)
W/Gralloc4(32631): allocator 3.x is not supported
I/VideoCapabilities(32631): Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil(32631): HW encoder for video/avc is not available on this device.
D/EGL_emulation(32631): eglCreateContext: 0xf4e7f1d0: maj 3 min 0 rcv 3
I/ealthcare.jaab(32631): NativeAlloc concurrent copying GC freed 50165(3378KB) AllocSpace objects, 15(428KB) LOS objects, 49% free, 3769KB/7539KB, paused 2.245ms total 147.024ms
W/ealthcare.jaab(32631): Reducing the number of considered missed Gc histogram windows from 124 to 100
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
However, when the checkout button is clicked 3 - 5 times continuously, the card form appears and the payment would be successful.
I/flutter (32631): Checkout session id cs_test_a1ZwZrvL4812TEpjFwQ649RMYjirJr9TMwQVZ29JYrjGj54gmqkCtTyfTW
I/flutter (32631): Checkout session id cs_test_a13D23W9EY1SgLBqYIZLAHTvFBcHKY1wUIiZdr3Kb6XPNsrrLEfj3KJjkj
I/ealthcare.jaab(32631): NativeAlloc concurrent copying GC freed 7125(419KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3431KB/6863KB, paused 1.352ms total 189.441ms
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/flutter (32631): Checkout session id cs_test_a1QsxT2t7H68MpvgLinDukwOBzwW1W21ktnbQdqB25R6t2b0TE5mO4u9jj
I/flutter (32631): Checkout session id cs_test_a1o2VPwBSq0RRW6PlSKnGr554hoWFIOrPy1NZWnLveMqAZyLX6iVYKFr0y
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/flutter (32631): Checkout session id cs_test_a1uWleO9v9VAwUAra957z8uHbpOwNyp24nZYgAQ2aOLHqwt3hBcOtAg8Yf
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/ (1)
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/fingerprinted/js/stripe-a07f9e62b0b55658b30abedf1005cae0.js (1)
I/chatty (32631): uid=10139(com.healthcare.jaaba) identical 1 line
I/chromium(32631): [INFO:CONSOLE(1)] "Unrecognized feature: 'payment'.", source: https://js.stripe.com/v3/fingerprinted/js/stripe-a07f9e62b0b55658b30abedf1005cae0.js (1)
I/Choreographer(32631): Skipped 31 frames! The application may be doing too much work on its main thread.
I/chromium(32631): [INFO:CONSOLE(265)] "Uncaught ReferenceError: PaymentRequest is not defined", source: https://pay.google.com/gp/p/js/pay.js (265)
Flutter Application: checkout_screen.dart
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:stripe_checkout/stripe_checkout.dart';
import 'package:flutter/material.dart';
import '../../../../utils/env.dart';
import '../widgets/example_scaffold.dart';
import '../../../../utils/api_endpoints.dart';
import 'platforms/stripe_checkout.dart' if (dart.library.js)
'platforms/stripe_checkout_web.dart';
class CheckoutScreenExample extends StatefulWidget {
const CheckoutScreenExample({Key? key}) : super(key: key);
#override
_CheckoutScreenExample createState() => _CheckoutScreenExample();
}
class _CheckoutScreenExample extends State<CheckoutScreenExample> {
#override
Widget build(BuildContext context) {
return ExampleScaffold(
title: 'Checkout Page',
padding: const EdgeInsets.all(16),
children: [
const SizedBox(height: 120),
Center(
child: ElevatedButton(
onPressed: checkout,
child: const Text('Open Checkout'),
),
)
],
);
}
Future<void> checkout() async {
final String sessionId = await _createCheckoutSession();
final result = await redirectToCheckout(
context: context,
sessionId: sessionId,
publishableKey: stripePublishableKey,
successUrl: 'https://checkout.stripe.dev/success',
canceledUrl: 'https://checkout.stripe.dev/cancel',
);
if (mounted) {
final text = result.when(
success: () => 'Paid successfully',
canceled: () => 'Checkout canceled',
error: (e) => 'Error $e',
redirected: () => 'Redirected successfully',
);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(text)),
);
}
}
Future<String> _createCheckoutSession() async {
final stripePayURL = Uri.parse(ApiUrl.stripePayUrl);
final response = await http.get(
stripePayURL,
headers: <String, String>{'Authorization': 'Bearer ' + token,
},
);
final Map<String, dynamic> bodyResponse = json.decode(response.body);
final id = bodyResponse['checkout_session_id'] as String;
debugPrint('Checkout session id $id');
return id;
}
}
Flask Backend: billing.py
#api_blueprint.route('/stripe_pay', methods=['GET'])
#token_auth.login_required
def stripe_pay():
cart_id = basic_auth.current_user().id
transaction = Transaction.query.filter(Transaction.cart_id==cart_id).first()
price = stripe.Price.create(
unit_amount=transaction.count_grand_total(),
currency=transaction.currency,
)
session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[{
'price': price,
'quantity': 1,
}],
mode='payment',
success_url=url_for('api.success', cart_id=cart_id, _external=True) + '?cart_id=cart_id' + '?session_id={CHECKOUT_SESSION_ID}',
cancel_url=url_for('home.index', _external=True),
)
return jsonify ({
'checkout_session_id': session['id'],
'checkout_public_key': checkout_public_key,
'cart_id': int(cart_id)
})
I would appreciate if someone show me how to fix this. Thank you.
I'm trying to navigate on my webview but especially on some sites e.g Twitter, and Instagram it stays stuck (You can see the message in the log section). But it works for google, e.a.
Let's consider that I'm running "loadUrl()" for twitter.com again and again. It can load the site successfully. Then I loaded google.com. After that, I tapped the navigationBack which is running goBack() func. It stucks like in logs. But for vice versa, I can go back to google.com
Here are my code snippets:
Future<void> goToSite(String siteUrl) async {
await _controller.future;
final WebViewRequest request = WebViewRequest(
uri: Uri.parse(url),
method: WebViewRequestMethod.get,
);
await _webController.loadRequest(request);
}
Widget browser() {
return WebView(
initialUrl: 'https://${_urlController.text.toLowerCase()}',
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
if (!_controller.isCompleted) {
_controller.complete(webViewController);
_webController = webViewController;
}
print("web created");
},
onProgress: (int progress) {
print('WebView is loading (progress : $progress%)');
if (progress == 100) {
notify();
}
},
navigationDelegate: (NavigationRequest request) {
print('allowing navigation to $request');
return NavigationDecision.navigate;
},
onPageStarted: (String url) {
print('Page started loading: $url');
},
onPageFinished: (String url) {
print('Page finished loading: $url');
},
gestureNavigationEnabled: true,
backgroundColor: const Color(0x00000000),
);
}
I'm using this method to navigate:
await _webController.goBack();
await _webController.goForward();
When I tapped goBack I got this repetitive error:
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efaee0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=10293, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efaf40 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=10293, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
flutter: Page started loading: https://mobile.twitter.com/
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efb060 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=10294, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efb0c0 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=10294, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
flutter: Page started loading: https://mobile.twitter.com/
I couldn't find the reason. How can I fix this issue?
I am trying to implement an Google AdMob banner ad in my swift application and it simply doesn't show up. I extended the plist to the following.
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-???</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
...
</array>
Edited AppDelegate.swift...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GADMobileAds.sharedInstance().start(completionHandler: nil)
return true
}
And implemented the banner in my ViewController...
import UIKit
import GoogleMobileAds
class ViewController: UIViewController {
...
private let banner: GADBannerView = {
let banner = GADBannerView()
banner.adUnitID = "ca-app-pub-???/???"
banner.load(GADRequest())
banner.backgroundColor = .secondarySystemBackground
return banner
}()
override func viewDidLoad() {
super.viewDidLoad()
banner.rootViewController = self
view.addSubview(banner)
...
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
banner.frame = CGRect(x: 0, y: view.frame.size.height-50, width: view.frame.size.width, height: 50)
}
...
}
This code causes the following error and the banner doesn't show up:
2022-02-18 19:12:45.453836+0100 TestApp[70970:5163578] <Google> To get test ads on this device, set:
Objective-C
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = #[ GADSimulatorID ];
Swift
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ GADSimulatorID ]
2022-02-18 19:12:45.464778+0100 TestApp[70970:5163713] - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-???
2022-02-18 19:12:45.520401+0100 TestApp[70970:5163714] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.520411+0100 TestApp[70970:5163713] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.520643+0100 TestApp[70970:5163714] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.520657+0100 TestApp[70970:5163718] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.520824+0100 TestApp[70970:5163714] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.520939+0100 TestApp[70970:5163718] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.522075+0100 TestApp[70970:5163718] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.522129+0100 TestApp[70970:5163718] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
2022-02-18 19:12:45.522084+0100 TestApp[70970:5163714] - <Google>[I-ACS023007] Analytics v.81200000 started
2022-02-18 19:12:45.522389+0100 TestApp[70970:5163714] - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see xxx)
2022-02-18 19:12:45.552092+0100 TestApp[70970:5163578] Writing analzed variants.
2022-02-18 19:12:45.588346+0100 TestApp[70970:5163718] - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2022-02-18 19:12:45.616229+0100 TestApp[70970:5163578] Writing analzed variants.
2022-02-18 19:12:45.636629+0100 TestApp[70970:5163578] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000178d2c0> F8BB1C28-BAE8-???
2022-02-18 19:12:45.692429+0100 TestApp[70970:5163721] - <Google>[I-ACS023012] Analytics collection enabled
2022-02-18 19:12:45.912031+0100 TestApp[70970:5163717] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics
Initialisation of GADBannerView is might be wrong in your project as they need adSize as frame
this working fine on my application , I have working production ads,
class HomePageViewController: UIViewController {
private var adMobBannerView1: GADBannerView!
private var adMobBannerView2: GADBannerView!
override func viewDidLoad() {
setupAdMobBannerAD()
}
private func setupAdMobBannerAD() {
let sizeForBanner = GADAdSizeFromCGSize(.init(width: view.frame.width, height: 50))
// here you need to intilise GADBannerView with adSize of GADAdSizeFromCGSize
adMobBannerView1 = GADBannerView(adSize: sizeForBanner)
adMobBannerView2 = GADBannerView(adSize: sizeForBanner)
adMobBannerView1.translatesAutoresizingMaskIntoConstraints = false
adMobBannerView2.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(adMobBannerView1)
view.addSubview(adMobBannerView2)
adMobBannerView1.delegate = self
adMobBannerView2.delegate = self
NSLayoutConstraint.activate([
adMobBannerView1.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor),
adMobBannerView1.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor),
adMobBannerView2.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor , constant: 20 ),
adMobBannerView2.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor),
])
adMobBannerView2.adUnitID = Constants.secondAdBannerString
// I have saved my bannerID String in another class don't worry about this
adMobBannerView2.rootViewController = self
adMobBannerView1.adUnitID = Constants.firstAdBannerString
// I have saved my bannerID String in another class don't worry about this
adMobBannerView1.rootViewController = self
adMobBannerView2.load(GADRequest())
adMobBannerView1.load(GADRequest())
}
}
you want to add some delegate to get informed by admob if there is any problem with your ad account or something
extension HomePageViewController : GADBannerViewDelegate {
func bannerView(_ bannerView: GADBannerView, didFailToReceiveAdWithError error: Error) {
print("admob banner ad failecd to show going to represent adolony \n")
if DataModel.shared.showAdmobAd {
self.requestAdColonyBanners()
// any alternative method can be performed here as we this function will be called by admob incase you didn't get banner ad , in my case I m launching ads form another ad service called adcolony
}
}
}