Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(modules): add ti.applesignin 1.1.0 module #11186

Merged
merged 5 commits into from Sep 4, 2019

Conversation

sgtcoolguy
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-27127

Description:
This packages the 1.1.0 release of ti.applesignin with SDK builds.

@build
Copy link
Contributor

build commented Aug 28, 2019

Fails
🚫 Tests have failed, see below for more information.
Messages
📖 ❌ 1 tests have failed There are 1 tests failing and 227 skipped out of 2261 total tests.
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.

Tests:

ClassnameNameTimeError
ios.os#hostname() returns Ti.Platform.address value0.001
Error: expected '' to equal undefined
fail@file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/node_modules/should/cjs/should.js:275:23
value@file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/node_modules/should/cjs/should.js:356:23
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/os.test.js:123:31
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4376:41
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4763:17
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4840:23
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4688:20
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4698:15
next@file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4636:30
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:4665:13
timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/A4D657E1-8DBA-4260-B8D2-C42E1A9F52AB/data/Containers/Bundle/Application/D4790AEB-48FC-4813-915A-01FB04A2DA67/mocha.app/ti-mocha.js:5764:29

Generated by 🚫 dangerJS against bb8f4d1

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR Passed.

@sgtcoolguy
Copy link
Contributor Author

Looks like this zip of the module has a busted version in the manifest - I think we'll need a new release/zip cut and then I can update this PR to use that instead. cc @vijaysingh-axway

@sgtcoolguy
Copy link
Contributor Author

Ok, just re-verified the zip and it does have the correct version in the manifest. Setting to in-qe-test.

@sgtcoolguy
Copy link
Contributor Author

Note that I have temporarily deleted our fork of hansemann/titanium-apple-sign-in so that @hansemannn can transfer ownership over. So for now I'm updating this PR to point at the 1.1.0 release on his repo (since ours is now gone). The zip file is the same, which is why the integrity hash remains the same.

@sgtcoolguy
Copy link
Contributor Author

Note that this PR should be squash merged when ready since it has multiple commits just changing the URL as we moved the repository around (still pointing at the same release zip/contents).

@ssjsamir ssjsamir self-requested a review September 4, 2019 14:54
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed: Able to use the Apple sign in feature and verify the module is bundled with the SDK.

Test Steps:

  1. Created a Titanium application
  2. Added the ti.applesignin module to the project
  3. Added the following entitlements to the tiapp.xml:
<entitlements>
	<key>com.apple.developer.applesignin</key>
	<array>
  		<string>Default</string>
	</array>
</entitlements>
  1. Created a identifier for the apple authentication service: (Device testing) https://developer.apple.com/account/resources/identifiers/list
  2. Added the identifier to the provisioning file for the app: (Device testing) https://developer.apple.com/account/resources/profiles/list
  3. Added the following test case to the application:
var AppleSignIn = require('ti.applesignin');

AppleSignIn.addEventListener('login', function (event) {
  if (!event.success) {
    alert(event.error);
    return;
  }

  Ti.API.warn(event);
});

var win = Ti.UI.createWindow({
  backgroundColor: '#fff'
});

var btn = AppleSignIn.createLoginButton({ width: 280, height: 38 });

btn.addEventListener('click', function () {
  AppleSignIn.authorize();
});

win.add(btn);
win.open();
  1. Ensured device is logged into an apple account
  2. Ran the application
  3. Clicked Sign in with apple
  4. Authorised sign in by following the steps provided by apple.
  5. Tested various styling options, example test case:
var AppleSignin = require('ti.applesignin');
        var win = Ti.UI.createWindow({
            backgroundColor: '#fff'
        });
        var signInButton = AppleSignin.createLoginButton({
            type: AppleSignin.BUTTON_TYPE_SIGNIN,
            style: AppleSignin.BUTTON_STYLE_BLACK,
            top: 150,
            height: 50,
            width: 300,
            borderRadius: 10
        });
        signInButton.addEventListener('click', function () {
            AppleSignin.authorize({
                scopes: [AppleSignin.AUTHORIZATION_SCOPE_EMAIL, AppleSignin.AUTHORIZATION_SCOPE_FULLNAME]
            });
        });
        AppleSignin.addEventListener('login', function (e) {
            if (e.success === true) {
                    alert('Login successfully');
                } else {
                    alert('Login failed');
                }
        });
        win.add(signInButton);
        win.open();

Test Environment

MacOS Mojave version 10.14.4
Xcode 10.2.1
Xcode 11 beta 5
Node.js ^8.11.1
"NPM":"4.2.14","CLI":"7.1.1-master.6"

@sgtcoolguy sgtcoolguy merged commit c77441a into tidev:master Sep 4, 2019
@sgtcoolguy sgtcoolguy deleted the ti.applesignin branch September 4, 2019 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants