diff --git a/DummyContacts.xcodeproj/project.pbxproj b/DummyContacts.xcodeproj/project.pbxproj
index b55c92d..24012a7 100644
--- a/DummyContacts.xcodeproj/project.pbxproj
+++ b/DummyContacts.xcodeproj/project.pbxproj
@@ -314,7 +314,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DummyContacts/DummyContacts-Prefix.pch";
INFOPLIST_FILE = "DummyContacts/DummyContacts-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@@ -326,7 +326,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "DummyContacts/DummyContacts-Prefix.pch";
INFOPLIST_FILE = "DummyContacts/DummyContacts-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
diff --git a/DummyContacts/DummyContacts-Info.plist b/DummyContacts/DummyContacts-Info.plist
index 4c8cb95..3264a54 100644
--- a/DummyContacts/DummyContacts-Info.plist
+++ b/DummyContacts/DummyContacts-Info.plist
@@ -34,5 +34,7 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
+ NSContactsUsageDescription
+ This app requires access to your contacts to function properly.
diff --git a/DummyContacts/ViewController.m b/DummyContacts/ViewController.m
index d19c2c4..486782f 100644
--- a/DummyContacts/ViewController.m
+++ b/DummyContacts/ViewController.m
@@ -71,6 +71,7 @@ -(void)addContacts
accessGranted = YES;
}
+ long countAdded = 0;
if(accessGranted)
{
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"DummyVCard" ofType:@"vcf"];
@@ -90,12 +91,13 @@ -(void)addContacts
CFRelease(person);
}
+ countAdded += CFArrayGetCount(vCardPeople);
CFRelease(vCardPeople);
CFRelease(defaultSource);
}
-
- UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:@"100 contacts added successfully." delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
+ NSString *msg = [NSString stringWithFormat:@"%ld contacts added successfully.", countAdded];
+ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:msg delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[alertView show];
[alertView release];