Commit 1b4a9a5f8b7463e3dcbf7ed5b10c729f425580fd

Authored by guoruipeng
0 parents

no message

Showing 54 changed files with 2586 additions and 0 deletions
.gitignore 0 → 100644
  1 +++ a/.gitignore
  1 +# OS X
  2 +.DS_Store
  3 +
  4 +# Xcode
  5 +build/
  6 +Products/
  7 +*.pbxuser
  8 +!default.pbxuser
  9 +*.mode1v3
  10 +!default.mode1v3
  11 +*.mode2v3
  12 +!default.mode2v3
  13 +*.perspectivev3
  14 +!default.perspectivev3
  15 +xcuserdata/
  16 +*.xccheckout
  17 +profile
  18 +*.moved-aside
  19 +DerivedData
  20 +*.hmap
  21 +*.ipa
  22 +
  23 +# Bundler
  24 +.bundle
  25 +
  26 +# Add this line if you want to avoid checking in source code from Carthage dependencies.
  27 +# Carthage/Checkouts
  28 +
  29 +Carthage/Build
  30 +
  31 +# We recommend against adding the Pods directory to your .gitignore. However
  32 +# you should judge for yourself, the pros and cons are mentioned at:
  33 +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
  34 +#
  35 +# Note: if you ignore the Pods directory, make sure to uncomment
  36 +# `pod install` in .travis.yml
  37 +#
  38 +# Pods/
.travis.yml 0 → 100644
  1 +++ a/.travis.yml
  1 +# references:
  2 +# * https://www.objc.io/issues/6-build-tools/travis-ci/
  3 +# * https://github.com/supermarin/xcpretty#usage
  4 +
  5 +osx_image: xcode7.3
  6 +language: objective-c
  7 +# cache: cocoapods
  8 +# podfile: Example/Podfile
  9 +# before_install:
  10 +# - gem install cocoapods # Since Travis is not always on latest version
  11 +# - pod install --project-directory=Example
  12 +script:
  13 +- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/CNLiveMapModule.xcworkspace -scheme CNLiveMapModule-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
  14 +- pod lib lint
CNLiveMapModule.podspec 0 → 100644
  1 +++ a/CNLiveMapModule.podspec
  1 +#
  2 +# Be sure to run `pod lib lint CNLiveMapModule.podspec' to ensure this is a
  3 +# valid spec before submitting.
  4 +#
  5 +# Any lines starting with a # are optional, but their use is encouraged
  6 +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
  7 +#
  8 +
  9 +Pod::Spec.new do |s|
  10 + s.name = 'CNLiveMapModule'
  11 + s.version = '0.0.1'
  12 + s.summary = 'iOS 发送位置 组件.'
  13 +
  14 +# This description is used to generate tags and improve search results.
  15 +# * Think: What does it do? Why did you write it? What is the focus?
  16 +# * Try to keep it short, snappy and to the point.
  17 +# * Write the description between the DESC delimiters below.
  18 +# * Finally, don't worry about the indent, CocoaPods strips it!
  19 +
  20 + s.description = <<-DESC
  21 + iOS 发送位置 组件.
  22 + DESC
  23 +
  24 + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveMapModule.git'
  25 + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  26 + s.license = { :type => 'MIT', :file => 'LICENSE' }
  27 + s.author = { '郭瑞朋' => 'guoruipeng@cnlive.com' }
  28 + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveMapModule.git', :tag => s.version.to_s }
  29 + # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
  30 +
  31 + s.ios.deployment_target = '9.0'
  32 + ##################################Module###########################################
  33 + s.subspec 'Module' do |ss|
  34 + ss.source_files = 'CNLiveMapModule/Classes/Module/*.{h,m}'
  35 + ss.dependency 'CNLiveMapModule/Controller'
  36 + end
  37 + #############################################################################
  38 + ##################################Controller#####################################
  39 + s.subspec 'Controller' do |ss|
  40 + ss.source_files = 'CNLiveMapModule/Classes/Controller/*.{h,m}'
  41 + ss.dependency 'CNLiveMapModule/View'
  42 + end
  43 + #############################################################################
  44 + ##################################View###########################################
  45 + s.subspec 'View' do |ss|
  46 + ss.source_files = 'CNLiveMapModule/Classes/View/*.{h,m}'
  47 + # ss.dependency 'CNLiveMapModule/Model'
  48 + end
  49 + #############################################################################
  50 + ##################################Model###########################################
  51 + # s.subspec 'Model' do |ss|
  52 + # ss.source_files = 'CNLiveMapModule/Classes/Model/*.{h,m}'
  53 + # end
  54 + #############################################################################
  55 + #######自定义前缀文件
  56 + s.prefix_header_file = false
  57 + s.prefix_header_file = 'CNLiveMapModule/Classes/Map_PrefixHeader.pch'
  58 + s.static_framework = true
  59 + s.frameworks = 'UIKit'
  60 + s.resource_bundles = {
  61 + 'CNLiveMapModule' => ['CNLiveMapModule/Assets/CNLiveMapModule.xcassets']
  62 + }
  63 + s.dependency 'CNLiveTripartiteManagement/BaiduMapKit'#百度地图SDK
  64 + s.dependency 'CNLiveTripartiteManagement/BMKLocationKit'#定位
  65 + s.dependency 'CNLiveTripartiteManagement/QMUIKit'
  66 + s.dependency 'CNLiveTripartiteManagement/SDWebImage'
  67 + s.dependency 'CNLiveTripartiteManagement/Masonry'
  68 + s.dependency 'CNLiveTripartiteManagement/MJRefresh'
  69 + s.dependency 'CNLiveBaseKit'
  70 + s.dependency 'CNLiveRequestBastKit'
  71 + s.dependency 'CNLiveCommonClass'
  72 + s.dependency 'CNLiveEnvironment'
  73 + s.dependency 'CNLiveCustomUI'
  74 + # 服务层
  75 + s.dependency 'CNLiveServices'
  76 + s.dependency 'CNLiveManager'
  77 +
  78 +end
CNLiveMapModule/Assets/.gitkeep 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/.gitkeep
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/Contents.json
  1 +{
  2 + "info" : {
  3 + "version" : 1,
  4 + "author" : "xcode"
  5 + }
  6 +}
0 \ No newline at end of file 7 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_chose.imageset/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_chose.imageset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "where_chose@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "where_chose@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 \ No newline at end of file 23 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_chose.imageset/where_chose@2x.png 0 → 100644

1.23 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_chose.imageset/where_chose@3x.png 0 → 100644

2.97 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_no_select.imageset/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_no_select.imageset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "where_no_select@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "where_no_select@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 \ No newline at end of file 23 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_no_select.imageset/where_no_select@2x.png 0 → 100644

2.39 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_no_select.imageset/where_no_select@3x.png 0 → 100644

4.78 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_point_b.imageset/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_point_b.imageset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "where_point_b@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "where_point_b@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 \ No newline at end of file 23 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_point_b.imageset/where_point_b@2x.png 0 → 100644

1.59 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_point_b.imageset/where_point_b@3x.png 0 → 100644

3.15 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_position.imageset/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_position.imageset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "where_position@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "where_position@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 \ No newline at end of file 23 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_position.imageset/where_position@2x.png 0 → 100644

2.41 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_position.imageset/where_position@3x.png 0 → 100644

5.64 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_select.imageset/Contents.json 0 → 100644
  1 +++ a/CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_select.imageset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "idiom" : "universal",
  9 + "filename" : "where_select@2x.png",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "filename" : "where_select@3x.png",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
0 \ No newline at end of file 23 \ No newline at end of file
CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_select.imageset/where_select@2x.png 0 → 100644

2.39 KB

CNLiveMapModule/Assets/CNLiveMapModule.xcassets/where_select.imageset/where_select@3x.png 0 → 100644

4.73 KB

CNLiveMapModule/Classes/.gitkeep 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/.gitkeep
CNLiveMapModule/Classes/Controller/CNLiveMapViewController.h 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Controller/CNLiveMapViewController.h
  1 +//
  2 +// CNLiveMapViewController.h
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +#import "CNCommonViewController.h"
  10 +
  11 +NS_ASSUME_NONNULL_BEGIN
  12 +
  13 +@interface CNLiveMapViewController : CNCommonViewController
  14 +@property (nonatomic, weak) id<CNLiveSendPositonDelegate> delegate;
  15 +
  16 +@end
  17 +
  18 +NS_ASSUME_NONNULL_END
CNLiveMapModule/Classes/Controller/CNLiveMapViewController.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Controller/CNLiveMapViewController.m
  1 +//
  2 +// CNLiveMapViewController.m
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import "CNLiveMapViewController.h"
  9 +#import "CNLiveMapTableViewCell.h"
  10 +
  11 +@interface CNLiveMapViewController()
  12 +<
  13 +BMKMapViewDelegate,
  14 +BMKLocationManagerDelegate,
  15 +UITableViewDelegate,
  16 +UITableViewDataSource,
  17 +BMKPoiSearchDelegate,
  18 +BMKGeoCodeSearchDelegate,
  19 +UISearchControllerDelegate,
  20 +UISearchResultsUpdating,
  21 +UISearchBarDelegate
  22 +>
  23 +@property (nonatomic, strong) UIButton *sendBarItem;
  24 +@property (nonatomic, strong) BMKMapView *mapView;//地图
  25 +@property (nonatomic, strong) BMKUserLocation *userLocation; //当前位置对象
  26 +@property (nonatomic, strong) UIButton *repositionBtn;//重新定位按钮
  27 +@property (nonatomic, strong) BMKLocationManager *locationManager;//定位管理
  28 +///tableview
  29 +@property (nonatomic, strong) UITableView *tableView;
  30 +@property (nonatomic, strong) NSArray *dataArray;
  31 +@property (nonatomic, strong) NSIndexPath *selectedIndexPath;//选择的cell
  32 +
  33 +//逆地理获取POI
  34 +@property (nonatomic, strong) BMKGeoCodeSearch *geoCodeSearch;
  35 +///poi搜索
  36 +@property (nonatomic, strong) BMKPoiSearch *poiSearch;
  37 +@property (nonatomic, copy) NSString *tempCity;
  38 +///关键字搜索
  39 +@property (nonatomic, strong) UISearchController *searchController;
  40 +@property (nonatomic, assign) CGFloat keyBoardTempHeight;
  41 +
  42 +@property (nonatomic, strong) UITableView *searchTableView;
  43 +@property (nonatomic, strong) NSArray *searchDataArray;
  44 +
  45 +@end
  46 +@implementation CNLiveMapViewController
  47 +
  48 +-(void)viewWillAppear:(BOOL)animated{
  49 + [super viewWillAppear:animated];
  50 + [_mapView viewWillAppear];
  51 +}
  52 +
  53 +-(void)viewWillDisappear:(BOOL)animated{
  54 + [super viewWillDisappear:animated];
  55 + [_mapView viewWillDisappear];
  56 +}
  57 +- (void)viewDidLoad {
  58 + [super viewDidLoad];
  59 + self.title = @"位置";
  60 + self.selectedIndexPath=[NSIndexPath indexPathForRow:0 inSection:0];
  61 + //发送按钮
  62 + self.sendBarItem = [UIButton buttonWithType:UIButtonTypeCustom];
  63 + self.sendBarItem.frame = CGRectMake(0, 0, 60, 30);
  64 + [self.sendBarItem setTitle:@"发送" forState:UIControlStateNormal];
  65 + [self.sendBarItem addTarget:self action:@selector(sendLocation) forControlEvents:UIControlEventTouchUpInside];
  66 + [self.sendBarItem setTitleColor:RGBOF(0x9C9C9C) forState:UIControlStateNormal];
  67 + self.sendBarItem.userInteractionEnabled = NO;
  68 + UIBarButtonItem *rightCunstomButtonView = [[UIBarButtonItem alloc] initWithCustomView:self.sendBarItem];
  69 +
  70 + self.navigationItem.rightBarButtonItem = rightCunstomButtonView;
  71 + //添加地图view
  72 + [self.view addSubview:self.mapView];
  73 + //在地图上添加重新定位按钮
  74 + [self.mapView addSubview:self.repositionBtn];
  75 + [self.repositionBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  76 + make.right.equalTo(self.mapView.mas_right).offset(-10);
  77 + make.bottom.equalTo(self.mapView.mas_bottom).offset(-20);
  78 + make.size.mas_equalTo(CGSizeMake(50, 50));
  79 + }];
  80 + [self repositionAction];
  81 + //添加searchView
  82 + [self addSearchController];
  83 + //添加tableview
  84 + [self.view addSubview:self.tableView];
  85 + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  86 + make.left.right.mas_equalTo(self.view);
  87 + make.top.equalTo(self.mapView.mas_bottom);
  88 + make.bottom.equalTo(self.view.mas_bottom).offset(-kVerticalBottomSafeHeight);
  89 + }];
  90 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(becomeActive) name:UIApplicationDidBecomeActiveNotification object:nil];
  91 + [CNLiveMapViewController networkStatusWithBlock:^(CNLiveNetworkStatusType status) {
  92 + if (status == CNLiveNetworkStatusUnknown || status == CNLiveNetworkStatusNotReachable) {
  93 + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"refreshBDVC"];
  94 + }else{
  95 + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"refreshBDVC"];
  96 + if([UIApplication sharedApplication].applicationState == UIApplicationStateActive)
  97 + {
  98 + [self.tableView.mj_header beginRefreshing];
  99 + }
  100 + }
  101 + }];
  102 +}
  103 +
  104 +#pragma mark -- private
  105 +- (void)becomeActive{
  106 + if ([CNLiveNetworking isNetworking]) {
  107 + BOOL b = [[NSUserDefaults standardUserDefaults]boolForKey:@"refreshBDVC"];
  108 + if (b) {
  109 + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"refreshBDVC"];
  110 + [self.tableView.mj_header beginRefreshing];
  111 + }
  112 + }
  113 +}
  114 +- (void)reloadMapTableView{
  115 + if (![CNLiveNetworking isNetworking]) {
  116 + [QMUITips showLoadingInView:self.tableView];
  117 + self.dataArray = @[];
  118 + [self.tableView reloadData];
  119 + return;
  120 + }
  121 + [QMUITips hideAllTips];
  122 + self.selectedIndexPath=[NSIndexPath indexPathForRow:0 inSection:0];
  123 + [self.tableView.mj_header beginRefreshing];
  124 +}
  125 +
  126 +- (void)addSearchController{
  127 + self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
  128 + self.searchController.delegate = self;
  129 + self.searchController.searchResultsUpdater = self;
  130 + self.searchController.hidesNavigationBarDuringPresentation = YES;
  131 +// self.searchController.obscuresBackgroundDuringPresentation = YES;
  132 + self.searchController.dimsBackgroundDuringPresentation = YES;
  133 + UISearchBar *bar = self.searchController.searchBar;
  134 + bar.frame = CGRectMake(0, self.mapView.frame.origin.y, SCREEN_WIDTH, 44);
  135 + bar.barStyle = UIBarStyleDefault;
  136 + bar.delegate = self;
  137 + bar.translucent = NO;
  138 + bar.barTintColor = [UIColor groupTableViewBackgroundColor];
  139 + bar.tintColor = [UIColor colorWithRed:0 green:(190 / 255.0) blue:(12 / 255.0) alpha:1];
  140 + UIImageView *view = [[[bar.subviews objectAtIndex:0] subviews] firstObject];
  141 + view.layer.borderColor = [UIColor colorWithRed:((0xdddddd >> 16) & 0x000000FF)/255.0f green:((0xdddddd >> 8) & 0x000000FF)/255.0f blue:((0xdddddd) & 0x000000FF)/255.0 alpha:1].CGColor;
  142 + view.layer.borderWidth = 0.7;
  143 + bar.showsBookmarkButton = NO;
  144 + [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor redColor], NSFontAttributeName: [UIFont systemFontOfSize:16]} forState:UIControlStateNormal];
  145 +
  146 + // 修改标题文字
  147 + [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTitle:@"取消"];
  148 + UITextField *searchField = [bar valueForKey:@"searchField"];
  149 + searchField.placeholder = @"搜索地点";
  150 + searchField.returnKeyType = UIReturnKeyDone;
  151 +
  152 + // 获取清除按钮
  153 + UIButton * clearBtn = [searchField valueForKey:@"_clearButton"];
  154 + // 重新绑定触发方法
  155 + [clearBtn addTarget:self action:@selector(clearBtnClick) forControlEvents:UIControlEventTouchUpInside];
  156 + if (searchField) {
  157 + [searchField setBackgroundColor:[UIColor whiteColor]];
  158 + searchField.layer.cornerRadius = 3.0f;
  159 + searchField.layer.borderColor = [UIColor colorWithRed:((0xdddddd >> 16) & 0x000000FF)/255.0f green:((0xdddddd >> 8) & 0x000000FF)/255.0f blue:((0xdddddd) & 0x000000FF)/255.0 alpha:1].CGColor;
  160 + searchField.layer.borderWidth = 0.7;
  161 + }
  162 + [self.view addSubview:bar];
  163 +}
  164 +
  165 +- (void)repositionAction{
  166 + [self.sendBarItem setTitleColor:KGray102Color forState:UIControlStateNormal];
  167 + self.sendBarItem.userInteractionEnabled = NO;
  168 + @try {
  169 + [self.locationManager stopUpdatingLocation];
  170 + } @catch (NSException *exception) {
  171 + NSLog(@"CNBDMapViewController.m 崩溃了");
  172 + }
  173 + MJWeakSelf
  174 + [self.locationManager requestLocationWithReGeocode:YES withNetworkState:YES completionBlock:^(BMKLocation * _Nullable location, BMKLocationNetworkState state, NSError * _Nullable error) {
  175 + [QMUITips hideAllTips];
  176 + BOOL isError = false;
  177 + if (error)
  178 + {
  179 + isError = YES;
  180 + }
  181 + if (location && !isError) {//得到定位信息,添加annotation
  182 +
  183 + if (location.location) {
  184 + NSLog(@"LOC = %@",location.location);
  185 + //把地图放到位置中心点
  186 + [weakSelf.mapView setCenterCoordinate:location.location.coordinate animated:YES];
  187 + //实现该方法,否则定位图标不出现
  188 + weakSelf.userLocation.location = location.location;
  189 + [weakSelf.mapView updateLocationData:weakSelf.userLocation];
  190 + //获取POI
  191 + __strong typeof(weakSelf) strongSelf = weakSelf;
  192 + [strongSelf reloadMapTableView];
  193 + }
  194 + if (location.rgcData) {
  195 + weakSelf.tempCity = location.rgcData.city;
  196 + }
  197 + }else{
  198 + isError = YES;
  199 + }
  200 + if ([error.localizedDescription containsString:@"网络"] && [error.localizedDescription containsString:@"失败"]) {
  201 + UIAlertController *con = [UIAlertController alertControllerWithTitle:@"" message:@"网络错误,请检查您的网络。" preferredStyle:1];
  202 + UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"好" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  203 + }];
  204 + [con addAction:action1];
  205 + [weakSelf presentViewController:con animated:YES completion:nil];
  206 + }else{
  207 + if (isError) {
  208 + UIAlertController *con = [UIAlertController alertControllerWithTitle:@"" message:@"无法获取您的位置信息。" preferredStyle:1];
  209 + UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"好" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  210 + }];
  211 + [con addAction:action1];
  212 + [weakSelf presentViewController:con animated:YES completion:nil];
  213 + }
  214 + }
  215 + }];
  216 +}
  217 +- (void)sendLocation{
  218 + MJWeakSelf
  219 + //30秒没反应弹窗提醒错误,拦截回退不截图
  220 + BMKPoiInfo *info = self.dataArray[self.selectedIndexPath.row];
  221 + if (!info) {
  222 + [QMUITips hideAllTips];
  223 + return;
  224 + }
  225 + [QMUITips showLoadingInView:[UIApplication sharedApplication].delegate.window];
  226 + NSArray *sendARR = @[info.name,info.address.length>0?info.address:@"未知地点"];
  227 + float level = self.mapView.zoomLevel;
  228 + level<3?level=3:level;
  229 + level>18?level=18:level;
  230 + NSString *centerPointStr = [NSString stringWithFormat:@"%f,%f",info.pt.longitude,info.pt.latitude];
  231 + NSString *imagUrl = [NSString stringWithFormat:@"http://api.map.baidu.com/staticimage/v2?ak=%@&mcode=%@&center=%@&width=560&height=280&coordtype=gcj02ll&dpiType=ph&zoom=%f",BDMapAK,BDMapMCODE,centerPointStr,level];
  232 + [QMUITips hideAllTipsInView:[UIApplication sharedApplication].delegate.window];
  233 + if (self.delegate && [self.delegate respondsToSelector:@selector(sendCurrentLocation:image:addressName:)]) {
  234 + CLLocationCoordinate2D location = self.mapView.centerCoordinate;
  235 + [self.delegate sendCurrentLocation:location image:imagUrl addressName:sendARR];
  236 + [weakSelf.navigationController popViewControllerAnimated:YES];
  237 + }else{
  238 + [QMUITips showError:@"发送失败" inView:[UIApplication sharedApplication].delegate.window hideAfterDelay:1.5];
  239 + }
  240 +}
  241 +
  242 +//逆地理位置返回poi(跟Android一致)
  243 +- (void)getPOIInfo:(CLLocationCoordinate2D)coordinate{
  244 + if (![CNLiveNetworking isNetworking]) {
  245 + [self.tableView.mj_header endRefreshing];
  246 + self.dataArray = @[];
  247 + [self.tableView reloadData];
  248 + return;
  249 + }
  250 + BMKReverseGeoCodeSearchOption *reverseGeoCodeOption = [[BMKReverseGeoCodeSearchOption alloc]init];
  251 + reverseGeoCodeOption.location = coordinate;//CLLocationCoordinate2DMake(39.915, 116.404);
  252 + // 是否访问最新版行政区划数据(仅对中国数据生效)
  253 + reverseGeoCodeOption.isLatestAdmin = YES;
  254 + BOOL flag = [self.geoCodeSearch reverseGeoCode: reverseGeoCodeOption];
  255 + if (flag) {
  256 + NSLog(@"逆geo检索发送成功");
  257 + } else {
  258 + NSLog(@"逆geo检索发送失败");
  259 + }
  260 +}
  261 +
  262 +//输入内容检索
  263 +- (void)clearBtnClick{
  264 + self.searchDataArray = @[];
  265 + [self.searchTableView reloadData];
  266 +}
  267 +
  268 +//添加屏幕中心点标注
  269 +- (void)addCenterAnnotation{
  270 + BMKPointAnnotation* annotation = [[BMKPointAnnotation alloc]init];
  271 + annotation.isLockedToScreen = YES;
  272 + CGPoint p = CGPointZero;
  273 + p.x = SCREEN_WIDTH/2;
  274 + p.y = self.mapView.frame.size.height/2-14;
  275 + annotation.screenPointToLock = p;
  276 + [_mapView addAnnotation:annotation];
  277 +}
  278 +#pragma mark -- textfieldDelegate
  279 +// 点击键盘Return键取消第一响应者
  280 +- (BOOL)textFieldShouldReturn:(UITextField *)textField{
  281 + return YES;
  282 +}
  283 +
  284 +#pragma mark -- scrollViewDelegate
  285 +- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
  286 + if (scrollView == self.searchTableView) {
  287 + [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
  288 + }
  289 +}
  290 +#pragma mark -- SearchControllerDelegate
  291 +-(void)didPresentSearchController:(UISearchController *)searchController{
  292 + UIView *_statusView = [[UIView alloc] initWithFrame:CGRectMake(0, -50, SCREEN_WIDTH, 150)];
  293 + _statusView.backgroundColor = self.searchController.view.backgroundColor;// [UIColor groupTableViewBackgroundColor];
  294 + [self.searchController.view addSubview:_statusView];
  295 + self.searchController.searchBar.frame = CGRectMake(0, kNavigationBarHeight + kVerticalStatusHeight, self.searchController.searchBar.frame.size.width, 44);
  296 + UISearchBar *bar = self.searchController.searchBar;
  297 + [self.searchController.view addSubview:bar];
  298 + [self.searchController.view addSubview:self.searchTableView];
  299 + [self.searchTableView mas_makeConstraints:^(MASConstraintMaker *make) {
  300 + make.left.right.equalTo(self.searchController.view);
  301 + make.bottom.equalTo(self.searchController.view).offset(-kVerticalBottomSafeHeight);
  302 + make.top.equalTo(self.searchController.searchBar.mas_bottom);
  303 + }];
  304 +}
  305 +-(void)updateSearchResultsForSearchController:(UISearchController *)searchController {
  306 + if (CNLiveStringTrimedIsEmpty(searchController.searchBar.text)) {
  307 + self.searchDataArray = @[];
  308 + [self.searchTableView reloadData];
  309 + return;
  310 + }
  311 + //初始化请求参数类BMKCitySearchOption的实例
  312 + BMKPOICitySearchOption *cityOption = [[BMKPOICitySearchOption alloc] init];
  313 + //检索关键字,必选。举例:小吃
  314 + cityOption.keyword = searchController.searchBar.text;
  315 + //区域名称(市或区的名字,如北京市,海淀区),最长不超过25个字符,必选
  316 + cityOption.city = self.tempCity;
  317 + //检索分类,可选,与keyword字段组合进行检索,多个分类以","分隔。举例:美食,烧烤,酒店
  318 +// cityOption.tags = @[@"美食",@"烧烤"];
  319 + //区域数据返回限制,可选,为YES时,仅返回city对应区域内数据
  320 +// cityOption.isCityLimit = YES;
  321 + //POI检索结果详细程度
  322 + //cityOption.scope = BMK_POI_SCOPE_BASIC_INFORMATION;
  323 + //检索过滤条件,scope字段为BMK_POI_SCOPE_DETAIL_INFORMATION时,filter字段才有效
  324 + //cityOption.filter = filter;
  325 + //分页页码,默认为0,0代表第一页,1代表第二页,以此类推
  326 + cityOption.pageIndex = 0;
  327 + //单次召回POI数量,默认为10条记录,最大返回20条
  328 + cityOption.pageSize = 10;
  329 + BOOL flag = [self.poiSearch poiSearchInCity:cityOption];
  330 + if(flag) {
  331 + NSLog(@"POI城市内检索成功");
  332 + } else {
  333 + NSLog(@"POI城市内检索失败");
  334 + }
  335 +}
  336 +
  337 +- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar{ // return NO to not become first responder
  338 + if (self.tempCity.length > 0) {
  339 + return YES;
  340 + }else{
  341 + [QMUITips showWithText:@"获取定位信息失败,请重试。" inView:[UIApplication sharedApplication].delegate.window hideAfterDelay:1.5];
  342 + return NO;
  343 + }
  344 +}
  345 +
  346 +-(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar{
  347 + self.searchDataArray = @[];
  348 + [self.searchTableView reloadData];
  349 +}
  350 +
  351 +- (void)didDismissSearchController:(UISearchController *)searchController{
  352 + self.searchController.searchBar.frame = CGRectMake(0,kNavigationBarHeight, self.searchController.searchBar.frame.size.width, 44.0);
  353 +}
  354 +
  355 +#pragma mark -- tableViewDelegate
  356 +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  357 + static NSString *indentify = @"CNMapTableViewCell";
  358 + CNLiveMapTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indentify];
  359 + if (!cell) {
  360 + cell = [[CNLiveMapTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentify];
  361 + }
  362 + if (tableView == self.tableView) {
  363 + BMKPoiInfo *info = self.dataArray[indexPath.row];
  364 + cell.name.text = info.name;
  365 + cell.address.text = info.address;
  366 + [cell setFirstCell:indexPath];
  367 + if (indexPath.row == self.selectedIndexPath.row) {
  368 + cell.choseIMG.hidden = NO;
  369 + }else{
  370 + cell.choseIMG.hidden = YES;
  371 + }
  372 + }else{
  373 + BMKPoiInfo *info = self.searchDataArray[indexPath.row];
  374 + cell.name.text = info.name;
  375 + cell.address.text = info.address;
  376 + [cell setSearchCell];
  377 + }
  378 + return cell;
  379 +}
  380 +
  381 +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  382 + if (tableView == self.tableView) {
  383 + CNLiveMapTableViewCell *cell = [self.tableView cellForRowAtIndexPath:self.selectedIndexPath];
  384 + cell.choseIMG.hidden = YES;
  385 + self.selectedIndexPath=indexPath;
  386 + CNLiveMapTableViewCell *cell1 = [self.tableView cellForRowAtIndexPath:self.selectedIndexPath];
  387 + cell1.choseIMG.hidden = NO;
  388 + BMKPoiInfo *info = self.dataArray[indexPath.row];
  389 + [self.mapView setCenterCoordinate:info.pt animated:YES];
  390 + }else{
  391 + BMKPoiInfo *info = self.searchDataArray[indexPath.row];
  392 + self.searchController.active = NO;
  393 + [self.mapView setCenterCoordinate:info.pt animated:YES];
  394 + [self reloadMapTableView];
  395 + }
  396 +}
  397 +
  398 +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  399 + return kDefaultCellHeight;
  400 +}
  401 +
  402 +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  403 + if (tableView == self.tableView) {
  404 + return self.dataArray.count;
  405 + }else{
  406 + return self.searchDataArray.count;
  407 + }
  408 + return 0;
  409 +}
  410 +#pragma mark -- 地图delegate
  411 +- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager doRequestAlwaysAuthorization:(CLLocationManager * _Nonnull)locationManager{
  412 + [locationManager requestAlwaysAuthorization];
  413 +}
  414 +//权限改变
  415 +- (void)BMKLocationManager:(BMKLocationManager * _Nonnull)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{
  416 + if (status == kCLAuthorizationStatusDenied) {
  417 + MJWeakSelf
  418 + QMUIAlertAction *action1 = [QMUIAlertAction actionWithTitle:@"确定" style:QMUIAlertActionStyleCancel handler:^(__kindof QMUIAlertController *aAlertController, QMUIAlertAction *action) {
  419 + [weakSelf.navigationController popViewControllerAnimated:YES];
  420 + }];
  421 + QMUIAlertController *alertController = [QMUIAlertController alertControllerWithTitle:@"" message:@"无法获取你的位置信息。\n 请到手机系统的[隐私]->[定位服务]中打开定位服务,并允许网家家使用定位服务" preferredStyle:QMUIAlertControllerStyleAlert];
  422 + [alertController addAction:action1];
  423 + [alertController showWithAnimated:YES];
  424 + }
  425 +}
  426 +
  427 +/**
  428 + *地图区域改变完成后会调用此接口
  429 + *@param mapView 地图View
  430 + *@param animated 是否动画
  431 + *@param reason 地区区域改变的原因
  432 + */
  433 +- (void)mapView:(BMKMapView *)mapView regionDidChangeAnimated:(BOOL)animated reason:(BMKRegionChangeReason)reason{
  434 + [QMUITips hideAllTips];
  435 + if (reason == BMKRegionChangeReasonGesture) {//手势触发导致地图区域变化,如双击、拖拽、滑动地图
  436 + [self.sendBarItem setTitleColor:KGray102Color forState:UIControlStateNormal];
  437 + self.sendBarItem.userInteractionEnabled = NO;
  438 + [self reloadMapTableView];
  439 + }else if(reason == BMKRegionChangeReasonEvent){//地图上控件事件,如点击指南针返回2D地图。
  440 + NSLog(@"");
  441 + }else if(reason == BMKRegionChangeReasonAPIs){//开发者调用接口、设置地图参数等导致地图区域变化
  442 + NSLog(@"");
  443 + }
  444 +}
  445 +/**
  446 + *地图初始化完毕时会调用此接口
  447 + *@param mapView 地图View
  448 + */
  449 +-(void)mapViewDidFinishLoading:(BMKMapView *)mapView{
  450 + [self addCenterAnnotation];
  451 +}
  452 +
  453 +/**
  454 + *根据anntation生成对应的View
  455 + *@param mapView 地图View
  456 + *@param annotation 指定的标注
  457 + *@return 生成的标注View
  458 + */
  459 +- (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation{
  460 + if ([annotation isKindOfClass:[BMKPointAnnotation class]])
  461 + {
  462 + static NSString *reuseIndetifier = @"annotationReuseIndetifier";
  463 + BMKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:reuseIndetifier];
  464 + if (annotationView == nil)
  465 + {
  466 + annotationView = [[BMKAnnotationView alloc] initWithAnnotation:annotation
  467 + reuseIdentifier:reuseIndetifier];
  468 + }
  469 + UIImage *image = [self getImageName:@"where_point_b" bundleName:@"CNLiveMapModule" targetClass:[self class]];
  470 +
  471 + annotationView.image = image;
  472 + return annotationView;
  473 + }
  474 + return nil;
  475 +}
  476 +
  477 +#pragma mark - 逆地理获取POI
  478 +/**
  479 + 反向地理编码检索结果回调
  480 +
  481 + @param searcher 检索对象
  482 + @param result 反向地理编码检索结果
  483 + @param error 错误码,@see BMKCloudErrorCode
  484 + */
  485 +- (void)onGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeSearchResult *)result errorCode:(BMKSearchErrorCode)error {
  486 + [self.tableView.mj_header endRefreshing];
  487 + [QMUITips hideAllTips];
  488 + if (error == BMK_SEARCH_NO_ERROR) {
  489 + //在此处理正常结果
  490 + NSLog(@"检索结果返回成功:%@",result.poiList);
  491 + if (result.poiList.count > 0) {
  492 + self.dataArray = result.poiList;
  493 + }else{
  494 + BMKPoiInfo *info = [[BMKPoiInfo alloc]init];
  495 + info.name = @"[位置]";
  496 + info.address = @"未知地点";
  497 + self.dataArray = @[info];
  498 + }
  499 + self.selectedIndexPath=[NSIndexPath indexPathForRow:0 inSection:0];
  500 + [self.tableView reloadData];
  501 + [self.sendBarItem setTitleColor:UIColorMake(26, 173, 25) forState:UIControlStateNormal];
  502 + self.sendBarItem.userInteractionEnabled = YES;
  503 + [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:(UITableViewScrollPositionNone) animated:NO];
  504 +
  505 + }else {//错误的结果,提示
  506 + if (error == BMK_SEARCH_NETWOKR_ERROR) {
  507 + [QMUITips showInfo:@"网络错误,请检查网络。" inView:[UIApplication sharedApplication].delegate.window hideAfterDelay:1.5];
  508 + }else{
  509 + [QMUITips showInfo:@"未知错误,请重试" inView:[UIApplication sharedApplication].delegate.window hideAfterDelay:1.5];
  510 + }
  511 + }
  512 +}
  513 +#pragma mark - poi搜索Delegate
  514 +/**
  515 + *返回POI搜索结果
  516 + *@param searcher 搜索对象
  517 + *@param poiResult 搜索结果列表
  518 + *@param errorCode 错误码,@see BMKSearchErrorCode
  519 + */
  520 +- (void)onGetPoiResult:(BMKPoiSearch*)searcher result:(BMKPOISearchResult*)poiResult errorCode:(BMKSearchErrorCode)errorCode{
  521 + //BMKSearchErrorCode错误码,BMK_SEARCH_NO_ERROR:检索结果正常返回
  522 + if (errorCode == BMK_SEARCH_NO_ERROR) {
  523 + //在此处理正常结果
  524 + NSLog(@"检索结果返回成功:%@",poiResult.poiInfoList);
  525 + BMKPoiInfo *info = poiResult.poiInfoList[0];
  526 + if (info.UID.length == 0) {
  527 + self.searchDataArray = @[];
  528 + [self.searchTableView reloadData];
  529 + [QMUITips showInfo:@"无结果" inView:self.searchController.view hideAfterDelay:1.5];
  530 + return;
  531 + }
  532 + self.searchDataArray = poiResult.poiInfoList;
  533 + [self.searchTableView reloadData];
  534 + }
  535 + else {//错误的结果,提示
  536 + NSLog(@"其他检索结果错误码");
  537 + self.searchDataArray = @[];
  538 + [self.searchTableView reloadData];
  539 + [QMUITips showInfo:@"无结果" inView:self.searchController.view hideAfterDelay:1.5];
  540 + }
  541 +}
  542 +
  543 +#pragma mark -- lazy
  544 +- (BMKMapView *)mapView{
  545 + if (!_mapView) {
  546 + _mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, SCREEN_WIDTH, (self.view.height-44-20)/2)];
  547 + _mapView.delegate = self;
  548 + _mapView.zoomLevel = 17;//缩放等级4-21
  549 + _mapView.showMapScaleBar = YES;//显示比例尺
  550 + //打开实时路况图层
  551 + // [_mapView setTrafficEnabled:YES];
  552 + _mapView.showsUserLocation = YES;//显示定位图层
  553 + //显示我的位置,我的位置图标和地图都不会旋转
  554 + _mapView.userTrackingMode = BMKUserTrackingModeNone;
  555 + //更换我的位置图标
  556 + // self.mapView是BMKMapView对象
  557 + BMKLocationViewDisplayParam *param = [[BMKLocationViewDisplayParam alloc] init];
  558 + //定位图标名称,需要将该图片放到 mapapi.bundle/images 目录下
  559 + // param.locationViewImgName = @"icon_nav_bus";
  560 + //用户自定义定位图标,V4.2.1以后支持
  561 + UIImage *image = [self getImageName:@"where_position" bundleName:@"CNLiveMapModule" targetClass:[self class]];
  562 + param.locationViewImage = image;
  563 + //根据配置参数更新定位图层样式
  564 + //设置显示精度圈,默认YES
  565 + param.isAccuracyCircleShow = YES;
  566 + //精度圈 边框颜色
  567 + param.accuracyCircleStrokeColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:0];
  568 + //精度圈 填充颜色
  569 + param.accuracyCircleFillColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:0];
  570 + [_mapView updateLocationViewWithParam:param];
  571 +
  572 + }
  573 + return _mapView;
  574 +}
  575 +-(BMKUserLocation *)userLocation{
  576 + if (!_userLocation) {
  577 + _userLocation = [[BMKUserLocation alloc] init];
  578 + }
  579 + return _userLocation;
  580 +}
  581 +-(UIButton *)repositionBtn{
  582 + if (!_repositionBtn) {
  583 + _repositionBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  584 + UIImage *image1 = [self getImageName:@"where_select" bundleName:@"CNLiveMapModule" targetClass:[self class]];
  585 + UIImage *image2 = [self getImageName:@"where_no_select" bundleName:@"CNLiveMapModule" targetClass:[self class]];
  586 +
  587 + [_repositionBtn setImage:image1 forState:UIControlStateNormal];
  588 + [_repositionBtn setImage:image2 forState:UIControlStateSelected];
  589 + [_repositionBtn addTarget:self action:@selector(repositionAction) forControlEvents:UIControlEventTouchUpInside];
  590 + }
  591 + return _repositionBtn;
  592 +}
  593 +-(BMKLocationManager *)locationManager{
  594 + if (!_locationManager) {
  595 + //初始化实例
  596 + _locationManager = [[BMKLocationManager alloc] init];
  597 + //设置delegate
  598 + _locationManager.delegate = self;
  599 + //设置返回位置的坐标系类型
  600 + _locationManager.coordinateType = BMKLocationCoordinateTypeGCJ02;
  601 + //设置距离过滤参数
  602 + _locationManager.distanceFilter = 1.0f;
  603 + //设置预期精度参数
  604 + _locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters;
  605 + //设置应用位置类型
  606 + _locationManager.activityType = CLActivityTypeFitness;
  607 + //设置是否自动停止位置更新
  608 + _locationManager.pausesLocationUpdatesAutomatically = NO;
  609 + //设置是否允许后台定位
  610 + //_locationManager.allowsBackgroundLocationUpdates = YES;
  611 + //设置位置获取超时时间
  612 +// _locationManager.locationTimeout = 3;
  613 + //设置获取地址信息超时时间
  614 +// _locationManager.reGeocodeTimeout = 3;
  615 + }
  616 + return _locationManager;
  617 +}
  618 +-(UITableView *)tableView{
  619 + if (!_tableView) {
  620 + _tableView = [[UITableView alloc] init];
  621 + _tableView.backgroundColor = RGB(242, 242, 242);
  622 + _tableView.delegate = self;
  623 + _tableView.dataSource = self;
  624 + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  625 + _tableView.separatorColor = [UIColor clearColor];
  626 + MJWeakSelf
  627 + _tableView.mj_header = [CNLiveRefreshHeader headerWithRefreshingBlock:^{
  628 + [weakSelf getPOIInfo:weakSelf.mapView.centerCoordinate];
  629 + }];
  630 + }
  631 + return _tableView;
  632 +}
  633 +-(BMKPoiSearch *)poiSearch{
  634 + if (!_poiSearch) {
  635 + _poiSearch = [[BMKPoiSearch alloc] init];
  636 + _poiSearch.delegate = self;
  637 + }
  638 + return _poiSearch;
  639 +}
  640 +
  641 +-(BMKGeoCodeSearch *)geoCodeSearch{
  642 + if (!_geoCodeSearch) {
  643 + _geoCodeSearch = [[BMKGeoCodeSearch alloc] init];
  644 + _geoCodeSearch.delegate = self;
  645 + }
  646 + return _geoCodeSearch;
  647 +}
  648 +
  649 +-(UITableView *)searchTableView{
  650 + if (!_searchTableView) {
  651 + _searchTableView = [[UITableView alloc] init];
  652 + _searchTableView.backgroundColor = KGrayBgColor;
  653 + _searchTableView.delegate = self;
  654 + _searchTableView.dataSource = self;
  655 + _searchTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  656 + _searchTableView.separatorColor = [UIColor clearColor];
  657 + }
  658 + return _searchTableView;
  659 +}
  660 +
  661 +#pragma mark -- bundle图片
  662 +/**
  663 + * 创建图片
  664 + *
  665 + * @param imageName 图片名字
  666 + * @param bundleName 图片所在的bundle名字
  667 + * @param targetClass 类和bundle的同级目录
  668 + * @return 返回UIImage
  669 + */
  670 +- (UIImage *)getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{
  671 + NSBundle *bundle = [NSBundle bundleForClass:targetClass];
  672 + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];
  673 + NSBundle *targetBundle = [NSBundle bundleWithURL:url];
  674 + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];
  675 + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
  676 +}
  677 +@end
CNLiveMapModule/Classes/Map_PrefixHeader.pch 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Map_PrefixHeader.pch
  1 +//
  2 +// PrefixHeader.pch
  3 +// Pods
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#ifndef PrefixHeader_pch
  9 +#define PrefixHeader_pch
  10 +#import <BaiduMapAPI_Base/BMKBaseComponent.h>//引入base相关所有的头文件
  11 +#import <BaiduMapAPI_Map/BMKMapComponent.h>//引入地图功能所有的头文件
  12 +#import <BMKLocationkit/BMKLocationComponent.h>//定位功能
  13 +#import <BaiduMapAPI_Search/BMKSearchComponent.h>//poi搜索功能
  14 +#import <BaiduMapAPI_Base/BMKBaseComponent.h>
  15 +#import <BaiduMapAPI_Search/BMKSearchComponent.h>
  16 +#import <CNLiveCommonClass/CNCommonViewController.h>
  17 +#import <MJRefresh/MJRefresh.h>
  18 +#import <Masonry/Masonry.h>
  19 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
  20 +#import <CNLiveRequestBastKit/CNLiveNetworking.h>
  21 +#import <QMUIKit/QMUIKit.h>
  22 +#import <SDWebImage/SDWebImage.h>
  23 +#import <MJRefresh/MJRefresh.h>
  24 +#import <CNLiveEnvironment/CNLiveEnvironment.h>
  25 +#import <CNLiveCustomUI/CNLiveRefreshHeader.h>
  26 +#import <CNLiveServices/CNLiveServices.h>
  27 +// Include any system framework and library headers here that should be included in all compilation units.
  28 +// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
  29 +
  30 +#endif /* PrefixHeader_pch */
CNLiveMapModule/Classes/Model/test3.h 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Model/test3.h
  1 +//
  2 +// test3.h
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by open on 2019/11/21.
  6 +//
  7 +
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface test3 : NSObject
  13 +
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveMapModule/Classes/Model/test3.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Model/test3.m
  1 +//
  2 +// test3.m
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by open on 2019/11/21.
  6 +//
  7 +
  8 +#import "test3.h"
  9 +
  10 +@implementation test3
  11 +
  12 +@end
CNLiveMapModule/Classes/Module/CNLiveSendPositonModule.h 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Module/CNLiveSendPositonModule.h
  1 +//
  2 +// CNLiveSendPositonModule.h
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveSendPositonModule : NSObject
  13 +
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveMapModule/Classes/Module/CNLiveSendPositonModule.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Module/CNLiveSendPositonModule.m
  1 +//
  2 +// CNLiveSendPositonModule.m
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import "CNLiveSendPositonModule.h"
  9 +#import "CNLiveServices.h"
  10 +
  11 +@BeeHiveMod(CNLiveSendPositonModule)
  12 +@interface CNLiveSendPositonModule()<BHModuleProtocol>
  13 +
  14 +@end
  15 +@implementation CNLiveSendPositonModule
  16 +- (id)init {
  17 + if (self = [super init]) {
  18 +
  19 + }
  20 + return self;
  21 +}
  22 +
  23 +- (NSUInteger)moduleLevel {
  24 + return 0;
  25 +}
  26 +
  27 +- (void)modSetUp:(BHContext *)context {
  28 + switch (context.env) {
  29 + case BHEnvironmentDev:
  30 + //....初始化开发环境
  31 + break;
  32 + case BHEnvironmentProd:
  33 + //....初始化生产环境
  34 + default:
  35 + break;
  36 + }
  37 +
  38 +}
  39 +
  40 +- (void)modInit:(BHContext *)context {
  41 +
  42 +}
  43 +
  44 +@end
CNLiveMapModule/Classes/Module/CNLiveSendPositonService.h 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Module/CNLiveSendPositonService.h
  1 +//
  2 +// CNLiveSendPositonService.h
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveSendPositonService : NSObject
  13 +
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveMapModule/Classes/Module/CNLiveSendPositonService.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/Module/CNLiveSendPositonService.m
  1 +//
  2 +// CNLiveSendPositonService.m
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import "CNLiveSendPositonService.h"
  9 +#import "CNLiveServices.h"
  10 +#import "CNLiveMapViewController.h"
  11 +#import <CNLiveManager/CNLiveManager.h>
  12 +
  13 +@BeeHiveService(CNLiveSendPositionProtocol,CNLiveSendPositonService)
  14 +@interface CNLiveSendPositonService ()<CNLiveSendPositionProtocol>
  15 +
  16 +@end
  17 +@implementation CNLiveSendPositonService
  18 +
  19 +- (nonnull UIViewController *)getMapDetailViewController {
  20 + return nil;
  21 +}
  22 +
  23 +- (void)pushToMapDetailViewController {
  24 +
  25 +}
  26 +
  27 +- (void)pushToMapViewController:(id)delegate {
  28 + CNLiveMapViewController *vc = [CNLiveMapViewController new];
  29 + vc.delegate = delegate;
  30 + [CNLivePageJumpManager pushViewController:vc];
  31 +}
  32 +
  33 +@end
CNLiveMapModule/Classes/ReplaceMe.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/ReplaceMe.m
CNLiveMapModule/Classes/View/CNLiveMapTableViewCell.h 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/View/CNLiveMapTableViewCell.h
  1 +//
  2 +// CNLiveMapTableViewCell.h
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveMapTableViewCell : UITableViewCell
  13 +@property (nonatomic, strong) UILabel *name;
  14 +@property (nonatomic, strong) UILabel *address;
  15 +@property (nonatomic, strong) UIImageView *choseIMG;
  16 +- (void)setFirstCell:(NSIndexPath *)path;
  17 +- (void)setSearchCell;
  18 +@end
  19 +
  20 +NS_ASSUME_NONNULL_END
CNLiveMapModule/Classes/View/CNLiveMapTableViewCell.m 0 → 100644
  1 +++ a/CNLiveMapModule/Classes/View/CNLiveMapTableViewCell.m
  1 +//
  2 +// CNLiveMapTableViewCell.m
  3 +// AFNetworking
  4 +//
  5 +// Created by open on 2019/11/22.
  6 +//
  7 +
  8 +#import "CNLiveMapTableViewCell.h"
  9 +
  10 +@interface CNLiveMapTableViewCell()
  11 +@property (nonatomic, strong) UIView *lineView;
  12 +
  13 +@end
  14 +@implementation CNLiveMapTableViewCell
  15 +
  16 +- (void)awakeFromNib {
  17 + [super awakeFromNib];
  18 + // Initialization code
  19 +}
  20 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  21 +{
  22 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  23 + if (self) {
  24 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  25 + [self initLayout];
  26 + }
  27 + return self;
  28 +}
  29 +
  30 +- (void)initLayout{
  31 + [self addSubview:self.name];
  32 + [self addSubview:self.address];
  33 + [self addSubview:self.choseIMG];
  34 + [self addSubview:self.lineView];
  35 +}
  36 +
  37 +- (void)setFirstCell:(NSIndexPath *)path{
  38 + if (path.row == 0) {
  39 + self.address.hidden = YES;
  40 + [self.name mas_remakeConstraints:^(MASConstraintMaker *make) {
  41 + make.left.equalTo(self).offset(15);
  42 + make.right.equalTo(self.choseIMG.mas_left).offset(-5);
  43 + make.centerY.equalTo(self);
  44 + }];
  45 + self.choseIMG.hidden = NO;
  46 + }else{
  47 + self.address.hidden = NO;
  48 + [self.name mas_remakeConstraints:^(MASConstraintMaker *make) {
  49 + make.left.equalTo(self).offset(15);
  50 + make.right.equalTo(self.choseIMG.mas_left).offset(-5);
  51 + make.top.equalTo(self).offset(10);
  52 + }];
  53 + [self.address mas_remakeConstraints:^(MASConstraintMaker *make) {
  54 + make.left.equalTo(self).offset(15);
  55 + make.right.equalTo(self.choseIMG.mas_left).offset(-5);
  56 + make.bottom.equalTo(self).offset(-10);
  57 + }];
  58 + self.choseIMG.hidden = YES;
  59 + }
  60 + [self.choseIMG mas_remakeConstraints:^(MASConstraintMaker *make) {
  61 + make.centerY.equalTo(self);
  62 + make.width.height.mas_equalTo(20);
  63 + make.right.equalTo(self.mas_right).offset(-15);
  64 + }];
  65 +
  66 + [self.lineView mas_remakeConstraints:^(MASConstraintMaker *make) {
  67 + make.bottom.equalTo(self.mas_bottom);
  68 + make.right.equalTo(self.mas_right);
  69 + make.left.equalTo(self.mas_left).offset(15);
  70 + make.height.equalTo(@(1));
  71 + }];
  72 +}
  73 +- (void)setSearchCell{
  74 + [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
  75 + make.left.equalTo(self).offset(15);
  76 + make.top.equalTo(self).offset(10);
  77 + }];
  78 + [self.address mas_makeConstraints:^(MASConstraintMaker *make) {
  79 + make.left.equalTo(self).offset(15);
  80 + make.right.equalTo(self.mas_right).offset(-15);
  81 + make.bottom.equalTo(self).offset(-10);
  82 + }];
  83 + [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  84 + make.bottom.equalTo(self.mas_bottom);
  85 + make.right.equalTo(self.mas_right);
  86 + make.left.equalTo(self.mas_left).offset(15);
  87 + make.height.equalTo(@(1));
  88 + }];
  89 +}
  90 +-(UILabel *)name{
  91 + if (_name == nil) {
  92 + _name = [[UILabel alloc] init];
  93 + _name.font = UIFontCNMake(17);
  94 + _name.textColor = [UIColor blackColor];
  95 + }
  96 + return _name;
  97 +}
  98 +
  99 +-(UILabel *)address{
  100 + if (_address == nil) {
  101 + _address = [[UILabel alloc] init];
  102 + _address.font = UIFontCNMake(14);
  103 + _address.textColor = [UIColor colorWithRed:101/255.0 green:101/255.0 blue:101/255.0 alpha:1.0];
  104 + }
  105 + return _address;
  106 +}
  107 +-(UIImageView *)choseIMG{
  108 + if (_choseIMG == nil) {
  109 + _choseIMG = [[UIImageView alloc] init];
  110 + UIImage *image = [self getImageName:@"where_chose" bundleName:@"CNLiveMapModule" targetClass:[self class]];
  111 + _choseIMG.image = image;
  112 + _choseIMG.hidden = YES;
  113 + }
  114 + return _choseIMG;
  115 +}
  116 +-(UIView *)lineView{
  117 + if (_lineView == nil) {
  118 + _lineView = [[UIView alloc] init];
  119 + _lineView.backgroundColor = KGrayLineColor;
  120 + }
  121 + return _lineView;
  122 +}
  123 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  124 + [super setSelected:selected animated:animated];
  125 +
  126 + // Configure the view for the selected state
  127 +}
  128 +#pragma mark -- bundle图片
  129 +/**
  130 + * 创建图片
  131 + *
  132 + * @param imageName 图片名字
  133 + * @param bundleName 图片所在的bundle名字
  134 + * @param targetClass 类和bundle的同级目录
  135 + * @return 返回UIImage
  136 + */
  137 +- (UIImage *)getImageName:(NSString *)imageName bundleName:(NSString *)bundleName targetClass:(Class)targetClass{
  138 + NSBundle *bundle = [NSBundle bundleForClass:targetClass];
  139 + NSURL *url = [bundle URLForResource:bundleName withExtension:@"bundle"];
  140 + NSBundle *targetBundle = [NSBundle bundleWithURL:url];
  141 + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil];
  142 + return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
  143 +}
  144 +@end
Example/CNLiveMapModule.xcodeproj/project.pbxproj 0 → 100644
  1 +++ a/Example/CNLiveMapModule.xcodeproj/project.pbxproj
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  11 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
  12 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  13 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; };
  14 + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; };
  15 + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */; };
  16 + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLIVEViewController.m */; };
  17 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
  18 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
  19 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  20 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  21 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
  22 + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
  23 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
  24 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
  25 + BA77BD909F46345C42EE0A8A /* libPods-CNLiveMapModule_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 207A06C7BA9FAC47585FB7D0 /* libPods-CNLiveMapModule_Example.a */; };
  26 + E7BD5CA7BAB1F872D41733C7 /* libPods-CNLiveMapModule_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB7AC79F3E7A256B51893001 /* libPods-CNLiveMapModule_Tests.a */; };
  27 +/* End PBXBuildFile section */
  28 +
  29 +/* Begin PBXContainerItemProxy section */
  30 + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = {
  31 + isa = PBXContainerItemProxy;
  32 + containerPortal = 6003F582195388D10070C39A /* Project object */;
  33 + proxyType = 1;
  34 + remoteGlobalIDString = 6003F589195388D20070C39A;
  35 + remoteInfo = CNLiveMapModule;
  36 + };
  37 +/* End PBXContainerItemProxy section */
  38 +
  39 +/* Begin PBXFileReference section */
  40 + 207A06C7BA9FAC47585FB7D0 /* libPods-CNLiveMapModule_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CNLiveMapModule_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
  41 + 6003F58A195388D20070C39A /* CNLiveMapModule_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveMapModule_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
  42 + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
  43 + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
  44 + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
  45 + 6003F595195388D20070C39A /* CNLiveMapModule-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLiveMapModule-Info.plist"; sourceTree = "<group>"; };
  46 + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  47 + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  48 + 6003F59B195388D20070C39A /* CNLiveMapModule-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveMapModule-Prefix.pch"; sourceTree = "<group>"; };
  49 + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEAppDelegate.h; sourceTree = "<group>"; };
  50 + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEAppDelegate.m; sourceTree = "<group>"; };
  51 + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEViewController.h; sourceTree = "<group>"; };
  52 + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEViewController.m; sourceTree = "<group>"; };
  53 + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
  54 + 6003F5AE195388D20070C39A /* CNLiveMapModule_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveMapModule_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
  55 + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
  56 + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
  57 + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  58 + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
  59 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
  60 + 6738A3AD938AEFF6116D2ADC /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
  61 + 6C2D42C231A5A1B1E71B9AC5 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
  62 + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  63 + 7FD8311977E33E53ACE186A0 /* Pods-CNLiveMapModule_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveMapModule_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveMapModule_Example/Pods-CNLiveMapModule_Example.debug.xcconfig"; sourceTree = "<group>"; };
  64 + 84A44D79057983482DF6803C /* Pods-CNLiveMapModule_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveMapModule_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveMapModule_Example/Pods-CNLiveMapModule_Example.release.xcconfig"; sourceTree = "<group>"; };
  65 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  66 + B40A0CC225F7A654646D49EF /* Pods-CNLiveMapModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveMapModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveMapModule_Tests/Pods-CNLiveMapModule_Tests.release.xcconfig"; sourceTree = "<group>"; };
  67 + C90EE460E908C716971A6DEA /* Pods-CNLiveMapModule_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveMapModule_Tests.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveMapModule_Tests/Pods-CNLiveMapModule_Tests.debug.xcconfig"; sourceTree = "<group>"; };
  68 + DB7AC79F3E7A256B51893001 /* libPods-CNLiveMapModule_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CNLiveMapModule_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
  69 + EEA4CF5F7EFD2DB95B91CC94 /* CNLiveMapModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveMapModule.podspec; path = ../CNLiveMapModule.podspec; sourceTree = "<group>"; };
  70 +/* End PBXFileReference section */
  71 +
  72 +/* Begin PBXFrameworksBuildPhase section */
  73 + 6003F587195388D20070C39A /* Frameworks */ = {
  74 + isa = PBXFrameworksBuildPhase;
  75 + buildActionMask = 2147483647;
  76 + files = (
  77 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
  78 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
  79 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
  80 + BA77BD909F46345C42EE0A8A /* libPods-CNLiveMapModule_Example.a in Frameworks */,
  81 + );
  82 + runOnlyForDeploymentPostprocessing = 0;
  83 + };
  84 + 6003F5AB195388D20070C39A /* Frameworks */ = {
  85 + isa = PBXFrameworksBuildPhase;
  86 + buildActionMask = 2147483647;
  87 + files = (
  88 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
  89 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
  90 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
  91 + E7BD5CA7BAB1F872D41733C7 /* libPods-CNLiveMapModule_Tests.a in Frameworks */,
  92 + );
  93 + runOnlyForDeploymentPostprocessing = 0;
  94 + };
  95 +/* End PBXFrameworksBuildPhase section */
  96 +
  97 +/* Begin PBXGroup section */
  98 + 04699A0679F99770C88B212F /* Pods */ = {
  99 + isa = PBXGroup;
  100 + children = (
  101 + 7FD8311977E33E53ACE186A0 /* Pods-CNLiveMapModule_Example.debug.xcconfig */,
  102 + 84A44D79057983482DF6803C /* Pods-CNLiveMapModule_Example.release.xcconfig */,
  103 + C90EE460E908C716971A6DEA /* Pods-CNLiveMapModule_Tests.debug.xcconfig */,
  104 + B40A0CC225F7A654646D49EF /* Pods-CNLiveMapModule_Tests.release.xcconfig */,
  105 + );
  106 + path = Pods;
  107 + sourceTree = "<group>";
  108 + };
  109 + 6003F581195388D10070C39A = {
  110 + isa = PBXGroup;
  111 + children = (
  112 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
  113 + 6003F593195388D20070C39A /* Example for CNLiveMapModule */,
  114 + 6003F5B5195388D20070C39A /* Tests */,
  115 + 6003F58C195388D20070C39A /* Frameworks */,
  116 + 6003F58B195388D20070C39A /* Products */,
  117 + 04699A0679F99770C88B212F /* Pods */,
  118 + );
  119 + sourceTree = "<group>";
  120 + };
  121 + 6003F58B195388D20070C39A /* Products */ = {
  122 + isa = PBXGroup;
  123 + children = (
  124 + 6003F58A195388D20070C39A /* CNLiveMapModule_Example.app */,
  125 + 6003F5AE195388D20070C39A /* CNLiveMapModule_Tests.xctest */,
  126 + );
  127 + name = Products;
  128 + sourceTree = "<group>";
  129 + };
  130 + 6003F58C195388D20070C39A /* Frameworks */ = {
  131 + isa = PBXGroup;
  132 + children = (
  133 + 6003F58D195388D20070C39A /* Foundation.framework */,
  134 + 6003F58F195388D20070C39A /* CoreGraphics.framework */,
  135 + 6003F591195388D20070C39A /* UIKit.framework */,
  136 + 6003F5AF195388D20070C39A /* XCTest.framework */,
  137 + 207A06C7BA9FAC47585FB7D0 /* libPods-CNLiveMapModule_Example.a */,
  138 + DB7AC79F3E7A256B51893001 /* libPods-CNLiveMapModule_Tests.a */,
  139 + );
  140 + name = Frameworks;
  141 + sourceTree = "<group>";
  142 + };
  143 + 6003F593195388D20070C39A /* Example for CNLiveMapModule */ = {
  144 + isa = PBXGroup;
  145 + children = (
  146 + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */,
  147 + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */,
  148 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
  149 + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */,
  150 + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */,
  151 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
  152 + 6003F5A8195388D20070C39A /* Images.xcassets */,
  153 + 6003F594195388D20070C39A /* Supporting Files */,
  154 + );
  155 + name = "Example for CNLiveMapModule";
  156 + path = CNLiveMapModule;
  157 + sourceTree = "<group>";
  158 + };
  159 + 6003F594195388D20070C39A /* Supporting Files */ = {
  160 + isa = PBXGroup;
  161 + children = (
  162 + 6003F595195388D20070C39A /* CNLiveMapModule-Info.plist */,
  163 + 6003F596195388D20070C39A /* InfoPlist.strings */,
  164 + 6003F599195388D20070C39A /* main.m */,
  165 + 6003F59B195388D20070C39A /* CNLiveMapModule-Prefix.pch */,
  166 + );
  167 + name = "Supporting Files";
  168 + sourceTree = "<group>";
  169 + };
  170 + 6003F5B5195388D20070C39A /* Tests */ = {
  171 + isa = PBXGroup;
  172 + children = (
  173 + 6003F5BB195388D20070C39A /* Tests.m */,
  174 + 6003F5B6195388D20070C39A /* Supporting Files */,
  175 + );
  176 + path = Tests;
  177 + sourceTree = "<group>";
  178 + };
  179 + 6003F5B6195388D20070C39A /* Supporting Files */ = {
  180 + isa = PBXGroup;
  181 + children = (
  182 + 6003F5B7195388D20070C39A /* Tests-Info.plist */,
  183 + 6003F5B8195388D20070C39A /* InfoPlist.strings */,
  184 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */,
  185 + );
  186 + name = "Supporting Files";
  187 + sourceTree = "<group>";
  188 + };
  189 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = {
  190 + isa = PBXGroup;
  191 + children = (
  192 + EEA4CF5F7EFD2DB95B91CC94 /* CNLiveMapModule.podspec */,
  193 + 6738A3AD938AEFF6116D2ADC /* README.md */,
  194 + 6C2D42C231A5A1B1E71B9AC5 /* LICENSE */,
  195 + );
  196 + name = "Podspec Metadata";
  197 + sourceTree = "<group>";
  198 + };
  199 +/* End PBXGroup section */
  200 +
  201 +/* Begin PBXNativeTarget section */
  202 + 6003F589195388D20070C39A /* CNLiveMapModule_Example */ = {
  203 + isa = PBXNativeTarget;
  204 + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveMapModule_Example" */;
  205 + buildPhases = (
  206 + 0EBAD4C74864DAF6F9FCC13D /* [CP] Check Pods Manifest.lock */,
  207 + 6003F586195388D20070C39A /* Sources */,
  208 + 6003F587195388D20070C39A /* Frameworks */,
  209 + 6003F588195388D20070C39A /* Resources */,
  210 + 76CA77EA73352F21A182C839 /* [CP] Copy Pods Resources */,
  211 + );
  212 + buildRules = (
  213 + );
  214 + dependencies = (
  215 + );
  216 + name = CNLiveMapModule_Example;
  217 + productName = CNLiveMapModule;
  218 + productReference = 6003F58A195388D20070C39A /* CNLiveMapModule_Example.app */;
  219 + productType = "com.apple.product-type.application";
  220 + };
  221 + 6003F5AD195388D20070C39A /* CNLiveMapModule_Tests */ = {
  222 + isa = PBXNativeTarget;
  223 + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveMapModule_Tests" */;
  224 + buildPhases = (
  225 + 5000692ED2927ACAE23C01EB /* [CP] Check Pods Manifest.lock */,
  226 + 6003F5AA195388D20070C39A /* Sources */,
  227 + 6003F5AB195388D20070C39A /* Frameworks */,
  228 + 6003F5AC195388D20070C39A /* Resources */,
  229 + );
  230 + buildRules = (
  231 + );
  232 + dependencies = (
  233 + 6003F5B4195388D20070C39A /* PBXTargetDependency */,
  234 + );
  235 + name = CNLiveMapModule_Tests;
  236 + productName = CNLiveMapModuleTests;
  237 + productReference = 6003F5AE195388D20070C39A /* CNLiveMapModule_Tests.xctest */;
  238 + productType = "com.apple.product-type.bundle.unit-test";
  239 + };
  240 +/* End PBXNativeTarget section */
  241 +
  242 +/* Begin PBXProject section */
  243 + 6003F582195388D10070C39A /* Project object */ = {
  244 + isa = PBXProject;
  245 + attributes = {
  246 + CLASSPREFIX = CNLIVE;
  247 + LastUpgradeCheck = 0720;
  248 + ORGANIZATIONNAME = "郭瑞朋";
  249 + TargetAttributes = {
  250 + 6003F589195388D20070C39A = {
  251 + DevelopmentTeam = 94X49GG3ZW;
  252 + };
  253 + 6003F5AD195388D20070C39A = {
  254 + TestTargetID = 6003F589195388D20070C39A;
  255 + };
  256 + };
  257 + };
  258 + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveMapModule" */;
  259 + compatibilityVersion = "Xcode 3.2";
  260 + developmentRegion = English;
  261 + hasScannedForEncodings = 0;
  262 + knownRegions = (
  263 + English,
  264 + en,
  265 + Base,
  266 + );
  267 + mainGroup = 6003F581195388D10070C39A;
  268 + productRefGroup = 6003F58B195388D20070C39A /* Products */;
  269 + projectDirPath = "";
  270 + projectRoot = "";
  271 + targets = (
  272 + 6003F589195388D20070C39A /* CNLiveMapModule_Example */,
  273 + 6003F5AD195388D20070C39A /* CNLiveMapModule_Tests */,
  274 + );
  275 + };
  276 +/* End PBXProject section */
  277 +
  278 +/* Begin PBXResourcesBuildPhase section */
  279 + 6003F588195388D20070C39A /* Resources */ = {
  280 + isa = PBXResourcesBuildPhase;
  281 + buildActionMask = 2147483647;
  282 + files = (
  283 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */,
  284 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */,
  285 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */,
  286 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */,
  287 + );
  288 + runOnlyForDeploymentPostprocessing = 0;
  289 + };
  290 + 6003F5AC195388D20070C39A /* Resources */ = {
  291 + isa = PBXResourcesBuildPhase;
  292 + buildActionMask = 2147483647;
  293 + files = (
  294 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */,
  295 + );
  296 + runOnlyForDeploymentPostprocessing = 0;
  297 + };
  298 +/* End PBXResourcesBuildPhase section */
  299 +
  300 +/* Begin PBXShellScriptBuildPhase section */
  301 + 0EBAD4C74864DAF6F9FCC13D /* [CP] Check Pods Manifest.lock */ = {
  302 + isa = PBXShellScriptBuildPhase;
  303 + buildActionMask = 2147483647;
  304 + files = (
  305 + );
  306 + inputFileListPaths = (
  307 + );
  308 + inputPaths = (
  309 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  310 + "${PODS_ROOT}/Manifest.lock",
  311 + );
  312 + name = "[CP] Check Pods Manifest.lock";
  313 + outputFileListPaths = (
  314 + );
  315 + outputPaths = (
  316 + "$(DERIVED_FILE_DIR)/Pods-CNLiveMapModule_Example-checkManifestLockResult.txt",
  317 + );
  318 + runOnlyForDeploymentPostprocessing = 0;
  319 + shellPath = /bin/sh;
  320 + 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";
  321 + showEnvVarsInLog = 0;
  322 + };
  323 + 5000692ED2927ACAE23C01EB /* [CP] Check Pods Manifest.lock */ = {
  324 + isa = PBXShellScriptBuildPhase;
  325 + buildActionMask = 2147483647;
  326 + files = (
  327 + );
  328 + inputFileListPaths = (
  329 + );
  330 + inputPaths = (
  331 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  332 + "${PODS_ROOT}/Manifest.lock",
  333 + );
  334 + name = "[CP] Check Pods Manifest.lock";
  335 + outputFileListPaths = (
  336 + );
  337 + outputPaths = (
  338 + "$(DERIVED_FILE_DIR)/Pods-CNLiveMapModule_Tests-checkManifestLockResult.txt",
  339 + );
  340 + runOnlyForDeploymentPostprocessing = 0;
  341 + shellPath = /bin/sh;
  342 + 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";
  343 + showEnvVarsInLog = 0;
  344 + };
  345 + 76CA77EA73352F21A182C839 /* [CP] Copy Pods Resources */ = {
  346 + isa = PBXShellScriptBuildPhase;
  347 + buildActionMask = 2147483647;
  348 + files = (
  349 + );
  350 + inputPaths = (
  351 + "${PODS_ROOT}/Target Support Files/Pods-CNLiveMapModule_Example/Pods-CNLiveMapModule_Example-resources.sh",
  352 + "${PODS_ROOT}/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle",
  353 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveBeeHive/CNLiveBeeHive.bundle",
  354 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveCustomUI/CNLiveCustomUI.bundle",
  355 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveMapModule/CNLiveMapModule.bundle",
  356 + "${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle",
  357 + "${PODS_ROOT}/QMUIKit/QMUIKit/QMUIResources/Images.xcassets",
  358 + );
  359 + name = "[CP] Copy Pods Resources";
  360 + outputPaths = (
  361 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mapapi.bundle",
  362 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveBeeHive.bundle",
  363 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveCustomUI.bundle",
  364 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveMapModule.bundle",
  365 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MJRefresh.bundle",
  366 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Assets.car",
  367 + );
  368 + runOnlyForDeploymentPostprocessing = 0;
  369 + shellPath = /bin/sh;
  370 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveMapModule_Example/Pods-CNLiveMapModule_Example-resources.sh\"\n";
  371 + showEnvVarsInLog = 0;
  372 + };
  373 +/* End PBXShellScriptBuildPhase section */
  374 +
  375 +/* Begin PBXSourcesBuildPhase section */
  376 + 6003F586195388D20070C39A /* Sources */ = {
  377 + isa = PBXSourcesBuildPhase;
  378 + buildActionMask = 2147483647;
  379 + files = (
  380 + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */,
  381 + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */,
  382 + 6003F59A195388D20070C39A /* main.m in Sources */,
  383 + );
  384 + runOnlyForDeploymentPostprocessing = 0;
  385 + };
  386 + 6003F5AA195388D20070C39A /* Sources */ = {
  387 + isa = PBXSourcesBuildPhase;
  388 + buildActionMask = 2147483647;
  389 + files = (
  390 + 6003F5BC195388D20070C39A /* Tests.m in Sources */,
  391 + );
  392 + runOnlyForDeploymentPostprocessing = 0;
  393 + };
  394 +/* End PBXSourcesBuildPhase section */
  395 +
  396 +/* Begin PBXTargetDependency section */
  397 + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = {
  398 + isa = PBXTargetDependency;
  399 + target = 6003F589195388D20070C39A /* CNLiveMapModule_Example */;
  400 + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
  401 + };
  402 +/* End PBXTargetDependency section */
  403 +
  404 +/* Begin PBXVariantGroup section */
  405 + 6003F596195388D20070C39A /* InfoPlist.strings */ = {
  406 + isa = PBXVariantGroup;
  407 + children = (
  408 + 6003F597195388D20070C39A /* en */,
  409 + );
  410 + name = InfoPlist.strings;
  411 + sourceTree = "<group>";
  412 + };
  413 + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = {
  414 + isa = PBXVariantGroup;
  415 + children = (
  416 + 6003F5B9195388D20070C39A /* en */,
  417 + );
  418 + name = InfoPlist.strings;
  419 + sourceTree = "<group>";
  420 + };
  421 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = {
  422 + isa = PBXVariantGroup;
  423 + children = (
  424 + 71719F9E1E33DC2100824A3D /* Base */,
  425 + );
  426 + name = LaunchScreen.storyboard;
  427 + sourceTree = "<group>";
  428 + };
  429 +/* End PBXVariantGroup section */
  430 +
  431 +/* Begin XCBuildConfiguration section */
  432 + 6003F5BD195388D20070C39A /* Debug */ = {
  433 + isa = XCBuildConfiguration;
  434 + buildSettings = {
  435 + ALWAYS_SEARCH_USER_PATHS = NO;
  436 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  437 + CLANG_CXX_LIBRARY = "libc++";
  438 + CLANG_ENABLE_MODULES = YES;
  439 + CLANG_ENABLE_OBJC_ARC = YES;
  440 + CLANG_WARN_BOOL_CONVERSION = YES;
  441 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  442 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  443 + CLANG_WARN_EMPTY_BODY = YES;
  444 + CLANG_WARN_ENUM_CONVERSION = YES;
  445 + CLANG_WARN_INT_CONVERSION = YES;
  446 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  447 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  448 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  449 + COPY_PHASE_STRIP = NO;
  450 + ENABLE_TESTABILITY = YES;
  451 + GCC_C_LANGUAGE_STANDARD = gnu99;
  452 + GCC_DYNAMIC_NO_PIC = NO;
  453 + GCC_OPTIMIZATION_LEVEL = 0;
  454 + GCC_PREPROCESSOR_DEFINITIONS = (
  455 + "DEBUG=1",
  456 + "$(inherited)",
  457 + );
  458 + GCC_SYMBOLS_PRIVATE_EXTERN = NO;
  459 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  460 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  461 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  462 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  463 + GCC_WARN_UNUSED_FUNCTION = YES;
  464 + GCC_WARN_UNUSED_VARIABLE = YES;
  465 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  466 + ONLY_ACTIVE_ARCH = YES;
  467 + SDKROOT = iphoneos;
  468 + TARGETED_DEVICE_FAMILY = "1,2";
  469 + };
  470 + name = Debug;
  471 + };
  472 + 6003F5BE195388D20070C39A /* Release */ = {
  473 + isa = XCBuildConfiguration;
  474 + buildSettings = {
  475 + ALWAYS_SEARCH_USER_PATHS = NO;
  476 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  477 + CLANG_CXX_LIBRARY = "libc++";
  478 + CLANG_ENABLE_MODULES = YES;
  479 + CLANG_ENABLE_OBJC_ARC = YES;
  480 + CLANG_WARN_BOOL_CONVERSION = YES;
  481 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  482 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  483 + CLANG_WARN_EMPTY_BODY = YES;
  484 + CLANG_WARN_ENUM_CONVERSION = YES;
  485 + CLANG_WARN_INT_CONVERSION = YES;
  486 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  487 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  488 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  489 + COPY_PHASE_STRIP = YES;
  490 + ENABLE_NS_ASSERTIONS = NO;
  491 + GCC_C_LANGUAGE_STANDARD = gnu99;
  492 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  493 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  494 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  495 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  496 + GCC_WARN_UNUSED_FUNCTION = YES;
  497 + GCC_WARN_UNUSED_VARIABLE = YES;
  498 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  499 + SDKROOT = iphoneos;
  500 + TARGETED_DEVICE_FAMILY = "1,2";
  501 + VALIDATE_PRODUCT = YES;
  502 + };
  503 + name = Release;
  504 + };
  505 + 6003F5C0195388D20070C39A /* Debug */ = {
  506 + isa = XCBuildConfiguration;
  507 + baseConfigurationReference = 7FD8311977E33E53ACE186A0 /* Pods-CNLiveMapModule_Example.debug.xcconfig */;
  508 + buildSettings = {
  509 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  510 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  511 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  512 + GCC_PREFIX_HEADER = "CNLiveMapModule/CNLiveMapModule-Prefix.pch";
  513 + INFOPLIST_FILE = "CNLiveMapModule/CNLiveMapModule-Info.plist";
  514 + MODULE_NAME = ExampleApp;
  515 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  516 + PRODUCT_NAME = "$(TARGET_NAME)";
  517 + SWIFT_VERSION = 4.0;
  518 + WRAPPER_EXTENSION = app;
  519 + };
  520 + name = Debug;
  521 + };
  522 + 6003F5C1195388D20070C39A /* Release */ = {
  523 + isa = XCBuildConfiguration;
  524 + baseConfigurationReference = 84A44D79057983482DF6803C /* Pods-CNLiveMapModule_Example.release.xcconfig */;
  525 + buildSettings = {
  526 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  527 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  528 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  529 + GCC_PREFIX_HEADER = "CNLiveMapModule/CNLiveMapModule-Prefix.pch";
  530 + INFOPLIST_FILE = "CNLiveMapModule/CNLiveMapModule-Info.plist";
  531 + MODULE_NAME = ExampleApp;
  532 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  533 + PRODUCT_NAME = "$(TARGET_NAME)";
  534 + SWIFT_VERSION = 4.0;
  535 + WRAPPER_EXTENSION = app;
  536 + };
  537 + name = Release;
  538 + };
  539 + 6003F5C3195388D20070C39A /* Debug */ = {
  540 + isa = XCBuildConfiguration;
  541 + baseConfigurationReference = C90EE460E908C716971A6DEA /* Pods-CNLiveMapModule_Tests.debug.xcconfig */;
  542 + buildSettings = {
  543 + BUNDLE_LOADER = "$(TEST_HOST)";
  544 + FRAMEWORK_SEARCH_PATHS = (
  545 + "$(PLATFORM_DIR)/Developer/Library/Frameworks",
  546 + "$(inherited)",
  547 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  548 + );
  549 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  550 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  551 + GCC_PREPROCESSOR_DEFINITIONS = (
  552 + "DEBUG=1",
  553 + "$(inherited)",
  554 + );
  555 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  556 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  557 + PRODUCT_NAME = "$(TARGET_NAME)";
  558 + SWIFT_VERSION = 4.0;
  559 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveMapModule_Example.app/CNLiveMapModule_Example";
  560 + WRAPPER_EXTENSION = xctest;
  561 + };
  562 + name = Debug;
  563 + };
  564 + 6003F5C4195388D20070C39A /* Release */ = {
  565 + isa = XCBuildConfiguration;
  566 + baseConfigurationReference = B40A0CC225F7A654646D49EF /* Pods-CNLiveMapModule_Tests.release.xcconfig */;
  567 + buildSettings = {
  568 + BUNDLE_LOADER = "$(TEST_HOST)";
  569 + FRAMEWORK_SEARCH_PATHS = (
  570 + "$(PLATFORM_DIR)/Developer/Library/Frameworks",
  571 + "$(inherited)",
  572 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  573 + );
  574 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  575 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  576 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  577 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  578 + PRODUCT_NAME = "$(TARGET_NAME)";
  579 + SWIFT_VERSION = 4.0;
  580 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveMapModule_Example.app/CNLiveMapModule_Example";
  581 + WRAPPER_EXTENSION = xctest;
  582 + };
  583 + name = Release;
  584 + };
  585 +/* End XCBuildConfiguration section */
  586 +
  587 +/* Begin XCConfigurationList section */
  588 + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveMapModule" */ = {
  589 + isa = XCConfigurationList;
  590 + buildConfigurations = (
  591 + 6003F5BD195388D20070C39A /* Debug */,
  592 + 6003F5BE195388D20070C39A /* Release */,
  593 + );
  594 + defaultConfigurationIsVisible = 0;
  595 + defaultConfigurationName = Release;
  596 + };
  597 + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveMapModule_Example" */ = {
  598 + isa = XCConfigurationList;
  599 + buildConfigurations = (
  600 + 6003F5C0195388D20070C39A /* Debug */,
  601 + 6003F5C1195388D20070C39A /* Release */,
  602 + );
  603 + defaultConfigurationIsVisible = 0;
  604 + defaultConfigurationName = Release;
  605 + };
  606 + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveMapModule_Tests" */ = {
  607 + isa = XCConfigurationList;
  608 + buildConfigurations = (
  609 + 6003F5C3195388D20070C39A /* Debug */,
  610 + 6003F5C4195388D20070C39A /* Release */,
  611 + );
  612 + defaultConfigurationIsVisible = 0;
  613 + defaultConfigurationName = Release;
  614 + };
  615 +/* End XCConfigurationList section */
  616 + };
  617 + rootObject = 6003F582195388D10070C39A /* Project object */;
  618 +}
Example/CNLiveMapModule.xcodeproj/xcshareddata/xcschemes/CNLiveMapModule-Example.xcscheme 0 → 100644
  1 +++ a/Example/CNLiveMapModule.xcodeproj/xcshareddata/xcschemes/CNLiveMapModule-Example.xcscheme
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0720"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "6003F589195388D20070C39A"
  18 + BuildableName = "CNLiveMapModule_Example.app"
  19 + BlueprintName = "CNLiveMapModule_Example"
  20 + ReferencedContainer = "container:CNLiveMapModule.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + shouldUseLaunchSchemeArgsEnv = "YES">
  30 + <Testables>
  31 + <TestableReference
  32 + skipped = "NO">
  33 + <BuildableReference
  34 + BuildableIdentifier = "primary"
  35 + BlueprintIdentifier = "6003F5AD195388D20070C39A"
  36 + BuildableName = "CNLiveMapModule_Tests.xctest"
  37 + BlueprintName = "CNLiveMapModule_Tests"
  38 + ReferencedContainer = "container:CNLiveMapModule.xcodeproj">
  39 + </BuildableReference>
  40 + </TestableReference>
  41 + </Testables>
  42 + <MacroExpansion>
  43 + <BuildableReference
  44 + BuildableIdentifier = "primary"
  45 + BlueprintIdentifier = "6003F589195388D20070C39A"
  46 + BuildableName = "CNLiveMapModule_Example.app"
  47 + BlueprintName = "CNLiveMapModule_Example"
  48 + ReferencedContainer = "container:CNLiveMapModule.xcodeproj">
  49 + </BuildableReference>
  50 + </MacroExpansion>
  51 + <AdditionalOptions>
  52 + </AdditionalOptions>
  53 + </TestAction>
  54 + <LaunchAction
  55 + buildConfiguration = "Debug"
  56 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  57 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  58 + launchStyle = "0"
  59 + useCustomWorkingDirectory = "NO"
  60 + ignoresPersistentStateOnLaunch = "NO"
  61 + debugDocumentVersioning = "YES"
  62 + debugServiceExtension = "internal"
  63 + allowLocationSimulation = "YES">
  64 + <BuildableProductRunnable
  65 + runnableDebuggingMode = "0">
  66 + <BuildableReference
  67 + BuildableIdentifier = "primary"
  68 + BlueprintIdentifier = "6003F589195388D20070C39A"
  69 + BuildableName = "CNLiveMapModule_Example.app"
  70 + BlueprintName = "CNLiveMapModule_Example"
  71 + ReferencedContainer = "container:CNLiveMapModule.xcodeproj">
  72 + </BuildableReference>
  73 + </BuildableProductRunnable>
  74 + <AdditionalOptions>
  75 + </AdditionalOptions>
  76 + </LaunchAction>
  77 + <ProfileAction
  78 + buildConfiguration = "Release"
  79 + shouldUseLaunchSchemeArgsEnv = "YES"
  80 + savedToolIdentifier = ""
  81 + useCustomWorkingDirectory = "NO"
  82 + debugDocumentVersioning = "YES">
  83 + <BuildableProductRunnable
  84 + runnableDebuggingMode = "0">
  85 + <BuildableReference
  86 + BuildableIdentifier = "primary"
  87 + BlueprintIdentifier = "6003F589195388D20070C39A"
  88 + BuildableName = "CNLiveMapModule_Example.app"
  89 + BlueprintName = "CNLiveMapModule_Example"
  90 + ReferencedContainer = "container:CNLiveMapModule.xcodeproj">
  91 + </BuildableReference>
  92 + </BuildableProductRunnable>
  93 + </ProfileAction>
  94 + <AnalyzeAction
  95 + buildConfiguration = "Debug">
  96 + </AnalyzeAction>
  97 + <ArchiveAction
  98 + buildConfiguration = "Release"
  99 + revealArchiveInOrganizer = "YES">
  100 + </ArchiveAction>
  101 +</Scheme>
Example/CNLiveMapModule/Base.lproj/LaunchScreen.storyboard 0 → 100644
  1 +++ a/Example/CNLiveMapModule/Base.lproj/LaunchScreen.storyboard
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="EHf-IW-A2E">
  14 + <objects>
  15 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
  18 + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="53" y="375"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
Example/CNLiveMapModule/Base.lproj/Main.storyboard 0 → 100644
  1 +++ a/Example/CNLiveMapModule/Base.lproj/Main.storyboard
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="wQg-tq-qST">
  14 + <objects>
  15 + <viewController id="whP-gf-Uak" customClass="CNLIVEViewController" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/>
  18 + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="305" y="433"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
Example/CNLiveMapModule/CNLIVEAppDelegate.h 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLIVEAppDelegate.h
  1 +//
  2 +// CNLIVEAppDelegate.h
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by 郭瑞朋 on 11/19/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +#import "BeeHive.h"
  11 +
  12 +@interface CNLIVEAppDelegate : BHAppDelegate <UIApplicationDelegate>
  13 +
  14 +
  15 +@end
Example/CNLiveMapModule/CNLIVEAppDelegate.m 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLIVEAppDelegate.m
  1 +//
  2 +// CNLIVEAppDelegate.m
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by 郭瑞朋 on 11/19/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLIVEAppDelegate.h"
  10 +#import <CNLiveEnvironment.h>
  11 +#import "CNLIVEViewController.h"
  12 +#import <QMUIKit/QMUIKit.h>
  13 +#import <BaiduMapAPI_Base/BMKBaseComponent.h>
  14 +#import <BMKLocationkit/BMKLocationComponent.h>//定位功能
  15 +
  16 +#import "BHTimeProfiler.h"
  17 +#import <mach-o/dyld.h>
  18 +#import "BHModuleManager.h"
  19 +#import "BHServiceManager.h"
  20 +
  21 +@interface CNLIVEAppDelegate ()<BMKGeneralDelegate,BMKLocationAuthDelegate>
  22 +
  23 +@end
  24 +@implementation CNLIVEAppDelegate
  25 +
  26 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  27 +{
  28 + [BHContext shareInstance].application = application;
  29 + [BHContext shareInstance].launchOptions = launchOptions;
  30 + [BHContext shareInstance].moduleConfigName = @"BeeHive.bundle/BeeHive";//可选,默认为BeeHive.bundle/BeeHive.plist
  31 + [BHContext shareInstance].serviceConfigName = @"BeeHive.bundle/BHService";
  32 + [BeeHive shareInstance].enableException = YES;
  33 + [[BeeHive shareInstance] setContext:[BHContext shareInstance]];
  34 + [[BHTimeProfiler sharedTimeProfiler] recordEventTime:@"BeeHive::super start launch"];
  35 +
  36 + [super application:application didFinishLaunchingWithOptions:launchOptions];
  37 +
  38 + // Override point for customization after application launch.
  39 + [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];
  40 + ////
  41 + //百度地图
  42 + // 要使用百度地图,请先启动BaiduMapManager
  43 + [[BMKLocationAuth sharedInstance] checkPermisionWithKey:BDMapAK authDelegate:self];
  44 + // 要使用百度地图,请先启动BaiduMapManager
  45 + BMKMapManager *_mapManager = [[BMKMapManager alloc] init];
  46 + // 如果要关注网络及授权验证事件,请设定generalDelegate参数
  47 + // 初始化定位SDK
  48 + BOOL ret = [_mapManager start:BDMapAK generalDelegate:self];
  49 + if (!ret) {
  50 + NSLog(@"manager start failed!");
  51 + }
  52 + /**
  53 + 全局设置地图SDK与开发者交互时的坐标类型。不调用此方法时,
  54 +
  55 + 设置此坐标类型意味着2个方面的约定:
  56 + 1. 地图SDK认为开发者传入的所有坐标均为此类型;
  57 + 2. 所有地图SDK返回给开发者的坐标均为此类型;
  58 +
  59 + 地图SDK默认使用BD09LL(BMK_COORDTYPE_BD09LL)坐标。
  60 + 如需使用GCJ02坐标,传入参数值为BMK_COORDTYPE_COMMON即可。ß
  61 + 本方法不支持传入WGS84(BMK_COORDTYPE_GPS)坐标。
  62 +
  63 + @param coorType 地图SDK全局使用的坐标类型
  64 + @return 设置成功返回YES,设置失败返回False
  65 + */
  66 + [BMKMapManager setCoordinateTypeUsedInBaiduMapSDK: BMK_COORDTYPE_COMMON];
  67 + ////
  68 + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  69 + CNLIVEViewController *vc = [[CNLIVEViewController alloc] init];
  70 +
  71 + QMUINavigationController *nav = [[QMUINavigationController alloc]initWithRootViewController:vc];
  72 + self.window.rootViewController = nav;//设置根视图控制器
  73 + [self.window makeKeyAndVisible];
  74 + return YES;
  75 +}
  76 +
  77 +- (void)applicationWillResignActive:(UIApplication *)application
  78 +{
  79 + // 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.
  80 + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
  81 +}
  82 +
  83 +- (void)applicationDidEnterBackground:(UIApplication *)application
  84 +{
  85 + // 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.
  86 + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  87 +}
  88 +
  89 +- (void)applicationWillEnterForeground:(UIApplication *)application
  90 +{
  91 + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
  92 +}
  93 +
  94 +- (void)applicationDidBecomeActive:(UIApplication *)application
  95 +{
  96 + // 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.
  97 +}
  98 +
  99 +- (void)applicationWillTerminate:(UIApplication *)application
  100 +{
  101 + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  102 +}
  103 +
  104 +@end
Example/CNLiveMapModule/CNLIVEViewController.h 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLIVEViewController.h
  1 +//
  2 +// CNLIVEViewController.h
  3 +// CNLiveMapModule
  4 +//
  5 +// Created by 郭瑞朋 on 11/26/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +
  11 +@interface CNLIVEViewController : UIViewController
  12 +
  13 +@end
Example/CNLiveMapModule/CNLIVEViewController.m 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLIVEViewController.m
  1 +//
  2 +// CNLIVEViewController.m
  3 +// CNLiveSendPositonModule
  4 +//
  5 +// Created by 郭瑞朋 on 11/19/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLIVEViewController.h"
  10 +#import "CNLiveServices.h"
  11 +#import "CNLiveMapViewController.h"
  12 +#import <MapKit/MapKit.h>
  13 +@interface CNLIVEViewController ()<CNLiveSendPositonDelegate>
  14 +
  15 +@end
  16 +
  17 +@implementation CNLIVEViewController
  18 +
  19 +- (void)viewDidLoad
  20 +{
  21 + [super viewDidLoad];
  22 + // Do any additional setup after loading the view, typically from a nib.
  23 + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  24 + btn.backgroundColor = [UIColor redColor];
  25 + btn.frame = CGRectMake(100, 100, 100, 100);
  26 + [self.view addSubview:btn];
  27 + [btn addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside];
  28 +}
  29 +
  30 +- (void)btnAction{
  31 + id<CNLiveSendPositionProtocol> sendPositionP = [[BeeHive shareInstance] createService:@protocol(CNLiveSendPositionProtocol)];
  32 + [sendPositionP pushToMapViewController:self];
  33 +}
  34 +- (void)didReceiveMemoryWarning
  35 +{
  36 + [super didReceiveMemoryWarning];
  37 + // Dispose of any resources that can be recreated.
  38 +}
  39 +
  40 +- (void)sendCurrentLocation:(CLLocationCoordinate2D)location image:(nonnull NSString *)img addressName:(nonnull NSArray *)arr {
  41 + NSLog(@"");
  42 +}
  43 +
  44 +@end
Example/CNLiveMapModule/CNLiveMapModule-Info.plist 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLiveMapModule-Info.plist
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleDisplayName</key>
  8 + <string>${PRODUCT_NAME}</string>
  9 + <key>CFBundleExecutable</key>
  10 + <string>${EXECUTABLE_NAME}</string>
  11 + <key>CFBundleIdentifier</key>
  12 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  13 + <key>CFBundleInfoDictionaryVersion</key>
  14 + <string>6.0</string>
  15 + <key>CFBundleName</key>
  16 + <string>${PRODUCT_NAME}</string>
  17 + <key>CFBundlePackageType</key>
  18 + <string>APPL</string>
  19 + <key>CFBundleShortVersionString</key>
  20 + <string>1.0</string>
  21 + <key>CFBundleSignature</key>
  22 + <string>????</string>
  23 + <key>CFBundleVersion</key>
  24 + <string>1.0</string>
  25 + <key>LSRequiresIPhoneOS</key>
  26 + <true/>
  27 + <key>UILaunchStoryboardName</key>
  28 + <string>LaunchScreen</string>
  29 + <key>UIMainStoryboardFile</key>
  30 + <string>Main</string>
  31 + <key>UIRequiredDeviceCapabilities</key>
  32 + <array>
  33 + <string>armv7</string>
  34 + </array>
  35 + <key>UISupportedInterfaceOrientations</key>
  36 + <array>
  37 + <string>UIInterfaceOrientationPortrait</string>
  38 + <string>UIInterfaceOrientationLandscapeLeft</string>
  39 + <string>UIInterfaceOrientationLandscapeRight</string>
  40 + </array>
  41 + <key>UISupportedInterfaceOrientations~ipad</key>
  42 + <array>
  43 + <string>UIInterfaceOrientationPortrait</string>
  44 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  45 + <string>UIInterfaceOrientationLandscapeLeft</string>
  46 + <string>UIInterfaceOrientationLandscapeRight</string>
  47 + </array>
  48 +</dict>
  49 +</plist>
Example/CNLiveMapModule/CNLiveMapModule-Prefix.pch 0 → 100644
  1 +++ a/Example/CNLiveMapModule/CNLiveMapModule-Prefix.pch
  1 +//
  2 +// Prefix header
  3 +//
  4 +// The contents of this file are implicitly included at the beginning of every source file.
  5 +//
  6 +
  7 +#import <Availability.h>
  8 +
  9 +#ifndef __IPHONE_5_0
  10 +#warning "This project uses features only available in iOS SDK 5.0 and later."
  11 +#endif
  12 +
  13 +#ifdef __OBJC__
  14 + @import UIKit;
  15 + @import Foundation;
  16 +#endif
Example/CNLiveMapModule/Images.xcassets/AppIcon.appiconset/Contents.json 0 → 100644
  1 +++ a/Example/CNLiveMapModule/Images.xcassets/AppIcon.appiconset/Contents.json
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "iphone",
  5 + "size" : "20x20",
  6 + "scale" : "2x"
  7 + },
  8 + {
  9 + "idiom" : "iphone",
  10 + "size" : "20x20",
  11 + "scale" : "3x"
  12 + },
  13 + {
  14 + "idiom" : "iphone",
  15 + "size" : "29x29",
  16 + "scale" : "2x"
  17 + },
  18 + {
  19 + "idiom" : "iphone",
  20 + "size" : "29x29",
  21 + "scale" : "3x"
  22 + },
  23 + {
  24 + "idiom" : "iphone",
  25 + "size" : "40x40",
  26 + "scale" : "2x"
  27 + },
  28 + {
  29 + "idiom" : "iphone",
  30 + "size" : "40x40",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "idiom" : "iphone",
  35 + "size" : "60x60",
  36 + "scale" : "2x"
  37 + },
  38 + {
  39 + "idiom" : "iphone",
  40 + "size" : "60x60",
  41 + "scale" : "3x"
  42 + },
  43 + {
  44 + "idiom" : "ipad",
  45 + "size" : "20x20",
  46 + "scale" : "1x"
  47 + },
  48 + {
  49 + "idiom" : "ipad",
  50 + "size" : "20x20",
  51 + "scale" : "2x"
  52 + },
  53 + {
  54 + "idiom" : "ipad",
  55 + "size" : "29x29",
  56 + "scale" : "1x"
  57 + },
  58 + {
  59 + "idiom" : "ipad",
  60 + "size" : "29x29",
  61 + "scale" : "2x"
  62 + },
  63 + {
  64 + "idiom" : "ipad",
  65 + "size" : "40x40",
  66 + "scale" : "1x"
  67 + },
  68 + {
  69 + "idiom" : "ipad",
  70 + "size" : "40x40",
  71 + "scale" : "2x"
  72 + },
  73 + {
  74 + "idiom" : "ipad",
  75 + "size" : "76x76",
  76 + "scale" : "1x"
  77 + },
  78 + {
  79 + "idiom" : "ipad",
  80 + "size" : "76x76",
  81 + "scale" : "2x"
  82 + },
  83 + {
  84 + "idiom" : "ipad",
  85 + "size" : "83.5x83.5",
  86 + "scale" : "2x"
  87 + },
  88 + {
  89 + "idiom" : "ios-marketing",
  90 + "size" : "1024x1024",
  91 + "scale" : "1x"
  92 + }
  93 + ],
  94 + "info" : {
  95 + "version" : 1,
  96 + "author" : "xcode"
  97 + }
  98 +}
Example/CNLiveMapModule/en.lproj/InfoPlist.strings 0 → 100644
  1 +++ a/Example/CNLiveMapModule/en.lproj/InfoPlist.strings
  1 +/* Localized versions of Info.plist keys */
  2 +
Example/CNLiveMapModule/main.m 0 → 100644
  1 +++ a/Example/CNLiveMapModule/main.m
  1 +//
  2 +// main.m
  3 +// CNLiveMapModule
  4 +//
  5 +// Created by 郭瑞朋 on 11/26/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +#import "CNLIVEAppDelegate.h"
  11 +
  12 +int main(int argc, char * argv[])
  13 +{
  14 + @autoreleasepool {
  15 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class]));
  16 + }
  17 +}
Example/Podfile 0 → 100644
  1 +++ a/Example/Podfile
  1 +#use_frameworks!
  2 +source 'https://github.com/CocoaPods/Specs.git'
  3 +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git'
  4 +platform :ios, '9.0'
  5 +
  6 +target 'CNLiveMapModule_Example' do
  7 + pod 'CNLiveMapModule', :path => '../'
  8 + #依赖三方私有库,如果里面有.a的时候加上这个
  9 + pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  10 + end
  11 + target 'CNLiveMapModule_Tests' do
  12 + inherit! :search_paths
  13 +
  14 +
  15 + end
  16 +end
Example/Tests/Tests-Info.plist 0 → 100644
  1 +++ a/Example/Tests/Tests-Info.plist
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>${EXECUTABLE_NAME}</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundlePackageType</key>
  14 + <string>BNDL</string>
  15 + <key>CFBundleShortVersionString</key>
  16 + <string>1.0</string>
  17 + <key>CFBundleSignature</key>
  18 + <string>????</string>
  19 + <key>CFBundleVersion</key>
  20 + <string>1</string>
  21 +</dict>
  22 +</plist>
Example/Tests/Tests-Prefix.pch 0 → 100644
  1 +++ a/Example/Tests/Tests-Prefix.pch
  1 +// The contents of this file are implicitly included at the beginning of every test case source file.
  2 +
  3 +#ifdef __OBJC__
  4 +
  5 +
  6 +
  7 +#endif
Example/Tests/Tests.m 0 → 100644
  1 +++ a/Example/Tests/Tests.m
  1 +//
  2 +// CNLiveMapModuleTests.m
  3 +// CNLiveMapModuleTests
  4 +//
  5 +// Created by 郭瑞朋 on 11/26/2019.
  6 +// Copyright (c) 2019 郭瑞朋. All rights reserved.
  7 +//
  8 +
  9 +@import XCTest;
  10 +
  11 +@interface Tests : XCTestCase
  12 +
  13 +@end
  14 +
  15 +@implementation Tests
  16 +
  17 +- (void)setUp
  18 +{
  19 + [super setUp];
  20 + // Put setup code here. This method is called before the invocation of each test method in the class.
  21 +}
  22 +
  23 +- (void)tearDown
  24 +{
  25 + // Put teardown code here. This method is called after the invocation of each test method in the class.
  26 + [super tearDown];
  27 +}
  28 +
  29 +- (void)testExample
  30 +{
  31 + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
  32 +}
  33 +
  34 +@end
  35 +
Example/Tests/en.lproj/InfoPlist.strings 0 → 100644
  1 +++ a/Example/Tests/en.lproj/InfoPlist.strings
  1 +/* Localized versions of Info.plist keys */
  2 +
LICENSE 0 → 100644
  1 +++ a/LICENSE
  1 +Copyright (c) 2019 郭瑞朋 <guoruipeng@cnlive.com>
  2 +
  3 +Permission is hereby granted, free of charge, to any person obtaining a copy
  4 +of this software and associated documentation files (the "Software"), to deal
  5 +in the Software without restriction, including without limitation the rights
  6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7 +copies of the Software, and to permit persons to whom the Software is
  8 +furnished to do so, subject to the following conditions:
  9 +
  10 +The above copyright notice and this permission notice shall be included in
  11 +all copies or substantial portions of the Software.
  12 +
  13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19 +THE SOFTWARE.
README.md 0 → 100644
  1 +++ a/README.md
  1 +# CNLiveMapModule
  2 +
  3 +[![CI Status](https://img.shields.io/travis/郭瑞朋/CNLiveMapModule.svg?style=flat)](https://travis-ci.org/郭瑞朋/CNLiveMapModule)
  4 +[![Version](https://img.shields.io/cocoapods/v/CNLiveMapModule.svg?style=flat)](https://cocoapods.org/pods/CNLiveMapModule)
  5 +[![License](https://img.shields.io/cocoapods/l/CNLiveMapModule.svg?style=flat)](https://cocoapods.org/pods/CNLiveMapModule)
  6 +[![Platform](https://img.shields.io/cocoapods/p/CNLiveMapModule.svg?style=flat)](https://cocoapods.org/pods/CNLiveMapModule)
  7 +
  8 +## Example
  9 +
  10 +To run the example project, clone the repo, and run `pod install` from the Example directory first.
  11 +
  12 +## Requirements
  13 +
  14 +## Installation
  15 +
  16 +CNLiveMapModule is available through [CocoaPods](https://cocoapods.org). To install
  17 +it, simply add the following line to your Podfile:
  18 +
  19 +```ruby
  20 +pod 'CNLiveMapModule'
  21 +```
  22 +
  23 +## Author
  24 +
  25 +郭瑞朋, guoruipeng@cnlive.com
  26 +
  27 +## License
  28 +
  29 +CNLiveMapModule is available under the MIT license. See the LICENSE file for more info.
_Pods.xcodeproj 0 → 120000
  1 +++ a/_Pods.xcodeproj
  1 +Example/Pods/Pods.xcodeproj
0 \ No newline at end of file 2 \ No newline at end of file