• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Populate is both an iOS app and library to easily create random-generated contacts.

Populate

Populate is both an iOS app and library to easily create random-generated contacts.

  • the Populate app let you configure and add contacts to the iOS address book.
  • the PopulateKit library let you create contacts for either adding to the address book or any other purpose.

Build Status Cocoapods Cocoapods

Screenshots

screenshot01    screenshot02

Populate app

Run the app

  1. Install the pods with pod install
  2. Open Populate.xcworkspace (the workspace, not the project), build it and run it
  3. Choose a group name (useful for later deletion), number of contacts, type of name and type of photo
  4. Tap populate to add the contacts
  5. Tap depopulate to remove the group and all its member contacts

You can tap contacts to open the address book without switching apps.

** Be careful not to erase your real contact if you use Populate on a real device **

PopulateKit library

Install with CocoaPods

Add a pod entry to your Podfile:

pod 'PopulateKit', '~> 0.0.4'

Install the pod(s) by running:

pod install

Install manually

  1. clone this repository
  2. add the files in the PopulateKit directory to your project
  3. link your app with the AddressBook framework
  4. set `OTHER_LINKER_FLAGS="-ObjC" for your target

If you want the (optional) identicons, you should also add IGIdenticon to your project.

Usage

Import the header

#import "PopulateKit.h"

Adding contacts to the address book

To add hand-made contacts to the address book, create the contacts with the ACPerson wrapper and add them to Test group in the address book:

ACPerson *personA = [[ACPerson alloc] initWithFirstname:@"Alice"
                                               lastName:@"A"
                                                  email:@"[email protected]"
                                                  phone:@"555-111-1111"
                                                  image:nil];
ACPerson *personB = [[ACPerson alloc] initWithFirstname:@"Bob"
                                               lastName:@"B"
                                                  email:@"[email protected]"
                                                  phone:@"555-222-2222"
                                                  image:nil];
ACPerson *personC = [[ACPerson alloc] initWithFirstname:@"Charlie"
                                               lastName:@"C"
                                                  email:@"[email protected]"
                                                  phone:@"555-333-3333"
                                                  image:nil];

    [ACPopulate populateGroupWithName:@"Test"
                          withPersons:@[personA, personB, personC]
                           completion:nil];

To add randomly-generated contacts instead, use a ACPersonSet:

    [ACPopulate populateGroupWithName:@"Test"
                   withCountOfPersons:10
                              fromSet:[ACPersonSet personSetWithRandomNameAndImage]
                           completion:nil];

It is possible to populate with a custom ACPersonSet by using data sets (ACNameSet and ACImageSet). Here is an example of populating with random first names, common US surnames and identicon avatars:

[ACPopulate populateGroupWithName:@"Test"
               withCountOfPersons:10
                          fromSet:[ACPersonSet setWithFirstNameSet:[ACNameSet randomNameSet]
                                                       lastNameSet:[ACNameSet commonSurnameSet]
                                                          imageSet:[ACImageSet identiconImageSet]
                       completion:nil];

Or you can supply multiple ACPersonSet, like a male and a female set:

[ACPopulate populateGroupWithName:@"Test"
               withCountOfPersons:10
                         fromSets:@[
                                    [ACPersonSet setWithFirstNameSet:[ACNameSet commonMaleNameSet]
                                                         lastNameSet:[ACNameSet commonSurnameSet]
                                                            imageSet:[ACImageSet maleFaceImageSet]],
                                                                     
                                    [ACPersonSet setWithFirstNameSet:[ACNameSet commonFemaleNameSet]
                                                         lastNameSet:[ACNameSet commonSurnameSet]
                                                            imageSet:[ACImageSet femaleFaceImageSet]]
                                    ]
                       completion:nil];

If you want to delete the Test group and all its members from the addess book:

[ACPopulate depopulateGroupWithName:@"Test" completion:nil];

You can also have a look at the Populate app for inspiration.

Generating contacts

If you want to use randomly-generated contacts directly:

ACPersonSet *personSet = [ACPersonSet setWithFirstNameSet:[ACNameSet randomNameSet]
                                              lastNameSet:[ACNameSet commonSurnameSet]
                                                 imageSet:[ACImageSet identiconImageSet]];
ACPerson *person = [personSet randomPerson];
NSLog(@"%@", person.firstName);

Documentation

If you have appledoc installed, you can generate the documentation by running the corresponding target.

More Repositories

1

SimulatorRemoteNotifications

Library to send mock remote notifications to the iOS simulator
Objective-C
1,373
star
2

Parallax

Parallax is an iOS library that reproduces the parallax effect of the iOS7 home screen.
Objective-C
407
star
3

ACReuseQueue

A queue to keep and reusing objects.
Objective-C
369
star
4

ACCodeSnippetRepositoryPlugin

A plugin for Xcode to synchronize code snippets with repositories
Objective-C
330
star
5

iOS-MagnifyingGlass

A magnifying glass for iOS
Objective-C
314
star
6

instagram-filters

Instagram-like image filters
Python
116
star
7

ACKeyboard

ACKeyboard is a keyboard extension for iOS that mimics the system keyboard, except it has only one 'letter' key: "yo".
Objective-C
104
star
8

flask-autodoc

Flask autodoc automatically creates an online documentation for your flask application.
Python
98
star
9

Segway

Segway is an iOS library for segues but without storyboards.
Objective-C
65
star
10

WebScraper

iOS library for web scraping
Objective-C
37
star
11

ACHalloween

A library with halloween-themed animations for iOS.
Objective-C
21
star
12

xcode-snippets

A set of custom code snippets for Xcode
Objective-C
20
star
13

iOS-Konami-Code

Objective-C
11
star
14

kanjinetworks

kanjinetworks is an interface for the Kanji Networks database.
Python
5
star
15

Spyglass

Events tracking analytics for iOS
Objective-C
4
star
16

NetBrowser

Proof-of-concept: Bonjour services browser
Objective-C
4
star
17

WidgetStoreProduct

Proof of concept: A SKStoreProductViewController replacement using iTunes web widgets
Objective-C
4
star
18

Delirium

Objective-C
4
star
19

Tumblr-backup

Make a local backup of your Tumblr blogs
Shell
3
star
20

esp8266_ddc

C++
3
star
21

gittime

Estimate time spend coding based on commits in a git repository.
Python
2
star
22

Hourglass

iOS library for testing if a time interval is elapsed
Objective-C
2
star
23

lldb_screengraph

LLDB script for creating (dot/graphviz) graphs of iOS screens based on breakpoints.
Python
2
star
24

maskcomp

Maskcomp is a library utility to compare two images, like iPhone screenshots, optionally with a mask.
Python
2
star
25

MultipleStoresTests

Testing multiple persistence store; one in the main bundle and one in the documents directory
Objective-C
1
star
26

IGInterfaceDataTable

Easily build WatchKit tables with complex data structures.
Objective-C
1
star
27

cpp_project_template

CMake
1
star
28

Janus

Proof of concept for building a "multiversal" (x86+arm) fat binary
Objective-C
1
star
29

jquery.formable

JavaScript
1
star
30

tourofcpp

Quick self-practice of C++11 based on the "A Tour of C++" book.
C++
1
star
31

pkunk.com

JavaScript
1
star
32

AsyncTestKit

iOS library for testing asynchronous operations
Objective-C
1
star
33

clang-tutorial

C++
1
star
34

sample-images

Sample images for various uses, resized to iphone and ipad screen sizes.
1
star
35

tome

HTML
1
star
36

WebViewsTests

Test web views performance with sunspider
JavaScript
1
star
37

MessagingTests

Proof of concept: Messing with Objective-C runtime's messages routing
Objective-C
1
star
38

SimulatorPushNotifications

Moved to https://github.com/acoomans/SimulatorRemoteNotifications
1
star