<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Capacitor &#8211; Tjitjing Blog</title>
	<atom:link href="http://localhost/index.php/tag/capacitor/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.tjitjing.com/</link>
	<description>This is my blog on technology related stuff and on occation other things too...</description>
	<lastBuildDate>Sun, 02 Oct 2022 07:16:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.16</generator>
	<item>
		<title>Capacitor 4 upgrade gives processDebugManifest Android Build error</title>
		<link>https://blog.tjitjing.com/index.php/2022/10/capacitor-4-upgrade-gives-processdebugmanifest-android-build-error.html</link>
					<comments>https://blog.tjitjing.com/index.php/2022/10/capacitor-4-upgrade-gives-processdebugmanifest-android-build-error.html#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Sun, 02 Oct 2022 07:16:47 +0000</pubDate>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[Cordova]]></category>
		<category><![CDATA[Ionic Framework]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Android Studio]]></category>
		<category><![CDATA[Capacitor]]></category>
		<category><![CDATA[Error Message]]></category>
		<guid isPermaLink="false">https://blog.tjitjing.com/?p=856</guid>

					<description><![CDATA[Check your Cordova plugins if you get :capacitor-cordova-android-plugins:processDebugManifest error after upgrading to Capacitor4 Problem After upgrading to Capacitor 4 everything worked fine when buidling using ionic cap sync (I am using Ionic Framework) and worked fine in Xcode and iOS. However, when building in Android Studio I got this error: :capacitor-cordova-android-plugins:processDebugManifestManifest merger failed with multiple&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2022/10/capacitor-4-upgrade-gives-processdebugmanifest-android-build-error.html">Continue reading <span class="screen-reader-text">Capacitor 4 upgrade gives processDebugManifest Android Build error</span></a>]]></description>
										<content:encoded><![CDATA[
<p><strong>Check your Cordova plugins if you get :capacitor-cordova-android-plugins:processDebugManifest error after upgrading to Capacitor4</strong></p>



<h2>Problem</h2>



<p>After upgrading to Capacitor 4 everything worked fine when buidling using <code>ionic cap sync</code> (I am using Ionic Framework) and worked fine in Xcode and iOS. <strong>However, when building in Android Studio I got this error:</strong></p>



<p><code>:capacitor-cordova-android-plugins:processDebugManifest<br>Manifest merger failed with multiple errors, see logs</code></p>



<h2>Solution</h2>



<p>The error message does not give much of a hint but after lots of trials, I found out that one of my Cordova plugins was the cause. In my case it was <strong>onesignal-cordova-plugin</strong> that was on version 2.11.4 and needed to be upgraded to version 3. So a simple <code>npm i onesignal-cordova-plugin@3</code> solved this problem for me.</p>



<h2>Did this solution help you?</h2>



<p>I hope this helped!&nbsp;<strong>Please comment</strong>&nbsp;if it did, or if you had any problem with it. Also let me know if you got it working (or not) using other versions or if you found a better solution –&nbsp;<strong>it will help me and others!</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2022/10/capacitor-4-upgrade-gives-processdebugmanifest-android-build-error.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Get Capacitor iOS to log to console.app</title>
		<link>https://blog.tjitjing.com/index.php/2022/07/get-capacitor-ios-to-log-to-console-app.html</link>
					<comments>https://blog.tjitjing.com/index.php/2022/07/get-capacitor-ios-to-log-to-console-app.html#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Mon, 11 Jul 2022 09:11:08 +0000</pubDate>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Ionic Framework]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Capacitor]]></category>
		<category><![CDATA[console.app]]></category>
		<category><![CDATA[Ionic]]></category>
		<category><![CDATA[iOs]]></category>
		<guid isPermaLink="false">https://blog.tjitjing.com/?p=843</guid>

					<description><![CDATA[Solution on how to get Capacitor to log to the iOS Device log / Native log that can be read from console.app. This is a must if you need to debug an approved and published App Store production app. Problem with Capacitor logging Capacitor only logs to the Xcode console (or Safari console) but not&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2022/07/get-capacitor-ios-to-log-to-console-app.html">Continue reading <span class="screen-reader-text">Get Capacitor iOS to log to console.app</span></a>]]></description>
										<content:encoded><![CDATA[
<p><strong>Solution on how to get Capacitor to log to the iOS Device log / Native log that can be read from console.app. This is a must if you need to debug an approved and published App Store production app.</strong></p>



<h2>Problem with Capacitor logging</h2>



<p>Capacitor only logs to the Xcode console (or Safari console) but not to the iOS device console (aka the native log), for example from your <strong>Capacitor plugins</strong> or <strong>Cordova plugins</strong>, or <strong>console.log</strong> and <strong>console.debug</strong> statements in your code.</p>



<p>Having the debug log in Xcode or Safari only is fine when debugging during development or in Testflight. But once your app is published to the AppStore and has some specific error that does not show in dev or Testflight, you need to have log write to the iOS device log, which can be read by <strong>console.app on your Mac</strong>. </p>



<h2>Solution</h2>



<p>There is a <a rel="noreferrer noopener" href="https://github.com/ionic-team/capacitor/issues/2320" target="_blank">Capacitor feature request</a> regarding this but if you don&#8217;t want to wait for that, this is <strong>how to quickly fix it in your project</strong>:</p>



<ol><li>Open the file capacitor/ios/Capacitor/Capacitor/CAPLog.swift either from your favourite editor or directly in Xcode.</li><li>Comment out the line starting with Swift.print</li><li>Instead add the line: NSLog(String(describing: item))</li></ol>



<pre class="wp-block-code"><code>public class CAPLog {
    public static var enableLogging: Bool = true

    public static func print(_ items: Any..., separator: String = " ", terminator: String = "\n") {
        if enableLogging {
            for (itemIndex, item) in items.enumerated() {
                //Swift.print("\(item)".prefix(4068), terminator: itemIndex == items.count - 1 ? terminator : separator)
                NSLog(String(describing: item))
            }
        }
    }
}</code></pre>



<p>Now you are ready to build and upload to Apple App Store. Once approved by Apple, start debugging your production build in console.app.</p>



<p>This was tested using Capacitor 3.6.0 / @capacitor/ios 3.6.0 (on an Ionic Framework 6 project)</p>



<h3>Note on performance</h3>



<p>Swift.print is a more resource effective, but also more limited, way of logging. I doubt that this has much practical impact, but this is something to consider, you may want to revert back to Swift.print after you&#8217;re done debugging. </p>



<h3>Note on logging</h3>



<p>I used NSLog but there are also other ways to use logging that you may want to look into. For example Logger and Apple&#8217;s concept of <a rel="noreferrer noopener" href="https://developer.apple.com/documentation/os/logging" data-type="URL" data-id="https://developer.apple.com/documentation/os/logging" target="_blank">Universal logging / Unified logging system</a>.</p>



<p></p>



<h2>Did this solution help you?</h2>



<p>I hope this helped!&nbsp;<strong>Please comment</strong>&nbsp;if it did, or if you had any problem with it. Also let me know if you got it working (or not) using other versions or if you found a better solution –&nbsp;<strong>it will help me and others!</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2022/07/get-capacitor-ios-to-log-to-console-app.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
