<?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>iOs &#8211; Tjitjing Blog</title>
	<atom:link href="http://localhost/index.php/tag/ios/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>Mon, 11 Jul 2022 09:22:51 +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>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>
		<item>
		<title>Tutorial: Sign in with Apple (SIWA) and Ionic, Cordova, AngularFire, Firebase</title>
		<link>https://blog.tjitjing.com/index.php/2020/01/tutorial-sign-in-with-apple-siwa-and-ionic-cordova-angularfire-firebase.html</link>
					<comments>https://blog.tjitjing.com/index.php/2020/01/tutorial-sign-in-with-apple-siwa-and-ionic-cordova-angularfire-firebase.html#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Wed, 29 Jan 2020 13:14:22 +0000</pubDate>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[Cordova]]></category>
		<category><![CDATA[Ionic Framework]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Angular]]></category>
		<category><![CDATA[AngularFire]]></category>
		<category><![CDATA[AngularFire2]]></category>
		<category><![CDATA[Firebase]]></category>
		<category><![CDATA[Ionic]]></category>
		<category><![CDATA[Ionic4]]></category>
		<category><![CDATA[iOs]]></category>
		<category><![CDATA[Sign in with Apple]]></category>
		<category><![CDATA[SIWA]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=794</guid>

					<description><![CDATA[Since a few months back Apple does not approve apps that have only social media login (ie not good old fashioned username and password) unless it also has &#8220;Sign in with Apple&#8221; (SIWA) All this is probably too new for it to be any good tutorials or examples available, at least I could not find&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2020/01/tutorial-sign-in-with-apple-siwa-and-ionic-cordova-angularfire-firebase.html">Continue reading <span class="screen-reader-text">Tutorial: Sign in with Apple (SIWA) and Ionic, Cordova, AngularFire, Firebase</span></a>]]></description>
										<content:encoded><![CDATA[
<p>Since a few months back Apple does not approve apps that have only social media login (ie not good old fashioned username and password) unless it also has &#8220;<strong>Sign in with Apple</strong>&#8221; (SIWA)</p>



<p>All this is probably too new for it to be any good tutorials or examples available, at least I could not find any and I spent quite some time looking. I also spent quite a few hours getting it to work, but here it is: </p>



<h2>Solution</h2>



<p>I used the plugin <a href="https://github.com/pscsrv/cordova-plugin-apple-login" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">cordova-plugin-apple-login</a> (version 1.0.0) so go ahead and install it using:</p>



<pre class="wp-block-preformatted">npm i cordova-plugin-apple-login<br>ionic cordova plugin add cordova-plugin-apple-login</pre>



<p>Note that there is no Ionic Native wrapper for the plugin, so you have to declare it instead of importing it on your page:</p>



<pre class="wp-block-preformatted">declare var SignInWithApple: any;</pre>



<p>This is the login function:</p>



<pre class="wp-block-preformatted"> loginWithApple() {<br><br>    SignInWithApple.request({requestedScopes: [ SignInWithApple.Scope.Email, SignInWithApple.Scope.FullName ]})<br>    .then((appleCredential) =&gt; {<br>      const credential =  new firebase.auth.OAuthProvider('apple.com').credential(appleCredential.identityToken);<br>      this.afAuth.auth.signInWithCredential(credential)<br>      .then((response) =&gt; {<br>        console.log('Login successful');<br>      })<br>      .catch((error) =&gt; {<br>        console.log(error);<br>        alert('error:' + JSON.stringify(error));<br>      });<br>    });<br><br>  }</pre>



<p>This was done using Ionic 4 / Angular, AngularFire2 5.30 and the cordova-plugin-apple-login 1.0.0</p>



<h2>Configuration</h2>



<p>You also have to do some configurations&#8230;</p>



<p>-&gt; Xcode: Add capability for Sign in with Apple<br>-&gt; Apple Developer:&nbsp;<a href="https://developer.apple.com/account/resources/identifiers/serviceId/add/" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Add Services id</a><br>-&gt; Firebase console: Add Sign-in method for Apple, leave all fields blank if you only use on iOS</p>



<p>If you want to support Android and or Web / PWA, you will need to do some more configuring.</p>



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



<p>Please comment if it did, or if you had a problem with it. Also if you got it working (or not) using other versions of plugins, frameworks etc or if you found a better solution – it will help others! </p>



<p>P.s. I also posted this solution to <a href="https://stackoverflow.com/a/59967026/2820510" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Stack Overflow</a> (my first anwer there, yay!)</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2020/01/tutorial-sign-in-with-apple-siwa-and-ionic-cordova-angularfire-firebase.html/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Xcode and Bitbucket gives Authentication Failed</title>
		<link>https://blog.tjitjing.com/index.php/2018/02/xcode-and-bitbucket-gives-authentication-failed.html</link>
					<comments>https://blog.tjitjing.com/index.php/2018/02/xcode-and-bitbucket-gives-authentication-failed.html#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Mon, 19 Feb 2018 11:00:41 +0000</pubDate>
				<category><![CDATA[Bitbucket]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[iOs]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=774</guid>

					<description><![CDATA[When cloning a Bitbucket repository from Xcode (using current version 9.2) I get Authentication failed. Solution is to insert Password into URL. Steps: Copy repository URL from Bitbucket &#8211; Overview, select HTTPS (not SSH) Paste it in to Xcode Clone window for Adding GitHub account (for example click &#8220;Clone an existing Project&#8221; from Xcode start&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2018/02/xcode-and-bitbucket-gives-authentication-failed.html">Continue reading <span class="screen-reader-text">Xcode and Bitbucket gives Authentication Failed</span></a>]]></description>
										<content:encoded><![CDATA[<p>When cloning a Bitbucket repository from Xcode (using current version 9.2) I get Authentication failed.</p>
<p><strong>Solution is to insert Password into URL</strong>.</p>
<p>Steps:</p>
<ol>
<li>Copy repository URL from Bitbucket &#8211; Overview, select HTTPS (not SSH)</li>
<li>Paste it in to Xcode Clone window for Adding GitHub account (for example click &#8220;Clone an existing Project&#8221; from Xcode start screen)</li>
<li>Before clicking the Clone button, edit the url to insert your Bitbucket password.<br />
Url looks something like this:<br />
https://username@bitbucket.org/xxx/yourproject.git<br />
Add password like this, colon and your password:<br />
https://username/<strong>:password</strong>@bitbucket.org/xxx/yourproject.git</li>
<li>Click Clone button and it should work</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2018/02/xcode-and-bitbucket-gives-authentication-failed.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Windows cannot connect to iPhone Personal Hotspot</title>
		<link>https://blog.tjitjing.com/index.php/2015/10/windows-cannot-connect-to-iphone-personal-hotspot.html</link>
					<comments>https://blog.tjitjing.com/index.php/2015/10/windows-cannot-connect-to-iphone-personal-hotspot.html#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Wed, 21 Oct 2015 05:56:03 +0000</pubDate>
				<category><![CDATA[Mobile Internet]]></category>
		<category><![CDATA[Mobile Phone]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[iOs]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Wifi]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=722</guid>

					<description><![CDATA[I have ran into this a few times so I thougt I&#8217;d write down the solution as I seem to keep forgetting it. There are probably tons of other problems you can have with iPhone Personal Hotspot and Windows Wifi but this is the solution to one I keep running into. Problem I turn on&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2015/10/windows-cannot-connect-to-iphone-personal-hotspot.html">Continue reading <span class="screen-reader-text">Windows cannot connect to iPhone Personal Hotspot</span></a>]]></description>
										<content:encoded><![CDATA[<p>I have ran into this a few times so I thougt I&#8217;d write down the solution as I seem to keep forgetting it. There are probably tons of other problems you can have with <strong>iPhone Personal Hotspot</strong> and <strong>Windows Wifi</strong> but this is the solution to one I keep running into.</p>
<h2>Problem</h2>
<p>I turn on the Personal Hotspot on my iPhone and it shows up fine as an available Wifi network in Windows only the Wifi name looks a little off in Windows compared to the iPhone. My iPhone name is &#8220;Max&#8217;s iPhone&#8221; but in Windows the <strong>apostrophe</strong> looks &#8220;scrambled&#8221; and is replaced by two &#8220;trash&#8221; characters, something like this: &#8220;Max¿Ǝ iPhone&#8221;.</p>
<p>When I try to connect my Windows laptop over Wifi it just keeps trying to connect &#8211; showing message &#8220;<strong>Checking network requirements</strong>&#8221; &#8211; before I finally get &#8220;<strong>Can&#8217;t connect to this network</strong>&#8220;. On the iPhone I get the blue Personal Hotspot field on top of the screen flashing on and off while Windows tries to connect.</p>
<h2>Solution</h2>
<p><strong>Solution is to change the name of your iPhone to remove or replace the apostrophe.</strong></p>
<p>To change name of your iPhone in iOS: Settings &#8211; General &#8211; About &#8211; Name</p>
<h2>More info</h2>
<p>I just fixed this and unfortunately cannot recreate or remember exact what the scrambled or trash characters in my iPhone name looked like but I think one of the characters was an upside down letter E and/or question mark. So it looks something like this &#8220;Max¿Ǝ iPhone&#8221;.</p>
<p>So this seems to be what messes things up for Windows.</p>
<p>For me it has worked both to remove the apostrophe or replace it, ie delete it and then type it again. The name will look the same in your iPhone but after this it will also look ok in Windows Wifi selection and Windows should be able to connect to your iPhone Personal Hotspot without any problem.</p>
<p>It seems this problem keeps reoccuring for me. I do not use Personal Hotspot that often so I&#8217;m not sure when or why this reoccurence happens but my best guess is that an iOS upgrade or switching to a new device and installing from backup may be the cause.</p>
<p>Currently running iOS 9.0.2 on an iPhone 6 and Windows 10 but I have had this problem in previous versions of both iOS and Windows.</p>
<h2>Did this solution work for you?</h2>
<p>Please let me and others know by commenting, provide what version of Windows and iOS you are using if you know it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2015/10/windows-cannot-connect-to-iphone-personal-hotspot.html/feed</wfw:commentRss>
			<slash:comments>37</slash:comments>
		
		
			</item>
	</channel>
</rss>
