├── privateApiApps.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── privateApiApps
├── ViewController
│ ├── ViewController.h
│ ├── InfoTableViewController.h
│ ├── AppInfoViewController.h
│ ├── ViewController.m
│ ├── InfoTableViewController.m
│ ├── AppInfoViewController.xib
│ └── AppInfoViewController.m
├── AppDelegate.h
├── main.m
├── Model
│ ├── AppsObject.h
│ └── AppsObject.m
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
└── AppDelegate.m
├── README.md
├── privateApiAppsTests
├── Info.plist
└── privateApiAppsTests.m
├── privateApiAppsUITests
├── Info.plist
└── privateApiAppsUITests.m
└── .gitignore
/privateApiApps.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/InfoTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // InfoTableViewController.h
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/30.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface InfoTableViewController : UITableViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/privateApiApps/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/AppInfoViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppInfoViewController.h
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppsObject.h"
11 |
12 | @interface AppInfoViewController : UIViewController
13 | @property (nonatomic, strong) AppsObject *appsObj;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/privateApiApps/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # privateApiApps
2 |
3 | 知识点:
4 |
5 | 1. 获取iPhone中安装的APP列表
6 | 2. 获取每个APP的相关信息
7 | 3. 获取APP图标
8 | 4. 打开APP
9 | 5. 在AppStore中显示
10 | 6. 获取设备的一些信息
11 |
12 | 文档介绍请见: [私有API的使用](http://markmiao.com/2016/12/28/%E7%A7%81%E6%9C%89API%E7%9A%84%E4%BD%BF%E7%94%A8/)
13 |
14 | 项目截图:
15 |
16 | ||||
17 | |:---:|:---:|:---:|
18 |
19 | 开发环境: Xcode 8.2.1,iPhone 6,iOS 10.2
20 |
21 | 参考资料:
22 |
23 | 1. [iOS-Runtime-Headers](https://github.com/nst/iOS-Runtime-Headers)
24 | 2. [获取iOS设备上安装的应用列表](http://octree.me/2016/08/01/get-installed-apps/)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/privateApiAppsTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/privateApiAppsUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/privateApiApps/Model/AppsObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppsObject.h
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AppsObject : NSObject
13 |
14 | @property (nonatomic, strong) id obj;
15 | /** app名字 */
16 | @property (nonatomic, copy) NSString *appName;
17 | /** 版本号 */
18 | @property (nonatomic, copy) NSString *version;
19 | /** bundle id */
20 | @property (nonatomic, copy) NSString *bundleId;
21 | /** app图标 */
22 | @property (nonatomic, strong) NSData *iconData;
23 | /** app在AppStore的全名 */
24 | @property (nonatomic, copy) NSString *appFullName;
25 | /** app类型 */
26 | @property (nonatomic, copy) NSString *appType;
27 | /** app供应商 */
28 | @property (nonatomic, copy) NSString *appVendorName;
29 | /** app评级 */
30 | @property (nonatomic, copy) NSString *appRating;
31 | /** appid */
32 | @property (nonatomic, copy) NSNumber *appid;
33 |
34 | + (UIImage *)getAppIcon:(NSData *)iconData;
35 | @end
36 |
--------------------------------------------------------------------------------
/privateApiApps/Model/AppsObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppsObject.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import "AppsObject.h"
10 |
11 | @implementation AppsObject
12 |
13 | + (UIImage *)getAppIcon:(NSData *)iconData {
14 | NSInteger lenth = iconData.length;
15 | NSInteger width = 87;
16 | NSInteger height = 87;
17 | uint32_t *pixels = (uint32_t *)malloc(width * height * sizeof(uint32_t));
18 | [iconData getBytes:pixels range:NSMakeRange(32, lenth - 32)];
19 |
20 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
21 |
22 | CGContextRef ctx = CGBitmapContextCreate(pixels, width, height, 8, (width + 1) * sizeof(uint32_t), colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst);
23 |
24 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
25 | CGContextRelease(ctx);
26 | CGColorSpaceRelease(colorSpace);
27 | UIImage *icon = [UIImage imageWithCGImage: cgImage];
28 | CGImageRelease(cgImage);
29 |
30 | return icon;
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/privateApiAppsTests/privateApiAppsTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // privateApiAppsTests.m
3 | // privateApiAppsTests
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface privateApiAppsTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation privateApiAppsTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/privateApiApps/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/privateApiAppsUITests/privateApiAppsUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // privateApiAppsUITests.m
3 | // privateApiAppsUITests
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface privateApiAppsUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation privateApiAppsUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/privateApiApps/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/privateApiApps/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/privateApiApps/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "AppsObject.h"
11 | #import "AppInfoViewController.h"
12 | #import
13 |
14 | @interface ViewController ()
15 | {
16 | NSMutableArray *_appsObjArray;
17 | }
18 | @property (weak, nonatomic) IBOutlet UITableView *tableView;
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 |
26 | self.title = @"apps";
27 |
28 | _appsObjArray = [NSMutableArray array];
29 |
30 | [self.view addSubview:self.tableView];
31 |
32 | Class LSApp_class = objc_getClass("LSApplicationWorkspace");
33 | NSObject *workspace = [LSApp_class performSelector:@selector(defaultWorkspace)];
34 | NSArray *appsArray = [workspace performSelector:@selector(allApplications)];
35 |
36 | [appsArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
37 |
38 | AppsObject *appsObj = [[AppsObject alloc] init];
39 | appsObj.obj = obj;
40 | appsObj.appName = [obj performSelector:@selector(localizedName)];
41 | appsObj.iconData = [obj performSelector:@selector(iconDataForVariant:) withObject:@(2)];
42 |
43 | [_appsObjArray addObject:appsObj];
44 | }];
45 | [self.tableView reloadData];
46 |
47 | }
48 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
49 | {
50 | return _appsObjArray.count;
51 | }
52 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
53 | {
54 | static NSString *ID = @"CellID";
55 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
56 | if (cell == nil) {
57 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
58 | }
59 | AppsObject *obj = _appsObjArray[indexPath.row];
60 | cell.textLabel.text = obj.appName;
61 | cell.imageView.image = [AppsObject getAppIcon:obj.iconData];
62 | return cell;
63 | }
64 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
65 | {
66 | return 44;
67 | }
68 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
69 | {
70 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
71 | AppInfoViewController *appVc = [[AppInfoViewController alloc] init];
72 | appVc.appsObj = _appsObjArray[indexPath.row];
73 | [self.navigationController pushViewController:appVc animated:YES];
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/InfoTableViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // InfoTableViewController.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/30.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import "InfoTableViewController.h"
10 | #import
11 | #import
12 | #import
13 |
14 |
15 | @interface InfoTableViewController ()
16 | {
17 | NSArray *_deviceArray;
18 | }
19 | @end
20 |
21 | @implementation InfoTableViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | self.title = @"device";
26 |
27 | NSBundle *fmcoreBundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/FMCore.framework"];
28 |
29 | Class systemInfoClass = [fmcoreBundle classNamed:@"FMSystemInfo"];
30 | id systemInfo = [systemInfoClass performSelector:@selector(sharedInstance)];
31 |
32 | NSString *deviceName = [systemInfo performSelector:@selector(deviceName)];
33 | NSString *productType = [systemInfo performSelector:@selector(productType)];
34 | NSString *productName = [systemInfo performSelector:@selector(productName)];
35 | NSString *osBuildVersion = [systemInfo performSelector:@selector(osBuildVersion)];
36 | NSString *osVersion = [systemInfo performSelector:@selector(osVersion)];
37 |
38 | CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
39 | CTCarrier *carrier = [networkInfo subscriberCellularProvider];
40 | NSString *carrierName = carrier.carrierName;
41 |
42 |
43 | _deviceArray = @[[NSString stringWithFormat:@"名称: %@", deviceName], [NSString stringWithFormat:@"设备: %@", productType], [NSString stringWithFormat:@"系统: %@", productName], [NSString stringWithFormat:@"版本: %@(%@)", osVersion, osBuildVersion], [NSString stringWithFormat:@"运营商: %@", carrierName]];
44 | }
45 |
46 |
47 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
48 |
49 | return _deviceArray.count;
50 | }
51 |
52 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
53 | {
54 | static NSString *ID = @"CellID";
55 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
56 | if (cell == nil) {
57 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
58 | }
59 | cell.textLabel.text = _deviceArray[indexPath.row];
60 | return cell;
61 | }
62 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
63 | {
64 | return 44;
65 | }
66 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
67 | {
68 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/AppInfoViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/privateApiApps/ViewController/AppInfoViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppInfoViewController.m
3 | // privateApiApps
4 | //
5 | // Created by miaoxiaodong on 16/12/27.
6 | // Copyright © 2016年 miaoxiaodong. All rights reserved.
7 | //
8 |
9 | #import "AppInfoViewController.h"
10 | #import
11 | #import
12 |
13 | @interface AppInfoViewController ()
14 | {
15 | NSMutableArray *_tableDataArray;
16 | }
17 | @property (weak, nonatomic) IBOutlet UITableView *tableView;
18 | @property (weak, nonatomic) IBOutlet UIView *headView;
19 | @property (weak, nonatomic) IBOutlet UIImageView *appIcon;
20 |
21 | @end
22 |
23 | @implementation AppInfoViewController
24 |
25 | - (void)viewDidLoad {
26 | [super viewDidLoad];
27 | _tableDataArray = [NSMutableArray array];
28 | self.title = self.appsObj.appName;
29 | self.tableView.delegate = self;
30 | self.tableView.dataSource = self;
31 |
32 | self.appIcon.image = [AppsObject getAppIcon:self.appsObj.iconData];
33 | NSString *name = self.appsObj.appName;
34 | NSString *version = [self.appsObj.obj performSelector:@selector(shortVersionString)];
35 | NSString *bundleid = [self.appsObj.obj performSelector:@selector(applicationIdentifier)];
36 | NSString *fullName = [self.appsObj.obj performSelector:@selector(itemName)];
37 | NSString *type = [self.appsObj.obj performSelector:@selector(applicationType)];
38 | NSString *vendor = [self.appsObj.obj performSelector:@selector(vendorName)];
39 | NSString *rating = [self.appsObj.obj performSelector:@selector(ratingLabel)];
40 | NSNumber *appid = [self.appsObj.obj performSelector:@selector(itemID)];
41 |
42 |
43 | if (name) [_tableDataArray addObject:[NSString stringWithFormat:@"名称: %@",name]];
44 | if (version) [_tableDataArray addObject:[NSString stringWithFormat:@"版本号: %@",version]];
45 | if (bundleid) [_tableDataArray addObject:[NSString stringWithFormat:@"BundleId: %@", bundleid]];
46 | self.appsObj.bundleId = bundleid;
47 | if (fullName) [_tableDataArray addObject:[NSString stringWithFormat:@"app全名: %@", fullName]];
48 | if (type) [_tableDataArray addObject:[NSString stringWithFormat:@"类型: %@", [type isEqualToString:@"System"] ? @"系统应用" : @"普通应用"]];
49 | if (vendor) [_tableDataArray addObject:[NSString stringWithFormat:@"供应商: %@", vendor]];
50 | if (rating) [_tableDataArray addObject:[NSString stringWithFormat:@"评级: %@", rating]];
51 | if (appid.integerValue) {
52 | [_tableDataArray addObject:[NSString stringWithFormat:@"App ID: %@", appid]];
53 | self.appsObj.appid = appid;
54 | [_tableDataArray addObject:@"在AppStore中显示"];
55 | }
56 |
57 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"打开app" style:UIBarButtonItemStyleDone target:self action:@selector(openApp)];
58 |
59 | }
60 |
61 | - (void)openApp {
62 |
63 | Class LSAppClass = NSClassFromString(@"LSApplicationWorkspace");
64 | id workSpace = [(id)LSAppClass performSelector:@selector(defaultWorkspace)];
65 | [workSpace performSelector:@selector(openApplicationWithBundleID:) withObject:self.appsObj.bundleId];
66 | }
67 |
68 |
69 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
70 | {
71 | return _tableDataArray.count;
72 | }
73 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
74 | {
75 | static NSString *ID = @"CellID";
76 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
77 | if (cell == nil) {
78 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
79 | }
80 | cell.textLabel.text = _tableDataArray[indexPath.row];
81 | cell.textLabel.numberOfLines = 0;
82 | return cell;
83 | }
84 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
85 | {
86 | return 60;
87 | }
88 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
89 | {
90 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
91 | if ([[self tableView:tableView cellForRowAtIndexPath:indexPath].textLabel.text isEqualToString:@"在AppStore中显示"]) {
92 | SKStoreProductViewController *store = [[SKStoreProductViewController alloc] init];
93 | store.delegate = self;
94 | [store loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:self.appsObj.appid} completionBlock:^(BOOL result, NSError * _Nullable error) {
95 | if (error) {
96 | NSLog(@"error = %@",[error localizedDescription]);
97 | } else {
98 | [self presentViewController:store animated:YES completion:^{
99 |
100 | }];
101 | }
102 | }];
103 | }
104 | }
105 | - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
106 | {
107 | [self dismissViewControllerAnimated:YES completion:^{
108 | }];
109 | }
110 | @end
111 |
--------------------------------------------------------------------------------
/privateApiApps/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------
/privateApiApps.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | C2175BBF1E15066A00E935E9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2175BBE1E15066A00E935E9 /* CoreTelephony.framework */; };
11 | C2175BC91E16060F00E935E9 /* AppsObject.m in Sources */ = {isa = PBXBuildFile; fileRef = C2175BC21E16060F00E935E9 /* AppsObject.m */; };
12 | C2175BCA1E16060F00E935E9 /* AppInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2175BC51E16060F00E935E9 /* AppInfoViewController.m */; };
13 | C2175BCB1E16060F00E935E9 /* AppInfoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C2175BC61E16060F00E935E9 /* AppInfoViewController.xib */; };
14 | C2175BCC1E16060F00E935E9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2175BC81E16060F00E935E9 /* ViewController.m */; };
15 | C2175BD21E1606D300E935E9 /* InfoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2175BD11E1606D300E935E9 /* InfoTableViewController.m */; };
16 | C23229931E1254F900E84029 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C23229921E1254F900E84029 /* main.m */; };
17 | C23229961E1254F900E84029 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C23229951E1254F900E84029 /* AppDelegate.m */; };
18 | C232299C1E1254F900E84029 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C232299A1E1254F900E84029 /* Main.storyboard */; };
19 | C232299E1E1254F900E84029 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C232299D1E1254F900E84029 /* Assets.xcassets */; };
20 | C23229A11E1254F900E84029 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C232299F1E1254F900E84029 /* LaunchScreen.storyboard */; };
21 | C23229AC1E1254F900E84029 /* privateApiAppsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C23229AB1E1254F900E84029 /* privateApiAppsTests.m */; };
22 | C23229B71E1254F900E84029 /* privateApiAppsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = C23229B61E1254F900E84029 /* privateApiAppsUITests.m */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | C23229A81E1254F900E84029 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = C23229861E1254F900E84029 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = C232298D1E1254F900E84029;
31 | remoteInfo = privateApiApps;
32 | };
33 | C23229B31E1254F900E84029 /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = C23229861E1254F900E84029 /* Project object */;
36 | proxyType = 1;
37 | remoteGlobalIDString = C232298D1E1254F900E84029;
38 | remoteInfo = privateApiApps;
39 | };
40 | /* End PBXContainerItemProxy section */
41 |
42 | /* Begin PBXFileReference section */
43 | C2175BBE1E15066A00E935E9 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
44 | C2175BC11E16060F00E935E9 /* AppsObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppsObject.h; sourceTree = ""; };
45 | C2175BC21E16060F00E935E9 /* AppsObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppsObject.m; sourceTree = ""; };
46 | C2175BC41E16060F00E935E9 /* AppInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppInfoViewController.h; sourceTree = ""; };
47 | C2175BC51E16060F00E935E9 /* AppInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppInfoViewController.m; sourceTree = ""; };
48 | C2175BC61E16060F00E935E9 /* AppInfoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AppInfoViewController.xib; sourceTree = ""; };
49 | C2175BC71E16060F00E935E9 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
50 | C2175BC81E16060F00E935E9 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
51 | C2175BD01E1606D300E935E9 /* InfoTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoTableViewController.h; sourceTree = ""; };
52 | C2175BD11E1606D300E935E9 /* InfoTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InfoTableViewController.m; sourceTree = ""; };
53 | C232298E1E1254F900E84029 /* privateApiApps.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = privateApiApps.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | C23229921E1254F900E84029 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
55 | C23229941E1254F900E84029 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
56 | C23229951E1254F900E84029 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
57 | C232299B1E1254F900E84029 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
58 | C232299D1E1254F900E84029 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
59 | C23229A01E1254F900E84029 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
60 | C23229A21E1254F900E84029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
61 | C23229A71E1254F900E84029 /* privateApiAppsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = privateApiAppsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
62 | C23229AB1E1254F900E84029 /* privateApiAppsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = privateApiAppsTests.m; sourceTree = ""; };
63 | C23229AD1E1254F900E84029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | C23229B21E1254F900E84029 /* privateApiAppsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = privateApiAppsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
65 | C23229B61E1254F900E84029 /* privateApiAppsUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = privateApiAppsUITests.m; sourceTree = ""; };
66 | C23229B81E1254F900E84029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | /* End PBXFileReference section */
68 |
69 | /* Begin PBXFrameworksBuildPhase section */
70 | C232298B1E1254F900E84029 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | C2175BBF1E15066A00E935E9 /* CoreTelephony.framework in Frameworks */,
75 | );
76 | runOnlyForDeploymentPostprocessing = 0;
77 | };
78 | C23229A41E1254F900E84029 /* Frameworks */ = {
79 | isa = PBXFrameworksBuildPhase;
80 | buildActionMask = 2147483647;
81 | files = (
82 | );
83 | runOnlyForDeploymentPostprocessing = 0;
84 | };
85 | C23229AF1E1254F900E84029 /* Frameworks */ = {
86 | isa = PBXFrameworksBuildPhase;
87 | buildActionMask = 2147483647;
88 | files = (
89 | );
90 | runOnlyForDeploymentPostprocessing = 0;
91 | };
92 | /* End PBXFrameworksBuildPhase section */
93 |
94 | /* Begin PBXGroup section */
95 | C2175BB81E14FAC300E935E9 /* Frameworks */ = {
96 | isa = PBXGroup;
97 | children = (
98 | C2175BBE1E15066A00E935E9 /* CoreTelephony.framework */,
99 | );
100 | name = Frameworks;
101 | sourceTree = "";
102 | };
103 | C2175BC01E16060F00E935E9 /* Model */ = {
104 | isa = PBXGroup;
105 | children = (
106 | C2175BC11E16060F00E935E9 /* AppsObject.h */,
107 | C2175BC21E16060F00E935E9 /* AppsObject.m */,
108 | );
109 | path = Model;
110 | sourceTree = "";
111 | };
112 | C2175BC31E16060F00E935E9 /* ViewController */ = {
113 | isa = PBXGroup;
114 | children = (
115 | C2175BC41E16060F00E935E9 /* AppInfoViewController.h */,
116 | C2175BC51E16060F00E935E9 /* AppInfoViewController.m */,
117 | C2175BC61E16060F00E935E9 /* AppInfoViewController.xib */,
118 | C2175BC71E16060F00E935E9 /* ViewController.h */,
119 | C2175BC81E16060F00E935E9 /* ViewController.m */,
120 | C2175BD01E1606D300E935E9 /* InfoTableViewController.h */,
121 | C2175BD11E1606D300E935E9 /* InfoTableViewController.m */,
122 | );
123 | path = ViewController;
124 | sourceTree = "";
125 | };
126 | C23229851E1254F900E84029 = {
127 | isa = PBXGroup;
128 | children = (
129 | C23229901E1254F900E84029 /* privateApiApps */,
130 | C23229AA1E1254F900E84029 /* privateApiAppsTests */,
131 | C23229B51E1254F900E84029 /* privateApiAppsUITests */,
132 | C232298F1E1254F900E84029 /* Products */,
133 | C2175BB81E14FAC300E935E9 /* Frameworks */,
134 | );
135 | sourceTree = "";
136 | };
137 | C232298F1E1254F900E84029 /* Products */ = {
138 | isa = PBXGroup;
139 | children = (
140 | C232298E1E1254F900E84029 /* privateApiApps.app */,
141 | C23229A71E1254F900E84029 /* privateApiAppsTests.xctest */,
142 | C23229B21E1254F900E84029 /* privateApiAppsUITests.xctest */,
143 | );
144 | name = Products;
145 | sourceTree = "";
146 | };
147 | C23229901E1254F900E84029 /* privateApiApps */ = {
148 | isa = PBXGroup;
149 | children = (
150 | C2175BC01E16060F00E935E9 /* Model */,
151 | C2175BC31E16060F00E935E9 /* ViewController */,
152 | C23229941E1254F900E84029 /* AppDelegate.h */,
153 | C23229951E1254F900E84029 /* AppDelegate.m */,
154 | C232299A1E1254F900E84029 /* Main.storyboard */,
155 | C232299D1E1254F900E84029 /* Assets.xcassets */,
156 | C232299F1E1254F900E84029 /* LaunchScreen.storyboard */,
157 | C23229A21E1254F900E84029 /* Info.plist */,
158 | C23229911E1254F900E84029 /* Supporting Files */,
159 | );
160 | path = privateApiApps;
161 | sourceTree = "";
162 | };
163 | C23229911E1254F900E84029 /* Supporting Files */ = {
164 | isa = PBXGroup;
165 | children = (
166 | C23229921E1254F900E84029 /* main.m */,
167 | );
168 | name = "Supporting Files";
169 | sourceTree = "";
170 | };
171 | C23229AA1E1254F900E84029 /* privateApiAppsTests */ = {
172 | isa = PBXGroup;
173 | children = (
174 | C23229AB1E1254F900E84029 /* privateApiAppsTests.m */,
175 | C23229AD1E1254F900E84029 /* Info.plist */,
176 | );
177 | path = privateApiAppsTests;
178 | sourceTree = "";
179 | };
180 | C23229B51E1254F900E84029 /* privateApiAppsUITests */ = {
181 | isa = PBXGroup;
182 | children = (
183 | C23229B61E1254F900E84029 /* privateApiAppsUITests.m */,
184 | C23229B81E1254F900E84029 /* Info.plist */,
185 | );
186 | path = privateApiAppsUITests;
187 | sourceTree = "";
188 | };
189 | /* End PBXGroup section */
190 |
191 | /* Begin PBXNativeTarget section */
192 | C232298D1E1254F900E84029 /* privateApiApps */ = {
193 | isa = PBXNativeTarget;
194 | buildConfigurationList = C23229BB1E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiApps" */;
195 | buildPhases = (
196 | C232298A1E1254F900E84029 /* Sources */,
197 | C232298B1E1254F900E84029 /* Frameworks */,
198 | C232298C1E1254F900E84029 /* Resources */,
199 | );
200 | buildRules = (
201 | );
202 | dependencies = (
203 | );
204 | name = privateApiApps;
205 | productName = privateApiApps;
206 | productReference = C232298E1E1254F900E84029 /* privateApiApps.app */;
207 | productType = "com.apple.product-type.application";
208 | };
209 | C23229A61E1254F900E84029 /* privateApiAppsTests */ = {
210 | isa = PBXNativeTarget;
211 | buildConfigurationList = C23229BE1E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiAppsTests" */;
212 | buildPhases = (
213 | C23229A31E1254F900E84029 /* Sources */,
214 | C23229A41E1254F900E84029 /* Frameworks */,
215 | C23229A51E1254F900E84029 /* Resources */,
216 | );
217 | buildRules = (
218 | );
219 | dependencies = (
220 | C23229A91E1254F900E84029 /* PBXTargetDependency */,
221 | );
222 | name = privateApiAppsTests;
223 | productName = privateApiAppsTests;
224 | productReference = C23229A71E1254F900E84029 /* privateApiAppsTests.xctest */;
225 | productType = "com.apple.product-type.bundle.unit-test";
226 | };
227 | C23229B11E1254F900E84029 /* privateApiAppsUITests */ = {
228 | isa = PBXNativeTarget;
229 | buildConfigurationList = C23229C11E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiAppsUITests" */;
230 | buildPhases = (
231 | C23229AE1E1254F900E84029 /* Sources */,
232 | C23229AF1E1254F900E84029 /* Frameworks */,
233 | C23229B01E1254F900E84029 /* Resources */,
234 | );
235 | buildRules = (
236 | );
237 | dependencies = (
238 | C23229B41E1254F900E84029 /* PBXTargetDependency */,
239 | );
240 | name = privateApiAppsUITests;
241 | productName = privateApiAppsUITests;
242 | productReference = C23229B21E1254F900E84029 /* privateApiAppsUITests.xctest */;
243 | productType = "com.apple.product-type.bundle.ui-testing";
244 | };
245 | /* End PBXNativeTarget section */
246 |
247 | /* Begin PBXProject section */
248 | C23229861E1254F900E84029 /* Project object */ = {
249 | isa = PBXProject;
250 | attributes = {
251 | LastUpgradeCheck = 0820;
252 | ORGANIZATIONNAME = miaoxiaodong;
253 | TargetAttributes = {
254 | C232298D1E1254F900E84029 = {
255 | CreatedOnToolsVersion = 8.2.1;
256 | DevelopmentTeam = 775V7Y38FR;
257 | ProvisioningStyle = Automatic;
258 | };
259 | C23229A61E1254F900E84029 = {
260 | CreatedOnToolsVersion = 8.2.1;
261 | DevelopmentTeam = 775V7Y38FR;
262 | ProvisioningStyle = Automatic;
263 | TestTargetID = C232298D1E1254F900E84029;
264 | };
265 | C23229B11E1254F900E84029 = {
266 | CreatedOnToolsVersion = 8.2.1;
267 | DevelopmentTeam = 775V7Y38FR;
268 | ProvisioningStyle = Automatic;
269 | TestTargetID = C232298D1E1254F900E84029;
270 | };
271 | };
272 | };
273 | buildConfigurationList = C23229891E1254F900E84029 /* Build configuration list for PBXProject "privateApiApps" */;
274 | compatibilityVersion = "Xcode 3.2";
275 | developmentRegion = English;
276 | hasScannedForEncodings = 0;
277 | knownRegions = (
278 | en,
279 | Base,
280 | );
281 | mainGroup = C23229851E1254F900E84029;
282 | productRefGroup = C232298F1E1254F900E84029 /* Products */;
283 | projectDirPath = "";
284 | projectRoot = "";
285 | targets = (
286 | C232298D1E1254F900E84029 /* privateApiApps */,
287 | C23229A61E1254F900E84029 /* privateApiAppsTests */,
288 | C23229B11E1254F900E84029 /* privateApiAppsUITests */,
289 | );
290 | };
291 | /* End PBXProject section */
292 |
293 | /* Begin PBXResourcesBuildPhase section */
294 | C232298C1E1254F900E84029 /* Resources */ = {
295 | isa = PBXResourcesBuildPhase;
296 | buildActionMask = 2147483647;
297 | files = (
298 | C23229A11E1254F900E84029 /* LaunchScreen.storyboard in Resources */,
299 | C232299E1E1254F900E84029 /* Assets.xcassets in Resources */,
300 | C2175BCB1E16060F00E935E9 /* AppInfoViewController.xib in Resources */,
301 | C232299C1E1254F900E84029 /* Main.storyboard in Resources */,
302 | );
303 | runOnlyForDeploymentPostprocessing = 0;
304 | };
305 | C23229A51E1254F900E84029 /* Resources */ = {
306 | isa = PBXResourcesBuildPhase;
307 | buildActionMask = 2147483647;
308 | files = (
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | C23229B01E1254F900E84029 /* Resources */ = {
313 | isa = PBXResourcesBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | );
317 | runOnlyForDeploymentPostprocessing = 0;
318 | };
319 | /* End PBXResourcesBuildPhase section */
320 |
321 | /* Begin PBXSourcesBuildPhase section */
322 | C232298A1E1254F900E84029 /* Sources */ = {
323 | isa = PBXSourcesBuildPhase;
324 | buildActionMask = 2147483647;
325 | files = (
326 | C2175BC91E16060F00E935E9 /* AppsObject.m in Sources */,
327 | C23229961E1254F900E84029 /* AppDelegate.m in Sources */,
328 | C2175BCA1E16060F00E935E9 /* AppInfoViewController.m in Sources */,
329 | C23229931E1254F900E84029 /* main.m in Sources */,
330 | C2175BCC1E16060F00E935E9 /* ViewController.m in Sources */,
331 | C2175BD21E1606D300E935E9 /* InfoTableViewController.m in Sources */,
332 | );
333 | runOnlyForDeploymentPostprocessing = 0;
334 | };
335 | C23229A31E1254F900E84029 /* Sources */ = {
336 | isa = PBXSourcesBuildPhase;
337 | buildActionMask = 2147483647;
338 | files = (
339 | C23229AC1E1254F900E84029 /* privateApiAppsTests.m in Sources */,
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | C23229AE1E1254F900E84029 /* Sources */ = {
344 | isa = PBXSourcesBuildPhase;
345 | buildActionMask = 2147483647;
346 | files = (
347 | C23229B71E1254F900E84029 /* privateApiAppsUITests.m in Sources */,
348 | );
349 | runOnlyForDeploymentPostprocessing = 0;
350 | };
351 | /* End PBXSourcesBuildPhase section */
352 |
353 | /* Begin PBXTargetDependency section */
354 | C23229A91E1254F900E84029 /* PBXTargetDependency */ = {
355 | isa = PBXTargetDependency;
356 | target = C232298D1E1254F900E84029 /* privateApiApps */;
357 | targetProxy = C23229A81E1254F900E84029 /* PBXContainerItemProxy */;
358 | };
359 | C23229B41E1254F900E84029 /* PBXTargetDependency */ = {
360 | isa = PBXTargetDependency;
361 | target = C232298D1E1254F900E84029 /* privateApiApps */;
362 | targetProxy = C23229B31E1254F900E84029 /* PBXContainerItemProxy */;
363 | };
364 | /* End PBXTargetDependency section */
365 |
366 | /* Begin PBXVariantGroup section */
367 | C232299A1E1254F900E84029 /* Main.storyboard */ = {
368 | isa = PBXVariantGroup;
369 | children = (
370 | C232299B1E1254F900E84029 /* Base */,
371 | );
372 | name = Main.storyboard;
373 | sourceTree = "";
374 | };
375 | C232299F1E1254F900E84029 /* LaunchScreen.storyboard */ = {
376 | isa = PBXVariantGroup;
377 | children = (
378 | C23229A01E1254F900E84029 /* Base */,
379 | );
380 | name = LaunchScreen.storyboard;
381 | sourceTree = "";
382 | };
383 | /* End PBXVariantGroup section */
384 |
385 | /* Begin XCBuildConfiguration section */
386 | C23229B91E1254F900E84029 /* Debug */ = {
387 | isa = XCBuildConfiguration;
388 | buildSettings = {
389 | ALWAYS_SEARCH_USER_PATHS = NO;
390 | CLANG_ANALYZER_NONNULL = YES;
391 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
392 | CLANG_CXX_LIBRARY = "libc++";
393 | CLANG_ENABLE_MODULES = YES;
394 | CLANG_ENABLE_OBJC_ARC = YES;
395 | CLANG_WARN_BOOL_CONVERSION = YES;
396 | CLANG_WARN_CONSTANT_CONVERSION = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
399 | CLANG_WARN_EMPTY_BODY = YES;
400 | CLANG_WARN_ENUM_CONVERSION = YES;
401 | CLANG_WARN_INFINITE_RECURSION = YES;
402 | CLANG_WARN_INT_CONVERSION = YES;
403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
404 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
405 | CLANG_WARN_UNREACHABLE_CODE = YES;
406 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
407 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
408 | COPY_PHASE_STRIP = NO;
409 | DEBUG_INFORMATION_FORMAT = dwarf;
410 | ENABLE_STRICT_OBJC_MSGSEND = YES;
411 | ENABLE_TESTABILITY = YES;
412 | GCC_C_LANGUAGE_STANDARD = gnu99;
413 | GCC_DYNAMIC_NO_PIC = NO;
414 | GCC_NO_COMMON_BLOCKS = YES;
415 | GCC_OPTIMIZATION_LEVEL = 0;
416 | GCC_PREPROCESSOR_DEFINITIONS = (
417 | "DEBUG=1",
418 | "$(inherited)",
419 | );
420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
422 | GCC_WARN_UNDECLARED_SELECTOR = YES;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
427 | MTL_ENABLE_DEBUG_INFO = YES;
428 | ONLY_ACTIVE_ARCH = YES;
429 | SDKROOT = iphoneos;
430 | TARGETED_DEVICE_FAMILY = "1,2";
431 | };
432 | name = Debug;
433 | };
434 | C23229BA1E1254F900E84029 /* Release */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | ALWAYS_SEARCH_USER_PATHS = NO;
438 | CLANG_ANALYZER_NONNULL = YES;
439 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
440 | CLANG_CXX_LIBRARY = "libc++";
441 | CLANG_ENABLE_MODULES = YES;
442 | CLANG_ENABLE_OBJC_ARC = YES;
443 | CLANG_WARN_BOOL_CONVERSION = YES;
444 | CLANG_WARN_CONSTANT_CONVERSION = YES;
445 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
446 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
447 | CLANG_WARN_EMPTY_BODY = YES;
448 | CLANG_WARN_ENUM_CONVERSION = YES;
449 | CLANG_WARN_INFINITE_RECURSION = YES;
450 | CLANG_WARN_INT_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
453 | CLANG_WARN_UNREACHABLE_CODE = YES;
454 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
456 | COPY_PHASE_STRIP = NO;
457 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
458 | ENABLE_NS_ASSERTIONS = NO;
459 | ENABLE_STRICT_OBJC_MSGSEND = YES;
460 | GCC_C_LANGUAGE_STANDARD = gnu99;
461 | GCC_NO_COMMON_BLOCKS = YES;
462 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
463 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
464 | GCC_WARN_UNDECLARED_SELECTOR = YES;
465 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
466 | GCC_WARN_UNUSED_FUNCTION = YES;
467 | GCC_WARN_UNUSED_VARIABLE = YES;
468 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
469 | MTL_ENABLE_DEBUG_INFO = NO;
470 | SDKROOT = iphoneos;
471 | TARGETED_DEVICE_FAMILY = "1,2";
472 | VALIDATE_PRODUCT = YES;
473 | };
474 | name = Release;
475 | };
476 | C23229BC1E1254F900E84029 /* Debug */ = {
477 | isa = XCBuildConfiguration;
478 | buildSettings = {
479 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
480 | DEVELOPMENT_TEAM = 775V7Y38FR;
481 | INFOPLIST_FILE = privateApiApps/Info.plist;
482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
483 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiApps;
484 | PRODUCT_NAME = "$(TARGET_NAME)";
485 | };
486 | name = Debug;
487 | };
488 | C23229BD1E1254F900E84029 /* Release */ = {
489 | isa = XCBuildConfiguration;
490 | buildSettings = {
491 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
492 | DEVELOPMENT_TEAM = 775V7Y38FR;
493 | INFOPLIST_FILE = privateApiApps/Info.plist;
494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
495 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiApps;
496 | PRODUCT_NAME = "$(TARGET_NAME)";
497 | };
498 | name = Release;
499 | };
500 | C23229BF1E1254F900E84029 /* Debug */ = {
501 | isa = XCBuildConfiguration;
502 | buildSettings = {
503 | BUNDLE_LOADER = "$(TEST_HOST)";
504 | DEVELOPMENT_TEAM = 775V7Y38FR;
505 | INFOPLIST_FILE = privateApiAppsTests/Info.plist;
506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
507 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiAppsTests;
508 | PRODUCT_NAME = "$(TARGET_NAME)";
509 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/privateApiApps.app/privateApiApps";
510 | };
511 | name = Debug;
512 | };
513 | C23229C01E1254F900E84029 /* Release */ = {
514 | isa = XCBuildConfiguration;
515 | buildSettings = {
516 | BUNDLE_LOADER = "$(TEST_HOST)";
517 | DEVELOPMENT_TEAM = 775V7Y38FR;
518 | INFOPLIST_FILE = privateApiAppsTests/Info.plist;
519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
520 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiAppsTests;
521 | PRODUCT_NAME = "$(TARGET_NAME)";
522 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/privateApiApps.app/privateApiApps";
523 | };
524 | name = Release;
525 | };
526 | C23229C21E1254F900E84029 /* Debug */ = {
527 | isa = XCBuildConfiguration;
528 | buildSettings = {
529 | DEVELOPMENT_TEAM = 775V7Y38FR;
530 | INFOPLIST_FILE = privateApiAppsUITests/Info.plist;
531 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
532 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiAppsUITests;
533 | PRODUCT_NAME = "$(TARGET_NAME)";
534 | TEST_TARGET_NAME = privateApiApps;
535 | };
536 | name = Debug;
537 | };
538 | C23229C31E1254F900E84029 /* Release */ = {
539 | isa = XCBuildConfiguration;
540 | buildSettings = {
541 | DEVELOPMENT_TEAM = 775V7Y38FR;
542 | INFOPLIST_FILE = privateApiAppsUITests/Info.plist;
543 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
544 | PRODUCT_BUNDLE_IDENTIFIER = com.miaoxiaodong.privateApiAppsUITests;
545 | PRODUCT_NAME = "$(TARGET_NAME)";
546 | TEST_TARGET_NAME = privateApiApps;
547 | };
548 | name = Release;
549 | };
550 | /* End XCBuildConfiguration section */
551 |
552 | /* Begin XCConfigurationList section */
553 | C23229891E1254F900E84029 /* Build configuration list for PBXProject "privateApiApps" */ = {
554 | isa = XCConfigurationList;
555 | buildConfigurations = (
556 | C23229B91E1254F900E84029 /* Debug */,
557 | C23229BA1E1254F900E84029 /* Release */,
558 | );
559 | defaultConfigurationIsVisible = 0;
560 | defaultConfigurationName = Release;
561 | };
562 | C23229BB1E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiApps" */ = {
563 | isa = XCConfigurationList;
564 | buildConfigurations = (
565 | C23229BC1E1254F900E84029 /* Debug */,
566 | C23229BD1E1254F900E84029 /* Release */,
567 | );
568 | defaultConfigurationIsVisible = 0;
569 | defaultConfigurationName = Release;
570 | };
571 | C23229BE1E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiAppsTests" */ = {
572 | isa = XCConfigurationList;
573 | buildConfigurations = (
574 | C23229BF1E1254F900E84029 /* Debug */,
575 | C23229C01E1254F900E84029 /* Release */,
576 | );
577 | defaultConfigurationIsVisible = 0;
578 | defaultConfigurationName = Release;
579 | };
580 | C23229C11E1254F900E84029 /* Build configuration list for PBXNativeTarget "privateApiAppsUITests" */ = {
581 | isa = XCConfigurationList;
582 | buildConfigurations = (
583 | C23229C21E1254F900E84029 /* Debug */,
584 | C23229C31E1254F900E84029 /* Release */,
585 | );
586 | defaultConfigurationIsVisible = 0;
587 | defaultConfigurationName = Release;
588 | };
589 | /* End XCConfigurationList section */
590 | };
591 | rootObject = C23229861E1254F900E84029 /* Project object */;
592 | }
593 |
--------------------------------------------------------------------------------