<?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>Cordova &#8211; Tjitjing Blog</title>
	<atom:link href="http://localhost/index.php/tag/cordova/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>Wed, 29 Jan 2020 13:14:22 +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>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>Ionic Cordova Error &#8211; ENOENT: no such file or directory</title>
		<link>https://blog.tjitjing.com/index.php/2018/12/ionic-cordova-error-enoent-no-such-file-or-directory.html</link>
					<comments>https://blog.tjitjing.com/index.php/2018/12/ionic-cordova-error-enoent-no-such-file-or-directory.html#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Fri, 28 Dec 2018 14:14:53 +0000</pubDate>
				<category><![CDATA[App Development]]></category>
		<category><![CDATA[Cordova]]></category>
		<category><![CDATA[Ionic]]></category>
		<guid isPermaLink="false">http://blog.tjitjing.com/?p=787</guid>

					<description><![CDATA[When trying to build (&#8220;ionic cordova build ios&#8221;) my Ionic Cordova project, I got this error: &#8220;Error: ENOENT: no such file or directory&#8220;. Took me awhile to figure out since I had just copied the project from an older project, made a few changes etc. Turns out the cause was that I had used a&#8230; <a class="more-link" href="https://blog.tjitjing.com/index.php/2018/12/ionic-cordova-error-enoent-no-such-file-or-directory.html">Continue reading <span class="screen-reader-text">Ionic Cordova Error &#8211; ENOENT: no such file or directory</span></a>]]></description>
										<content:encoded><![CDATA[
<p></p>



<p>When trying to build (&#8220;ionic cordova build ios&#8221;) my Ionic Cordova project, I got this error: &#8220;<strong>Error: ENOENT: no such file or directory</strong>&#8220;.</p>



<p>Took me awhile to figure out since I had just copied the project from an older project, made a few changes etc. Turns out the cause was that I had used a slash (&#8220;/&#8221;) in the app <strong>name in config.xml</strong>, changing the name fixed the issue.</p>



<p>[code]Copying iOS template project to /xxx/platforms/ios<br>shell.js: internal error<br>Error: ENOENT: no such file or directory, rename &#8216;/xxx/platforms/ios/__TEMP__.xcodeproj&#8217; -> &#8216;/xxx/platforms/ios/project/name.xcodeproj&#8217;<br>at Object.renameSync (fs.js:594:3)<br>at /xxx/node_modules/cordova-ios/node_modules/shelljs/src/mv.js:77:8<br>at Array.forEach (&lt;anonymous>)<br>at Object._mv (/xxx/node_modules/cordova-ios/node_modules/shelljs/src/mv.js:53:11)<br>at Object.mv (/xxx/node_modules/cordova-ios/node_modules/shelljs/src/common.js:186:23)<br>at copyTemplateFiles (/xxx/node_modules/cordova-ios/bin/lib/create.js:124:11)<br>at Object.exports.createProject (/xxx/node_modules/cordova-ios/bin/lib/create.js:228:5)<br>at Api.createPlatform (/xxx/node_modules/cordova-ios/bin/templates/scripts/cordova/Api.js:122:14)<br>at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:188:28<br>at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:854:54<br>[ERROR] An error occurred while running subprocess cordova.<br>cordova platform add ios &#8211;verbose &#8211;save exited with exit code 1.<br>Re-running this command with the &#8211;verbose flag may provide more information. [/code]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tjitjing.com/index.php/2018/12/ionic-cordova-error-enoent-no-such-file-or-directory.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
