diff --git a/example/ios/reactnativedeviceactivityexample.xcodeproj/project.pbxproj b/example/ios/reactnativedeviceactivityexample.xcodeproj/project.pbxproj index dd6a64b..f348f10 100644 --- a/example/ios/reactnativedeviceactivityexample.xcodeproj/project.pbxproj +++ b/example/ios/reactnativedeviceactivityexample.xcodeproj/project.pbxproj @@ -11,14 +11,14 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 24076609638B40C29AD3691D /* ShieldAction.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 2A3C8096FCD54C04AD745FB6 /* ShieldAction.entitlements */; }; + 24076609638B40C29AD3691D /* generated.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 2A3C8096FCD54C04AD745FB6 /* generated.entitlements */; }; 35FEA156B28F4E06B56A39C6 /* DeviceActivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E01EDC40AAA54847A43C3F99 /* DeviceActivity.framework */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; - 3EC70A358F3D42C69DFBA42F /* ActivityMonitorExtension.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 98E197012252434F88CCEEB4 /* ActivityMonitorExtension.entitlements */; }; + 3EC70A358F3D42C69DFBA42F /* generated.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 98E197012252434F88CCEEB4 /* generated.entitlements */; }; 588D2F5C6FA8454AA654A3C3 /* ShieldAction.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 55BEF032CC20441DA94ED74D /* ShieldAction.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7196272736B8369F7352BB3C /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 86C617632690A9F3C5D768FE /* PrivacyInfo.xcprivacy */; }; 96905EF65AED1B983A6B3ABC /* libPods-reactnativedeviceactivityexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-reactnativedeviceactivityexample.a */; }; - 984C7C2718574054BF6481E3 /* ShieldConfiguration.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 630F9328E9134A4D9F0874A2 /* ShieldConfiguration.entitlements */; }; + 984C7C2718574054BF6481E3 /* generated.entitlements in Sources */ = {isa = PBXBuildFile; fileRef = 630F9328E9134A4D9F0874A2 /* generated.entitlements */; }; A9A0307C2CFF148E00D9E7E8 /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B2DBE72CECAE610001BBAF /* Shared.swift */; }; A9B2DBE82CECAE610001BBAF /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B2DBE72CECAE610001BBAF /* Shared.swift */; }; A9B2DBE92CECAE610001BBAF /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B2DBE72CECAE610001BBAF /* Shared.swift */; }; @@ -92,15 +92,15 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = main.m; path = reactnativedeviceactivityexample/main.m; sourceTree = ""; }; 1413C6DF9E3E4F8795DD1144 /* ManagedSettingsUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; fileEncoding = 4; includeInIndex = 1; name = ManagedSettingsUI.framework; path = System/Library/Frameworks/ManagedSettingsUI.framework; sourceTree = SDKROOT; }; 22B2DFD666844CC6A73BAB9B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2A3C8096FCD54C04AD745FB6 /* ShieldAction.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = ShieldAction.entitlements; sourceTree = ""; }; + 2A3C8096FCD54C04AD745FB6 /* generated.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = generated.entitlements; sourceTree = ""; }; 55BEF032CC20441DA94ED74D /* ShieldAction.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; fileEncoding = 4; includeInIndex = 0; path = ShieldAction.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-reactnativedeviceactivityexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; fileEncoding = 4; includeInIndex = 0; path = "libPods-reactnativedeviceactivityexample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 630F9328E9134A4D9F0874A2 /* ShieldConfiguration.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = ShieldConfiguration.entitlements; sourceTree = ""; }; + 630F9328E9134A4D9F0874A2 /* generated.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = generated.entitlements; sourceTree = ""; }; 6C2E3173556A471DD304B334 /* Pods-reactnativedeviceactivityexample.debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativedeviceactivityexample.debug.xcconfig"; path = "Target Support Files/Pods-reactnativedeviceactivityexample/Pods-reactnativedeviceactivityexample.debug.xcconfig"; sourceTree = ""; }; 7A4D352CD337FB3A3BF06240 /* Pods-reactnativedeviceactivityexample.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativedeviceactivityexample.release.xcconfig"; path = "Target Support Files/Pods-reactnativedeviceactivityexample/Pods-reactnativedeviceactivityexample.release.xcconfig"; sourceTree = ""; }; 84457EAD9B9F41CDA5B58B4E /* ActivityMonitorExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; fileEncoding = 4; includeInIndex = 0; path = ActivityMonitorExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 86C617632690A9F3C5D768FE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ../targets/ShieldConfiguration/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 98E197012252434F88CCEEB4 /* ActivityMonitorExtension.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = ActivityMonitorExtension.entitlements; sourceTree = ""; }; + 98E197012252434F88CCEEB4 /* generated.entitlements */ = {isa = PBXFileReference; explicitFileType = text.plist.entitlements; fileEncoding = 4; includeInIndex = 0; path = generated.entitlements; sourceTree = ""; }; A9A030712CFF142000D9E7E8 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; fileEncoding = 4; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; A9B2DBE72CECAE610001BBAF /* Shared.swift */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = Shared.swift; path = ../../ios/Shared.swift; sourceTree = ""; }; A9B2DBFF2CECB91A0001BBAF /* DeviceActivityMonitorExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = DeviceActivityMonitorExtension.swift; path = ../../targets/ActivityMonitorExtension/DeviceActivityMonitorExtension.swift; sourceTree = ""; }; @@ -122,32 +122,9 @@ /* Begin PBXFileSystemSynchronizedRootGroup section */ A9A030722CFF142000D9E7E8 /* Tests */ = { isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); path = Tests; sourceTree = ""; }; - XX39D67B16C97D546C2A68XX /* ShieldAction */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); - path = ShieldAction; - sourceTree = ""; - }; - XXBEF4732D652A763B01C2XX /* ShieldConfiguration */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); - path = ShieldConfiguration; - sourceTree = ""; - }; - XXC76190DB8B2D90600E9FXX /* ActivityMonitorExtension */ = { - isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); - path = ActivityMonitorExtension; - sourceTree = ""; - }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -214,7 +191,7 @@ 2CA754293FC5430EBFCBDD04 /* ShieldAction */ = { isa = PBXGroup; children = ( - 2A3C8096FCD54C04AD745FB6 /* ShieldAction.entitlements */, + 2A3C8096FCD54C04AD745FB6 /* generated.entitlements */, 22B2DFD666844CC6A73BAB9B /* Info.plist */, A9B2DC032CECB9600001BBAF /* ShieldActionExtension.swift */, ); @@ -284,7 +261,7 @@ AE110DB5899B4D8887B5B8C9 /* ActivityMonitorExtension */ = { isa = PBXGroup; children = ( - 98E197012252434F88CCEEB4 /* ActivityMonitorExtension.entitlements */, + 98E197012252434F88CCEEB4 /* generated.entitlements */, 10F48954B51344E7AF350E1B /* Info.plist */, A9B2DBFF2CECB91A0001BBAF /* DeviceActivityMonitorExtension.swift */, ); @@ -314,9 +291,6 @@ D0AD29FCE88C41BC90BA7D10 /* ShieldConfiguration */, 2CA754293FC5430EBFCBDD04 /* ShieldAction */, AE110DB5899B4D8887B5B8C9 /* ActivityMonitorExtension */, - XXC76190DB8B2D90600E9FXX /* ActivityMonitorExtension */, - XX39D67B16C97D546C2A68XX /* ShieldAction */, - XXBEF4732D652A763B01C2XX /* ShieldConfiguration */, ); name = "expo:targets"; sourceTree = ""; @@ -324,7 +298,7 @@ D0AD29FCE88C41BC90BA7D10 /* ShieldConfiguration */ = { isa = PBXGroup; children = ( - 630F9328E9134A4D9F0874A2 /* ShieldConfiguration.entitlements */, + 630F9328E9134A4D9F0874A2 /* generated.entitlements */, AEB321985C804DE4AB33EC69 /* Info.plist */, A9B2DC012CECB9430001BBAF /* ShieldConfigurationExtension.swift */, ); @@ -364,9 +338,6 @@ ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - XX39D67B16C97D546C2A68XX /* ShieldAction */, - ); name = ShieldAction; productName = ShieldAction; productReference = 55BEF032CC20441DA94ED74D /* ShieldAction.appex */; @@ -412,9 +383,6 @@ ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - XXBEF4732D652A763B01C2XX /* ShieldConfiguration */, - ); name = ShieldConfiguration; productName = ShieldConfiguration; productReference = EEEB0A38EA724033BF060181 /* ShieldConfiguration.appex */; @@ -453,9 +421,6 @@ ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - XXC76190DB8B2D90600E9FXX /* ActivityMonitorExtension */, - ); name = ActivityMonitorExtension; productName = ActivityMonitorExtension; productReference = 84457EAD9B9F41CDA5B58B4E /* ActivityMonitorExtension.appex */; @@ -709,7 +674,7 @@ files = ( A9B2DBE92CECAE610001BBAF /* Shared.swift in Sources */, A9B2DC002CECB91A0001BBAF /* DeviceActivityMonitorExtension.swift in Sources */, - 3EC70A358F3D42C69DFBA42F /* ActivityMonitorExtension.entitlements in Sources */, + 3EC70A358F3D42C69DFBA42F /* generated.entitlements in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -726,7 +691,7 @@ buildActionMask = 2147483647; files = ( A9B2DBE82CECAE610001BBAF /* Shared.swift in Sources */, - 24076609638B40C29AD3691D /* ShieldAction.entitlements in Sources */, + 24076609638B40C29AD3691D /* generated.entitlements in Sources */, A9B2DC042CECB9600001BBAF /* ShieldActionExtension.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -736,7 +701,7 @@ buildActionMask = 2147483647; files = ( A9B2DBEA2CECAE610001BBAF /* Shared.swift in Sources */, - 984C7C2718574054BF6481E3 /* ShieldConfiguration.entitlements in Sources */, + 984C7C2718574054BF6481E3 /* generated.entitlements in Sources */, A9B2DC022CECB9430001BBAF /* ShieldConfigurationExtension.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -901,10 +866,7 @@ LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; @@ -963,10 +925,7 @@ ); LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/example/targets/ActivityMonitorExtension/expo-target.config.js b/example/targets/ActivityMonitorExtension/expo-target.config.js index c350f24..78724a5 100644 --- a/example/targets/ActivityMonitorExtension/expo-target.config.js +++ b/example/targets/ActivityMonitorExtension/expo-target.config.js @@ -1,6 +1,18 @@ -/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').Config} */ -const config = { - type: "device-activity-monitor", +const { + default: getAppGroupFromExpoConfig, +} = require("react-native-device-activity/config-plugin/getAppGroupFromExpoConfig"); + +/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').ConfigFunction} */ +const config = (config) => { + const appGroup = getAppGroupFromExpoConfig(config); + + return { + type: "device-activity-monitor", + entitlements: { + "com.apple.developer.family-controls": true, + "com.apple.security.application-groups": [appGroup], + }, + }; }; module.exports = config; diff --git a/example/targets/ActivityMonitorExtension/ActivityMonitorExtension.entitlements b/example/targets/ActivityMonitorExtension/generated.entitlements similarity index 100% rename from example/targets/ActivityMonitorExtension/ActivityMonitorExtension.entitlements rename to example/targets/ActivityMonitorExtension/generated.entitlements diff --git a/example/targets/ShieldAction/expo-target.config.js b/example/targets/ShieldAction/expo-target.config.js index db7023a..a604ff8 100644 --- a/example/targets/ShieldAction/expo-target.config.js +++ b/example/targets/ShieldAction/expo-target.config.js @@ -1,6 +1,18 @@ -/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').Config} */ -const config = { - type: "shield-action", +const { + default: getAppGroupFromExpoConfig, +} = require("react-native-device-activity/config-plugin/getAppGroupFromExpoConfig"); + +/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').ConfigFunction} */ +const config = (config) => { + const appGroup = getAppGroupFromExpoConfig(config); + + return { + type: "shield-action", + entitlements: { + "com.apple.developer.family-controls": true, + "com.apple.security.application-groups": [appGroup], + }, + }; }; module.exports = config; diff --git a/example/targets/ShieldAction/ShieldAction.entitlements b/example/targets/ShieldAction/generated.entitlements similarity index 100% rename from example/targets/ShieldAction/ShieldAction.entitlements rename to example/targets/ShieldAction/generated.entitlements diff --git a/example/targets/ShieldConfiguration/expo-target.config.js b/example/targets/ShieldConfiguration/expo-target.config.js index 8ac5b3d..cd9674c 100644 --- a/example/targets/ShieldConfiguration/expo-target.config.js +++ b/example/targets/ShieldConfiguration/expo-target.config.js @@ -1,6 +1,18 @@ -/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').Config} */ -const config = { - type: "shield-configuration", +const { + default: getAppGroupFromExpoConfig, +} = require("react-native-device-activity/config-plugin/getAppGroupFromExpoConfig"); + +/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').ConfigFunction} */ +const config = (config) => { + const appGroup = getAppGroupFromExpoConfig(config); + + return { + type: "shield-configuration", + entitlements: { + "com.apple.developer.family-controls": true, + "com.apple.security.application-groups": [appGroup], + }, + }; }; module.exports = config; diff --git a/example/targets/ShieldConfiguration/ShieldConfiguration.entitlements b/example/targets/ShieldConfiguration/generated.entitlements similarity index 100% rename from example/targets/ShieldConfiguration/ShieldConfiguration.entitlements rename to example/targets/ShieldConfiguration/generated.entitlements diff --git a/targets/ActivityMonitorExtension/expo-target.config.js b/targets/ActivityMonitorExtension/expo-target.config.js index b36d886..78724a5 100644 --- a/targets/ActivityMonitorExtension/expo-target.config.js +++ b/targets/ActivityMonitorExtension/expo-target.config.js @@ -2,7 +2,7 @@ const { default: getAppGroupFromExpoConfig, } = require("react-native-device-activity/config-plugin/getAppGroupFromExpoConfig"); -/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').Config} */ +/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').ConfigFunction} */ const config = (config) => { const appGroup = getAppGroupFromExpoConfig(config); diff --git a/targets/ShieldConfiguration/expo-target.config.js b/targets/ShieldConfiguration/expo-target.config.js index 3544c27..cd9674c 100644 --- a/targets/ShieldConfiguration/expo-target.config.js +++ b/targets/ShieldConfiguration/expo-target.config.js @@ -2,7 +2,7 @@ const { default: getAppGroupFromExpoConfig, } = require("react-native-device-activity/config-plugin/getAppGroupFromExpoConfig"); -/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').Config} */ +/** @type {import('@kingstinct/expo-apple-targets/build/config-plugin').ConfigFunction} */ const config = (config) => { const appGroup = getAppGroupFromExpoConfig(config);