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

feat(ios): support iOS 13 background task API #12411

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

vijaysingh-axway
Copy link
Contributor

@vijaysingh-axway vijaysingh-axway commented Jan 23, 2021

https://jira.appcelerator.org/browse/TIMOB-27864

Test Case -

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

const label = Ti.UI.createLabel({
    text: 'Background task',
});

win.add(label);
win.open();

Ti.App.iOS.registerBackgroundTask({
	'identifier': 'com.test.bgrefresh',
	'type': Ti.App.iOS.BACKGROUND_TASK_TYPE_REFRESH,
});

Ti.App.iOS.registerBackgroundTask({
	'identifier': 'com.test.bgprocessing',
	'type': Ti.App.iOS.BACKGROUND_TASK_TYPE_PROCESS,
	'powerConnect': true,
	'networkConnect': true
});

Ti.App.iOS.addEventListener('backgroundfetch', function(e) {
    Ti.API.info('backgroundfetch: ' + JSON.stringify(e));

    label.text = 'backgroundfetch';

    Ti.App.iOS.endBackgroundHandler(e.handlerId);
});

Ti.App.iOS.addEventListener('backgroundprocess', function(e) {
    Ti.API.info('backgroundprocess: ' + JSON.stringify(e));

    label.text = 'backgroundprocess';
 
    Ti.App.iOS.endBackgroundHandler(e.handlerId);
});

@build
Copy link
Contributor

build commented Jan 23, 2021

Warnings
⚠️

Commit 715805a3b74870ce61dfc35b279e4a23ee874352 has a message "doc(ios): fixed docs" giving 1 errors:

  • type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]
⚠️

Commit 53aa06ce197990818718bb265d84a1f409cd2ae3 has a message "doc(ios): fixed linting issue" giving 1 errors:

  • type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]
⚠️ This PR has milestone set to 10.0.0, but the version defined in package.json is 10.1.0 Please either: - Update the milestone on the PR - Update the version in package.json - Hold the PR to be merged later after a release and version bump on this branch
Messages
📖

🚨 This PR has one or more commits with warnings/errors for commit messages not matching our configuration. You may want to squash merge this PR and edit the message to match our conventions, or ask the original developer to modify their history.

📖

✅ All tests are passing
Nice one! All 14303 tests are passing.
(There are 955 skipped tests not included in that total)

📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS against 3476343

@build build added the docs label Jan 26, 2021
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m Outdated Show resolved Hide resolved
iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
apidoc/Titanium/App/iOS/iOS.yml Outdated Show resolved Hide resolved
@hansemannn hansemannn removed this from the 10.0.0 milestone Mar 21, 2022
Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

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

Reviewed and updated the docs to match the target release (10.2.0).

@hansemannn
Copy link
Collaborator

@m1ga @joshualambert The CLI check fails. What do we do with PR's that came from the Appc times? @vijaysingh-axway Are you still here? :) In case you are, would you mind signing the TiDev CLA, so we can merge this? https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md

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