Commit 501198d0 authored by Wei Han's avatar Wei Han Committed by alep

ios progress (need to test on physical device)

parent 7a905f79
...@@ -119,14 +119,18 @@ export default function App() { ...@@ -119,14 +119,18 @@ export default function App() {
setStatuses(prev => ({ ...prev, [perm.key]: result })); setStatuses(prev => ({ ...prev, [perm.key]: result }));
} }
} }
if (Platform.OS as string === 'ios') {
Alert.alert(
"Enable Caller ID",
"Go to Settings → Phone → Call Blocking & Identification and enable [Your App] to see caller ID labels."
);
}
} }
} }
if (Platform.OS === 'ios') {
Alert.alert(
"Enable Caller ID",
"Go to Settings → Phone → Call Blocking & Identification and enable [Your App] to see caller ID labels.",
[
{ text: "Open Settings", onPress: () => Linking.openURL("app-settings:") },
{ text: "Cancel", style: "cancel" }
]
);
}
}, []); }, []);
useEffect(() => { useEffect(() => {
...@@ -141,6 +145,49 @@ export default function App() { ...@@ -141,6 +145,49 @@ export default function App() {
const allGranted = Object.values(statuses).every(s => s === RESULTS.GRANTED); const allGranted = Object.values(statuses).every(s => s === RESULTS.GRANTED);
// --- iOS: Call Directory management ---
const checkCallDirectoryStatus = async () => {
if (Platform.OS !== "ios" || !CallDirectoryManager) {
console.warn("CallDirectoryManager not available on this platform");
return;
}
try {
const status = await CallDirectoryManager.getEnabledStatusForExtension(
"com.whoscall.app.CallDirectoryExtension" // <-- must match your extension bundle ID
);
console.log("Call Directory status:", status);
if (status === 2) {
Alert.alert("✅ Enabled", "Call Directory Extension is enabled");
} else {
Alert.alert(
"⚠️ Not Enabled",
"Go to Settings → Phone → Call Blocking & Identification and enable Whoscall."
);
}
} catch (e) {
console.error("Error checking Call Directory status:", e);
}
};
const reloadCallDirectory = async () => {
if (Platform.OS !== "ios" || !CallDirectoryManager) {
console.warn("CallDirectoryManager not available on this platform");
return;
}
try {
const success = await CallDirectoryManager.reloadExtension(
"com.whoscall.app.CallDirectoryExtension"
);
console.log("Reload result:", success);
if (success) {
Alert.alert("🔄 Reloaded", "Extension reloaded successfully");
}
} catch (e) {
console.error("Error reloading Call Directory:", e);
Alert.alert("❌ Reload Failed", String(e));
}
};
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Text style={styles.title}>Permissions Status</Text> <Text style={styles.title}>Permissions Status</Text>
...@@ -158,6 +205,13 @@ export default function App() { ...@@ -158,6 +205,13 @@ export default function App() {
))} ))}
{allGranted && <Text style={styles.granted}>All permissions granted ✅</Text>} {allGranted && <Text style={styles.granted}>All permissions granted ✅</Text>}
<Button title="Check Again" onPress={checkAllPermissions} /> <Button title="Check Again" onPress={checkAllPermissions} />
{Platform.OS === "ios" && (
<>
<Button title="Check Call Directory Status" onPress={checkCallDirectoryStatus} />
<View style={{ height: 10 }} />
<Button title="Reload Call Directory" onPress={reloadCallDirectory} />
</>
)}
</View> </View>
); );
} }
......
#import <React/RCTBridgeModule.h>
@interface RCT_EXTERN_MODULE(CallDirectoryManager, NSObject)
RCT_EXTERN_METHOD(getEnabledStatusForExtension:(NSString *)identifier
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
RCT_EXTERN_METHOD(reloadExtension:(NSString *)identifier
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
@end
import Foundation
import CallKit
@objc(CallDirectoryManager)
class CallDirectoryManager: NSObject {
@objc
func getEnabledStatusForExtension(_ identifier: String,
resolver resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock) {
let manager = CXCallDirectoryManager.sharedInstance
manager.getEnabledStatusForExtension(withIdentifier: identifier) { status, error in
if let error = error {
reject("E_STATUS", "Failed to get status: \(error.localizedDescription)", error)
return
}
resolve(status.rawValue) // 0 = unknown, 1 = disabled, 2 = enabled
}
}
@objc
func reloadExtension(_ identifier: String,
resolver resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock) {
let manager = CXCallDirectoryManager.sharedInstance
manager.reloadExtension(withIdentifier: identifier) { error in
if let error = error {
reject("E_RELOAD", "Failed to reload: \(error.localizedDescription)", error)
} else {
resolve(true)
}
}
}
@objc static func requiresMainQueueSetup() -> Bool {
return false
}
}
...@@ -3,36 +3,83 @@ ...@@ -3,36 +3,83 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 54; objectVersion = 70;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
0C80B921A6F3F58F76C31292 /* libPods-whoscall.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-whoscall.a */; }; 0410826D011576D314605BD9 /* libPods-whoscall.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F6CFA299F105635DA208C0DF /* libPods-whoscall.a */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2FE699522E681911009FD0E6 /* whoscallDirectoryExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 2FE6994B2E681911009FD0E6 /* whoscallDirectoryExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; }; 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
A3AA3DDDD267D1DE50433D9E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; A3AA3DDDD267D1DE50433D9E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
2FE699502E681911009FD0E6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2FE6994A2E681911009FD0E6;
remoteInfo = whoscallDirectoryExtension;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
2FE699532E681911009FD0E6 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
2FE699522E681911009FD0E6 /* whoscallDirectoryExtension.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
121AADEC182EBFA46E71BFE9 /* Pods-whoscall.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-whoscall.debug.xcconfig"; path = "Target Support Files/Pods-whoscall/Pods-whoscall.debug.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* whoscall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = whoscall.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07F961A680F5B00A75B9A /* whoscall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = whoscall.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = whoscall/Images.xcassets; sourceTree = "<group>"; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = whoscall/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = whoscall/Info.plist; sourceTree = "<group>"; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = whoscall/Info.plist; sourceTree = "<group>"; };
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = whoscall/PrivacyInfo.xcprivacy; sourceTree = "<group>"; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = whoscall/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3B4392A12AC88292D35C810B /* Pods-whoscall.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-whoscall.debug.xcconfig"; path = "Target Support Files/Pods-whoscall/Pods-whoscall.debug.xcconfig"; sourceTree = "<group>"; }; 2FE6994B2E681911009FD0E6 /* whoscallDirectoryExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = whoscallDirectoryExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
5709B34CF0A7D63546082F79 /* Pods-whoscall.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-whoscall.release.xcconfig"; path = "Target Support Files/Pods-whoscall/Pods-whoscall.release.xcconfig"; sourceTree = "<group>"; };
5DCACB8F33CDC322A6C60F78 /* libPods-whoscall.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-whoscall.a"; sourceTree = BUILT_PRODUCTS_DIR; };
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = whoscall/AppDelegate.swift; sourceTree = "<group>"; }; 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = whoscall/AppDelegate.swift; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = whoscall/LaunchScreen.storyboard; sourceTree = "<group>"; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = whoscall/LaunchScreen.storyboard; sourceTree = "<group>"; };
E95D2201546CD28779324AAF /* Pods-whoscall.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-whoscall.release.xcconfig"; path = "Target Support Files/Pods-whoscall/Pods-whoscall.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
F6CFA299F105635DA208C0DF /* libPods-whoscall.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-whoscall.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
2FE699562E681911009FD0E6 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 2FE6994A2E681911009FD0E6 /* whoscallDirectoryExtension */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
2FE6994C2E681911009FD0E6 /* whoscallDirectoryExtension */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (2FE699562E681911009FD0E6 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = whoscallDirectoryExtension; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
0C80B921A6F3F58F76C31292 /* libPods-whoscall.a in Frameworks */, 0410826D011576D314605BD9 /* libPods-whoscall.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2FE699482E681911009FD0E6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -55,7 +102,7 @@ ...@@ -55,7 +102,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
5DCACB8F33CDC322A6C60F78 /* libPods-whoscall.a */, F6CFA299F105635DA208C0DF /* libPods-whoscall.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -72,6 +119,7 @@ ...@@ -72,6 +119,7 @@
children = ( children = (
13B07FAE1A68108700A75B9A /* whoscall */, 13B07FAE1A68108700A75B9A /* whoscall */,
832341AE1AAA6A7D00B99B32 /* Libraries */, 832341AE1AAA6A7D00B99B32 /* Libraries */,
2FE6994C2E681911009FD0E6 /* whoscallDirectoryExtension */,
83CBBA001A601CBA00E9B192 /* Products */, 83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */, 2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */, BBD78D7AC51CEA395F1C20DB /* Pods */,
...@@ -85,6 +133,7 @@ ...@@ -85,6 +133,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
13B07F961A680F5B00A75B9A /* whoscall.app */, 13B07F961A680F5B00A75B9A /* whoscall.app */,
2FE6994B2E681911009FD0E6 /* whoscallDirectoryExtension.appex */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -92,8 +141,8 @@ ...@@ -92,8 +141,8 @@
BBD78D7AC51CEA395F1C20DB /* Pods */ = { BBD78D7AC51CEA395F1C20DB /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3B4392A12AC88292D35C810B /* Pods-whoscall.debug.xcconfig */, 121AADEC182EBFA46E71BFE9 /* Pods-whoscall.debug.xcconfig */,
5709B34CF0A7D63546082F79 /* Pods-whoscall.release.xcconfig */, E95D2201546CD28779324AAF /* Pods-whoscall.release.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -105,34 +154,60 @@ ...@@ -105,34 +154,60 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "whoscall" */; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "whoscall" */;
buildPhases = ( buildPhases = (
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 67B6D626B1DB7B156945ECA4 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */, 13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */, 13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, 2FE699532E681911009FD0E6 /* Embed Foundation Extensions */,
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, 5F0A539D1614410270C2C189 /* [CP] Embed Pods Frameworks */,
4BCC9D61081E766D39E74EA7 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
2FE699512E681911009FD0E6 /* PBXTargetDependency */,
); );
name = whoscall; name = whoscall;
productName = whoscall; productName = whoscall;
productReference = 13B07F961A680F5B00A75B9A /* whoscall.app */; productReference = 13B07F961A680F5B00A75B9A /* whoscall.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
2FE6994A2E681911009FD0E6 /* whoscallDirectoryExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2FE699572E681911009FD0E6 /* Build configuration list for PBXNativeTarget "whoscallDirectoryExtension" */;
buildPhases = (
2FE699472E681911009FD0E6 /* Sources */,
2FE699482E681911009FD0E6 /* Frameworks */,
2FE699492E681911009FD0E6 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
2FE6994C2E681911009FD0E6 /* whoscallDirectoryExtension */,
);
name = whoscallDirectoryExtension;
productName = whoscallDirectoryExtension;
productReference = 2FE6994B2E681911009FD0E6 /* whoscallDirectoryExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
/* Begin PBXProject section */ /* Begin PBXProject section */
83CBB9F71A601CBA00E9B192 /* Project object */ = { 83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 1640;
LastUpgradeCheck = 1210; LastUpgradeCheck = 1210;
TargetAttributes = { TargetAttributes = {
13B07F861A680F5B00A75B9A = { 13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1120; LastSwiftMigration = 1120;
}; };
2FE6994A2E681911009FD0E6 = {
CreatedOnToolsVersion = 16.4;
};
}; };
}; };
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "whoscall" */; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "whoscall" */;
...@@ -149,6 +224,7 @@ ...@@ -149,6 +224,7 @@
projectRoot = ""; projectRoot = "";
targets = ( targets = (
13B07F861A680F5B00A75B9A /* whoscall */, 13B07F861A680F5B00A75B9A /* whoscall */,
2FE6994A2E681911009FD0E6 /* whoscallDirectoryExtension */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -164,6 +240,13 @@ ...@@ -164,6 +240,13 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
2FE699492E681911009FD0E6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
...@@ -183,60 +266,68 @@ ...@@ -183,60 +266,68 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
}; };
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { 4BCC9D61081E766D39E74EA7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks-${CONFIGURATION}-input-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks"; inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks-${CONFIGURATION}-output-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { 5F0A539D1614410270C2C189 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Embed Pods Frameworks";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-whoscall-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { 67B6D626B1DB7B156945ECA4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Copy Pods Resources"; inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources-${CONFIGURATION}-output-files.xcfilelist", );
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-whoscall-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-whoscall/Pods-whoscall-resources.sh\"\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
...@@ -250,12 +341,27 @@ ...@@ -250,12 +341,27 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
2FE699472E681911009FD0E6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
2FE699512E681911009FD0E6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 2FE6994A2E681911009FD0E6 /* whoscallDirectoryExtension */;
targetProxy = 2FE699502E681911009FD0E6 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = { 13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-whoscall.debug.xcconfig */; baseConfigurationReference = 121AADEC182EBFA46E71BFE9 /* Pods-whoscall.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
...@@ -283,7 +389,7 @@ ...@@ -283,7 +389,7 @@
}; };
13B07F951A680F5B00A75B9A /* Release */ = { 13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-whoscall.release.xcconfig */; baseConfigurationReference = E95D2201546CD28779324AAF /* Pods-whoscall.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
...@@ -307,6 +413,87 @@ ...@@ -307,6 +413,87 @@
}; };
name = Release; name = Release;
}; };
2FE699542E681911009FD0E6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = whoscallDirectoryExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = whoscallDirectoryExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.whoscall.whoscallDirectoryExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
2FE699552E681911009FD0E6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = whoscallDirectoryExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = whoscallDirectoryExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.whoscall.whoscallDirectoryExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
83CBBA201A601CBA00E9B192 /* Debug */ = { 83CBBA201A601CBA00E9B192 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
...@@ -463,6 +650,15 @@ ...@@ -463,6 +650,15 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
2FE699572E681911009FD0E6 /* Build configuration list for PBXNativeTarget "whoscallDirectoryExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2FE699542E681911009FD0E6 /* Debug */,
2FE699552E681911009FD0E6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "whoscall" */ = { 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "whoscall" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
......
...@@ -21,6 +21,8 @@ class CallDirectoryHandler: CXCallDirectoryProvider { ...@@ -21,6 +21,8 @@ class CallDirectoryHandler: CXCallDirectoryProvider {
let vipNumbers: [(number: Int64, label: String)] = [ let vipNumbers: [(number: Int64, label: String)] = [
(60189884118, "Wei Yi"), (60189884118, "Wei Yi"),
(60123456789, "Spam Caller"), (60123456789, "Spam Caller"),
(60122553372, "Someone Else"),
(60123456789, "Scam Caller"),
] ]
for entry in vipNumbers { for entry in vipNumbers {
...@@ -47,4 +49,4 @@ extension CallDirectoryHandler: CXCallDirectoryExtensionContextDelegate { ...@@ -47,4 +49,4 @@ extension CallDirectoryHandler: CXCallDirectoryExtensionContextDelegate {
NSLog("Call Directory extension error: \(error.localizedDescription)") NSLog("Call Directory extension error: \(error.localizedDescription)")
} }
} }
#endif #endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment