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
Conversation
Tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR Passed.
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 |
Ok, just re-verified the zip and it does have the correct version in the manifest. Setting to in-qe-test. |
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. |
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). |
There was a problem hiding this 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:
- Created a Titanium application
- Added the
ti.applesignin
module to the project - Added the following entitlements to the
tiapp.xml
:
<entitlements>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</entitlements>
- Created a identifier for the
apple authentication service
: (Device testing) https://developer.apple.com/account/resources/identifiers/list - Added the identifier to the provisioning file for the app: (Device testing) https://developer.apple.com/account/resources/profiles/list
- 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();
- Ensured device is logged into an apple account
- Ran the application
- Clicked
Sign in with apple
- Authorised sign in by following the steps provided by apple.
- 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"
JIRA: https://jira.appcelerator.org/browse/TIMOB-27127
Description:
This packages the 1.1.0 release of
ti.applesignin
with SDK builds.