Skip to content

Commit

Permalink
Merge branch 'master' into 230729_gradle_files
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Apr 27, 2024
2 parents 303901a + 115bbb2 commit 094fe67
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ today and benefit from 1:1 sessions with the core team, exclusive modules, merch

Learn more about sponsoring TiDev, the organization behind the Titanium SDK, [here](https://github.com/sponsors/tidev) 🚀.

<!-- sponsors --><a href="https://github.com/Topener"><img src="https://github.com/Topener.png" width="60px" alt="Rene Pot" /></a><a href="https://github.com/phobeous"><img src="https://github.com/phobeous.png" width="60px" alt="Rodrigo Farfán" /></a><a href="https://github.com/jasonkneen"><img src="https://github.com/jasonkneen.png" width="60px" alt="Jason Kneen" /></a><a href="https://github.com/de1mat"><img src="https://github.com/de1mat.png" width="60px" alt="Matt Delmarter" /></a><a href="https://github.com/dlewis23"><img src="https://github.com/dlewis23.png" width="60px" alt="dlewis23" /></a><a href="https://github.com/dethier1958"><img src="https://github.com/dethier1958.png" width="60px" alt="Daniel Ethier" /></a><a href="https://github.com/AvinashDalvi89"><img src="https://github.com/AvinashDalvi89.png" width="60px" alt="Avinash Dalvi" /></a><a href="https://github.com/zenjoe"><img src="https://github.com/zenjoe.png" width="60px" alt="Joe Kniesek" /></a><a href="https://github.com/desarrollogotit"><img src="https://github.com/desarrollogotit.png" width="60px" alt="" /></a><a href="https://github.com/Astrovic"><img src="https://github.com/Astrovic.png" width="60px" alt="Vittorio Sorbera" /></a><a href="https://github.com/Arood"><img src="https://github.com/Arood.png" width="60px" alt="Marcus Olovsson" /></a><a href="https://github.com/Rearmachine"><img src="https://github.com/Rearmachine.png" width="60px" alt="" /></a><a href="https://github.com/alexlarocca"><img src="https://github.com/alexlarocca.png" width="60px" alt="Alessandro La Rocca" /></a><a href="https://github.com/reshopper"><img src="https://github.com/reshopper.png" width="60px" alt="Reshopper" /></a><a href="https://github.com/safadig"><img src="https://github.com/safadig.png" width="60px" alt="Gus" /></a><a href="https://github.com/designbymind"><img src="https://github.com/designbymind.png" width="60px" alt="Jason David Miller" /></a><a href="https://github.com/greatschism"><img src="https://github.com/greatschism.png" width="60px" alt="Michael Zaladonis" /></a><a href="https://github.com/enzoq"><img src="https://github.com/enzoq.png" width="60px" alt="Vincenzo Quacquarelli" /></a><a href="https://github.com/mighty-office"><img src="https://github.com/mighty-office.png" width="60px" alt="Mighty GmbH" /></a><a href="https://github.com/Fruugul"><img src="https://github.com/Fruugul.png" width="60px" alt="Fruugul" /></a><a href="https://github.com/petervaradi"><img src="https://github.com/petervaradi.png" width="60px" alt="" /></a><a href="https://github.com/korelogic"><img src="https://github.com/korelogic.png" width="60px" alt="Korelogic Limited" /></a><a href="https://github.com/Lowgun5"><img src="https://github.com/Lowgun5.png" width="60px" alt="" /></a><!-- sponsors -->
<!-- sponsors --><a href="https://github.com/Topener"><img src="https://github.com/Topener.png" width="60px" alt="Rene Pot" /></a><a href="https://github.com/phobeous"><img src="https://github.com/phobeous.png" width="60px" alt="Rodrigo Farfán" /></a><a href="https://github.com/jasonkneen"><img src="https://github.com/jasonkneen.png" width="60px" alt="Jason Kneen" /></a><a href="https://github.com/de1mat"><img src="https://github.com/de1mat.png" width="60px" alt="Matt Delmarter" /></a><a href="https://github.com/dlewis23"><img src="https://github.com/dlewis23.png" width="60px" alt="dlewis23" /></a><a href="https://github.com/dethier1958"><img src="https://github.com/dethier1958.png" width="60px" alt="Daniel Ethier" /></a><a href="https://github.com/AvinashDalvi89"><img src="https://github.com/AvinashDalvi89.png" width="60px" alt="Avinash Dalvi" /></a><a href="https://github.com/zenjoe"><img src="https://github.com/zenjoe.png" width="60px" alt="Joe Kniesek" /></a><a href="https://github.com/desarrollogotit"><img src="https://github.com/desarrollogotit.png" width="60px" alt="" /></a><a href="https://github.com/Astrovic"><img src="https://github.com/Astrovic.png" width="60px" alt="Vittorio Sorbera" /></a><a href="https://github.com/Arood"><img src="https://github.com/Arood.png" width="60px" alt="Marcus Olovsson" /></a><a href="https://github.com/Rearmachine"><img src="https://github.com/Rearmachine.png" width="60px" alt="" /></a><a href="https://github.com/alexlarocca"><img src="https://github.com/alexlarocca.png" width="60px" alt="Alessandro La Rocca" /></a><a href="https://github.com/reshopper"><img src="https://github.com/reshopper.png" width="60px" alt="Reshopper" /></a><a href="https://github.com/safadig"><img src="https://github.com/safadig.png" width="60px" alt="Gus" /></a><a href="https://github.com/designbymind"><img src="https://github.com/designbymind.png" width="60px" alt="Jason David Miller" /></a><a href="https://github.com/greatschism"><img src="https://github.com/greatschism.png" width="60px" alt="Michael Zaladonis" /></a><a href="https://github.com/enzoq"><img src="https://github.com/enzoq.png" width="60px" alt="Vincenzo Quacquarelli" /></a><a href="https://github.com/mighty-office"><img src="https://github.com/mighty-office.png" width="60px" alt="Mighty GmbH" /></a><a href="https://github.com/Fruugul"><img src="https://github.com/Fruugul.png" width="60px" alt="Fruugul" /></a><a href="https://github.com/petervaradi"><img src="https://github.com/petervaradi.png" width="60px" alt="" /></a><a href="https://github.com/korelogic"><img src="https://github.com/korelogic.png" width="60px" alt="Korelogic Limited" /></a><!-- sponsors -->

## Features

Expand Down
2 changes: 1 addition & 1 deletion android/titanium/libv8-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async function generateSnapshot(v8SnapshotHeaderFilePath, rollupFileContent) {
}

// Delete snapshot blob.
await fs.unlink(blobPath);
await fs.remove(blobPath);
}

// Generate 'V8Snapshots.h' from template
Expand Down
9 changes: 4 additions & 5 deletions apidoc/Titanium/App/Properties/Properties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ description: |
Then, you can retrieve the property during runtime with the following API call:
``` js
var foo = Ti.App.Properties.getString('foo');
const foo = Ti.App.Properties.getString('foo');
```
As of Release 3.2.0, any application properties defined in the `tiapp.xml` file are stored in the
Any application properties defined in the `tiapp.xml` file are stored in the
device's secure storage, making them read-only. Additionally, external access to these
properties is now restricted. Other iOS applications cannot access these properties and
native Android modules must use the Titanium module API TiApplication.getAppProperties()
Expand All @@ -33,9 +33,8 @@ description: |
If you need to change the values during runtime, initially create the property with these APIs
rather than defining them in the `tiapp.xml` file.
Prior to Release 3.2.0, application properties defined in the `tiapp.xml` file could be
overwritten by these APIs and accessed externally by other applications and modules.
**Important**: Using this API in the Apple ecosystem requires the `NSPrivacyAccessedAPICategoryUserDefaults`
property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
extends: Titanium.Module
since: "0.5"

Expand Down
3 changes: 3 additions & 0 deletions apidoc/Titanium/App/iOS/UserDefaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ summary: |
The UserDefaults module is used for storing application-related data in property/value pairs
that persist beyond application sessions and device power cycles. UserDefaults allows the suiteName
of the UserDefaults to be specified at creation time.
**Important**: Using this API requires the `NSPrivacyAccessedAPICategoryUserDefaults` property set in the
privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
description: |
Unlike Titanium.App.Properties, Titanium.App.iOS.UserDefaults does not pull properties defined in the `tiapp.xml` file.
Expand Down
9 changes: 9 additions & 0 deletions apidoc/Titanium/Filesystem/File.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ methods:
summary: Returns the creation Date for the file identified by this file object.
description: |
On Android, returns a Date whose `getTime()` value is 0 for resource files.
**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryFileTimestamp`
property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
returns:
type: Date
platforms: [iphone, ipad, android, macos]
Expand Down Expand Up @@ -255,6 +258,9 @@ methods:
summary: Returns the last modification Date for the file identified by this file object.
description: |
On Android, returns a Date whose `getTime()` value is 0 for resource files.
**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryFileTimestamp`
property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
returns:
type: Date
platforms: [iphone, ipad, android, macos]
Expand Down Expand Up @@ -346,6 +352,9 @@ methods:
identified by this file object is stored.
description: |
Free space is returned in bytes.
**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryDiskSpace`
property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
returns:
type: Number

Expand Down
3 changes: 3 additions & 0 deletions apidoc/Titanium/Platform/Platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ properties:

- name: uptime
summary: System uptime since last boot in seconds.
description: |
**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategorySystemBootTime`
property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).
type: Number
permission: read-only
platforms: [android, iphone, ipad, macos]
Expand Down
2 changes: 2 additions & 0 deletions iphone/Classes/PlatformModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,12 @@ - (NSString *)macaddress
}
GETTER_IMPL(NSString *, macaddress, Macaddress);

#ifdef USE_TI_PLATFORMUPTIME
- (NSNumber *)uptime
{
return [NSNumber numberWithDouble:[[NSProcessInfo processInfo] systemUptime]];
}
#endif

- (NSString *)identifierForVendor
{
Expand Down
8 changes: 4 additions & 4 deletions iphone/Classes/TiFilesystemBlobProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ -(id)name \

- (NSDate *)createTimestamp:(id)unused
{
DEPRECATED_REPLACED(@"Filesystem.File.createTimestamp()", @"7.3.0", @"Filesystem.File.createdAt()");
return [self createdAt:unused];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.Blob.createTimestamp()", @"7.3.0", @"12.4.0", @"Filesystem.File.createdAt()");
return [NSDate new];
}

- (NSDate *)createdAt:(id)unused
Expand All @@ -106,8 +106,8 @@ - (NSDate *)createdAt:(id)unused

- (NSDate *)modificationTimestamp:(id)unused
{
DEPRECATED_REPLACED(@"Filesystem.File.modificationTimestamp()", @"7.3.0", @"Filesystem.File.modifiedAt()");
return [self modifiedAt:nil];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.File.modificationTimestamp()", @"7.3.0", @"12.4.0", @"Filesystem.File.modifiedAt()");
return [NSDate new];
}

- (NSDate *)modifiedAt:(id)unused
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ - (NSNumber *)readonly

- (NSDate *)createTimestamp
{
DEPRECATED_REPLACED(@"Filesystem.File.createTimestamp", @"7.3.0", @"Filesystem.File.createdAt()");
return [self createdAt:nil];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.File.createTimestamp", @"7.3.0", @"12.4.0", @"Filesystem.File.createdAt()");
return [NSDate new];
}

- (NSDate *)createTimestamp:(id)unused
{
DEPRECATED_REPLACED(@"Filesystem.File.createTimestamp()", @"7.3.0", @"Filesystem.File.createdAt()");
return [self createdAt:unused];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.File.createTimestamp()", @"7.3.0", @"12.4.0", @"Filesystem.File.createdAt()");
return [NSDate new];
}

#ifdef USE_TI_FILESYSTEMCREATEDAT
- (NSDate *)createdAt:(id)unused
{
NSError *error = nil;
Expand All @@ -82,19 +83,21 @@ - (NSDate *)createdAt:(id)unused
}
return result;
}
#endif

- (NSDate *)modificationTimestamp
{
DEPRECATED_REPLACED(@"Filesystem.File.modificationTimestamp", @"7.3.0", @"Filesystem.File.modifiedAt()");
return [self modifiedAt:nil];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.File.modificationTimestamp", @"7.3.0", @"12.4.0", @"Filesystem.File.modifiedAt()");
return [NSDate new];
}

- (NSDate *)modificationTimestamp:(id)unused
{
DEPRECATED_REPLACED(@"Filesystem.File.modificationTimestamp()", @"7.3.0", @"Filesystem.File.modifiedAt()");
return [self modifiedAt:nil];
DEPRECATED_REPLACED_REMOVED(@"Filesystem.File.modificationTimestamp()", @"7.3.0", @"12.4.0", @"Filesystem.File.modifiedAt()");
return [NSDate new];
}

#ifdef USE_TI_FILESYSTEMMODIFIEDAT
- (NSDate *)modifiedAt:(id)unused
{
NSError *error = nil;
Expand All @@ -104,6 +107,7 @@ - (NSDate *)modifiedAt:(id)unused
}
return [resultDict objectForKey:NSFileModificationDate];
}
#endif

- (NSNumber *)symbolicLink
{
Expand Down Expand Up @@ -147,6 +151,7 @@ - (NSArray *)getDirectoryListing:(id)args
return resultArray;
}

#ifdef USE_TI_FILESYSTEMSPACEAVAILABLE
- (NSNumber *)spaceAvailable:(id)unused
{
NSError *error = nil;
Expand All @@ -157,6 +162,7 @@ - (NSNumber *)spaceAvailable:(id)unused
}
return [resultDict objectForKey:NSFileSystemFreeSize];
}
#endif

- (NSString *)getProtectionKey:(id)args
{
Expand Down
Loading

0 comments on commit 094fe67

Please sign in to comment.