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

fix(ios): fix privacy-related Filesystem APIs #14062

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Jun 11, 2024

This fixes an issue from the RC where the privacy-guards for createdAt, modifiedAt and spaceAvailable would be compiled out. With this approach, the privacy error is fixed, as the APIs are only accessed when directly being called by the user.

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

const btn = Ti.UI.createButton({
	title: 'Trigger'
});

btn.addEventListener('click', () => {
	const file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'test.txt');
	file.write('Test');

	console.warn('createdAt', file.createdAt());
	console.warn('modifiedAt', file.modifiedAt());
	console.warn('spaceAvailable', file.spaceAvailable());
	console.warn('uptime', Ti.Platform.uptime);
});

win.add(btn);
win.open();

@hansemannn hansemannn changed the title fix: move privacy-related files to own file outside TitaniumKit fix(ios): fix privacy-related Filesystem APIs Jun 11, 2024
@hansemannn hansemannn merged commit aeae4d9 into tidev:master Jun 12, 2024
5 checks passed
@hansemannn hansemannn deleted the fix/filesystem-checks branch June 12, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant