├── .gitignore ├── LICENSE ├── README.md ├── hybirdapp.gif └── search ├── search.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── search.xccheckout │ └── xcuserdata │ │ └── lihua.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── lihua.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── search.xcscheme │ └── xcschememanagement.plist ├── search ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m └── searchTests ├── Info.plist └── searchTests.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 vczero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # search_Hybird 2 | 将search应用(基于Angular & Open Api)内嵌进WebView测试性能 3 | 4 | ![](./hybirdapp.gif) 5 | 6 | 7 | -------------------------------------------------------------------------------- /hybirdapp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vczero/search_Hybird/14849e2fb056849e87b5f52491a1edd6c01f1831/hybirdapp.gif -------------------------------------------------------------------------------- /search/search.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1C91E8A81C11398600696AC0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C91E8A71C11398600696AC0 /* main.m */; }; 11 | 1C91E8AB1C11398600696AC0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C91E8AA1C11398600696AC0 /* AppDelegate.m */; }; 12 | 1C91E8AE1C11398600696AC0 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C91E8AD1C11398600696AC0 /* ViewController.m */; }; 13 | 1C91E8B11C11398600696AC0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1C91E8AF1C11398600696AC0 /* Main.storyboard */; }; 14 | 1C91E8B31C11398600696AC0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1C91E8B21C11398600696AC0 /* Images.xcassets */; }; 15 | 1C91E8B61C11398600696AC0 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1C91E8B41C11398600696AC0 /* LaunchScreen.xib */; }; 16 | 1C91E8C21C11398600696AC0 /* searchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C91E8C11C11398600696AC0 /* searchTests.m */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 1C91E8BC1C11398600696AC0 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 1C91E89A1C11398600696AC0 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 1C91E8A11C11398600696AC0; 25 | remoteInfo = search; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 1C91E8A21C11398600696AC0 /* search.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = search.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 1C91E8A61C11398600696AC0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 1C91E8A71C11398600696AC0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 1C91E8A91C11398600696AC0 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 1C91E8AA1C11398600696AC0 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 1C91E8AC1C11398600696AC0 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 36 | 1C91E8AD1C11398600696AC0 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 37 | 1C91E8B01C11398600696AC0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 1C91E8B21C11398600696AC0 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 1C91E8B51C11398600696AC0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 40 | 1C91E8BB1C11398600696AC0 /* searchTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = searchTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 1C91E8C01C11398600696AC0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 1C91E8C11C11398600696AC0 /* searchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = searchTests.m; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 1C91E89F1C11398600696AC0 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | 1C91E8B81C11398600696AC0 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | 1C91E8991C11398600696AC0 = { 64 | isa = PBXGroup; 65 | children = ( 66 | 1C91E8A41C11398600696AC0 /* search */, 67 | 1C91E8BE1C11398600696AC0 /* searchTests */, 68 | 1C91E8A31C11398600696AC0 /* Products */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | 1C91E8A31C11398600696AC0 /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 1C91E8A21C11398600696AC0 /* search.app */, 76 | 1C91E8BB1C11398600696AC0 /* searchTests.xctest */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | 1C91E8A41C11398600696AC0 /* search */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1C91E8A91C11398600696AC0 /* AppDelegate.h */, 85 | 1C91E8AA1C11398600696AC0 /* AppDelegate.m */, 86 | 1C91E8AC1C11398600696AC0 /* ViewController.h */, 87 | 1C91E8AD1C11398600696AC0 /* ViewController.m */, 88 | 1C91E8AF1C11398600696AC0 /* Main.storyboard */, 89 | 1C91E8B21C11398600696AC0 /* Images.xcassets */, 90 | 1C91E8B41C11398600696AC0 /* LaunchScreen.xib */, 91 | 1C91E8A51C11398600696AC0 /* Supporting Files */, 92 | ); 93 | path = search; 94 | sourceTree = ""; 95 | }; 96 | 1C91E8A51C11398600696AC0 /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 1C91E8A61C11398600696AC0 /* Info.plist */, 100 | 1C91E8A71C11398600696AC0 /* main.m */, 101 | ); 102 | name = "Supporting Files"; 103 | sourceTree = ""; 104 | }; 105 | 1C91E8BE1C11398600696AC0 /* searchTests */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 1C91E8C11C11398600696AC0 /* searchTests.m */, 109 | 1C91E8BF1C11398600696AC0 /* Supporting Files */, 110 | ); 111 | path = searchTests; 112 | sourceTree = ""; 113 | }; 114 | 1C91E8BF1C11398600696AC0 /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 1C91E8C01C11398600696AC0 /* Info.plist */, 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 1C91E8A11C11398600696AC0 /* search */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 1C91E8C51C11398600696AC0 /* Build configuration list for PBXNativeTarget "search" */; 128 | buildPhases = ( 129 | 1C91E89E1C11398600696AC0 /* Sources */, 130 | 1C91E89F1C11398600696AC0 /* Frameworks */, 131 | 1C91E8A01C11398600696AC0 /* Resources */, 132 | ); 133 | buildRules = ( 134 | ); 135 | dependencies = ( 136 | ); 137 | name = search; 138 | productName = search; 139 | productReference = 1C91E8A21C11398600696AC0 /* search.app */; 140 | productType = "com.apple.product-type.application"; 141 | }; 142 | 1C91E8BA1C11398600696AC0 /* searchTests */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 1C91E8C81C11398600696AC0 /* Build configuration list for PBXNativeTarget "searchTests" */; 145 | buildPhases = ( 146 | 1C91E8B71C11398600696AC0 /* Sources */, 147 | 1C91E8B81C11398600696AC0 /* Frameworks */, 148 | 1C91E8B91C11398600696AC0 /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | 1C91E8BD1C11398600696AC0 /* PBXTargetDependency */, 154 | ); 155 | name = searchTests; 156 | productName = searchTests; 157 | productReference = 1C91E8BB1C11398600696AC0 /* searchTests.xctest */; 158 | productType = "com.apple.product-type.bundle.unit-test"; 159 | }; 160 | /* End PBXNativeTarget section */ 161 | 162 | /* Begin PBXProject section */ 163 | 1C91E89A1C11398600696AC0 /* Project object */ = { 164 | isa = PBXProject; 165 | attributes = { 166 | LastUpgradeCheck = 0640; 167 | ORGANIZATIONNAME = lihua; 168 | TargetAttributes = { 169 | 1C91E8A11C11398600696AC0 = { 170 | CreatedOnToolsVersion = 6.4; 171 | }; 172 | 1C91E8BA1C11398600696AC0 = { 173 | CreatedOnToolsVersion = 6.4; 174 | TestTargetID = 1C91E8A11C11398600696AC0; 175 | }; 176 | }; 177 | }; 178 | buildConfigurationList = 1C91E89D1C11398600696AC0 /* Build configuration list for PBXProject "search" */; 179 | compatibilityVersion = "Xcode 3.2"; 180 | developmentRegion = English; 181 | hasScannedForEncodings = 0; 182 | knownRegions = ( 183 | en, 184 | Base, 185 | ); 186 | mainGroup = 1C91E8991C11398600696AC0; 187 | productRefGroup = 1C91E8A31C11398600696AC0 /* Products */; 188 | projectDirPath = ""; 189 | projectRoot = ""; 190 | targets = ( 191 | 1C91E8A11C11398600696AC0 /* search */, 192 | 1C91E8BA1C11398600696AC0 /* searchTests */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 1C91E8A01C11398600696AC0 /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 1C91E8B11C11398600696AC0 /* Main.storyboard in Resources */, 203 | 1C91E8B61C11398600696AC0 /* LaunchScreen.xib in Resources */, 204 | 1C91E8B31C11398600696AC0 /* Images.xcassets in Resources */, 205 | ); 206 | runOnlyForDeploymentPostprocessing = 0; 207 | }; 208 | 1C91E8B91C11398600696AC0 /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXResourcesBuildPhase section */ 216 | 217 | /* Begin PBXSourcesBuildPhase section */ 218 | 1C91E89E1C11398600696AC0 /* Sources */ = { 219 | isa = PBXSourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 1C91E8AE1C11398600696AC0 /* ViewController.m in Sources */, 223 | 1C91E8AB1C11398600696AC0 /* AppDelegate.m in Sources */, 224 | 1C91E8A81C11398600696AC0 /* main.m in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | 1C91E8B71C11398600696AC0 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 1C91E8C21C11398600696AC0 /* searchTests.m in Sources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXSourcesBuildPhase section */ 237 | 238 | /* Begin PBXTargetDependency section */ 239 | 1C91E8BD1C11398600696AC0 /* PBXTargetDependency */ = { 240 | isa = PBXTargetDependency; 241 | target = 1C91E8A11C11398600696AC0 /* search */; 242 | targetProxy = 1C91E8BC1C11398600696AC0 /* PBXContainerItemProxy */; 243 | }; 244 | /* End PBXTargetDependency section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 1C91E8AF1C11398600696AC0 /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 1C91E8B01C11398600696AC0 /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 1C91E8B41C11398600696AC0 /* LaunchScreen.xib */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 1C91E8B51C11398600696AC0 /* Base */, 259 | ); 260 | name = LaunchScreen.xib; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 1C91E8C31C11398600696AC0 /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ALWAYS_SEARCH_USER_PATHS = NO; 270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 271 | CLANG_CXX_LIBRARY = "libc++"; 272 | CLANG_ENABLE_MODULES = YES; 273 | CLANG_ENABLE_OBJC_ARC = YES; 274 | CLANG_WARN_BOOL_CONVERSION = YES; 275 | CLANG_WARN_CONSTANT_CONVERSION = YES; 276 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 277 | CLANG_WARN_EMPTY_BODY = YES; 278 | CLANG_WARN_ENUM_CONVERSION = YES; 279 | CLANG_WARN_INT_CONVERSION = YES; 280 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_STRICT_OBJC_MSGSEND = YES; 287 | GCC_C_LANGUAGE_STANDARD = gnu99; 288 | GCC_DYNAMIC_NO_PIC = NO; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_OPTIMIZATION_LEVEL = 0; 291 | GCC_PREPROCESSOR_DEFINITIONS = ( 292 | "DEBUG=1", 293 | "$(inherited)", 294 | ); 295 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 296 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 297 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 298 | GCC_WARN_UNDECLARED_SELECTOR = YES; 299 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 300 | GCC_WARN_UNUSED_FUNCTION = YES; 301 | GCC_WARN_UNUSED_VARIABLE = YES; 302 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 303 | MTL_ENABLE_DEBUG_INFO = YES; 304 | ONLY_ACTIVE_ARCH = YES; 305 | SDKROOT = iphoneos; 306 | }; 307 | name = Debug; 308 | }; 309 | 1C91E8C41C11398600696AC0 /* Release */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | ALWAYS_SEARCH_USER_PATHS = NO; 313 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 314 | CLANG_CXX_LIBRARY = "libc++"; 315 | CLANG_ENABLE_MODULES = YES; 316 | CLANG_ENABLE_OBJC_ARC = YES; 317 | CLANG_WARN_BOOL_CONVERSION = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INT_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_UNREACHABLE_CODE = YES; 325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 327 | COPY_PHASE_STRIP = NO; 328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 329 | ENABLE_NS_ASSERTIONS = NO; 330 | ENABLE_STRICT_OBJC_MSGSEND = YES; 331 | GCC_C_LANGUAGE_STANDARD = gnu99; 332 | GCC_NO_COMMON_BLOCKS = YES; 333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 335 | GCC_WARN_UNDECLARED_SELECTOR = YES; 336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 337 | GCC_WARN_UNUSED_FUNCTION = YES; 338 | GCC_WARN_UNUSED_VARIABLE = YES; 339 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 340 | MTL_ENABLE_DEBUG_INFO = NO; 341 | SDKROOT = iphoneos; 342 | VALIDATE_PRODUCT = YES; 343 | }; 344 | name = Release; 345 | }; 346 | 1C91E8C61C11398600696AC0 /* Debug */ = { 347 | isa = XCBuildConfiguration; 348 | buildSettings = { 349 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 350 | INFOPLIST_FILE = search/Info.plist; 351 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 352 | PRODUCT_NAME = "$(TARGET_NAME)"; 353 | }; 354 | name = Debug; 355 | }; 356 | 1C91E8C71C11398600696AC0 /* Release */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 360 | INFOPLIST_FILE = search/Info.plist; 361 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 362 | PRODUCT_NAME = "$(TARGET_NAME)"; 363 | }; 364 | name = Release; 365 | }; 366 | 1C91E8C91C11398600696AC0 /* Debug */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | BUNDLE_LOADER = "$(TEST_HOST)"; 370 | FRAMEWORK_SEARCH_PATHS = ( 371 | "$(SDKROOT)/Developer/Library/Frameworks", 372 | "$(inherited)", 373 | ); 374 | GCC_PREPROCESSOR_DEFINITIONS = ( 375 | "DEBUG=1", 376 | "$(inherited)", 377 | ); 378 | INFOPLIST_FILE = searchTests/Info.plist; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/search.app/search"; 382 | }; 383 | name = Debug; 384 | }; 385 | 1C91E8CA1C11398600696AC0 /* Release */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | BUNDLE_LOADER = "$(TEST_HOST)"; 389 | FRAMEWORK_SEARCH_PATHS = ( 390 | "$(SDKROOT)/Developer/Library/Frameworks", 391 | "$(inherited)", 392 | ); 393 | INFOPLIST_FILE = searchTests/Info.plist; 394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 395 | PRODUCT_NAME = "$(TARGET_NAME)"; 396 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/search.app/search"; 397 | }; 398 | name = Release; 399 | }; 400 | /* End XCBuildConfiguration section */ 401 | 402 | /* Begin XCConfigurationList section */ 403 | 1C91E89D1C11398600696AC0 /* Build configuration list for PBXProject "search" */ = { 404 | isa = XCConfigurationList; 405 | buildConfigurations = ( 406 | 1C91E8C31C11398600696AC0 /* Debug */, 407 | 1C91E8C41C11398600696AC0 /* Release */, 408 | ); 409 | defaultConfigurationIsVisible = 0; 410 | defaultConfigurationName = Release; 411 | }; 412 | 1C91E8C51C11398600696AC0 /* Build configuration list for PBXNativeTarget "search" */ = { 413 | isa = XCConfigurationList; 414 | buildConfigurations = ( 415 | 1C91E8C61C11398600696AC0 /* Debug */, 416 | 1C91E8C71C11398600696AC0 /* Release */, 417 | ); 418 | defaultConfigurationIsVisible = 0; 419 | }; 420 | 1C91E8C81C11398600696AC0 /* Build configuration list for PBXNativeTarget "searchTests" */ = { 421 | isa = XCConfigurationList; 422 | buildConfigurations = ( 423 | 1C91E8C91C11398600696AC0 /* Debug */, 424 | 1C91E8CA1C11398600696AC0 /* Release */, 425 | ); 426 | defaultConfigurationIsVisible = 0; 427 | }; 428 | /* End XCConfigurationList section */ 429 | }; 430 | rootObject = 1C91E89A1C11398600696AC0 /* Project object */; 431 | } 432 | -------------------------------------------------------------------------------- /search/search.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /search/search.xcodeproj/project.xcworkspace/xcshareddata/search.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | F9774C59-C6B0-47E2-A19B-9CC3AF1CF207 9 | IDESourceControlProjectName 10 | project 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | B6052C586CE6B26AC021F693ADEB29B2A802DF04 14 | https://github.com/vczero/search_Hybird.git 15 | 16 | IDESourceControlProjectPath 17 | search/search.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | B6052C586CE6B26AC021F693ADEB29B2A802DF04 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/vczero/search_Hybird.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | B6052C586CE6B26AC021F693ADEB29B2A802DF04 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | B6052C586CE6B26AC021F693ADEB29B2A802DF04 36 | IDESourceControlWCCName 37 | search_Hybird 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /search/search.xcodeproj/project.xcworkspace/xcuserdata/lihua.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vczero/search_Hybird/14849e2fb056849e87b5f52491a1edd6c01f1831/search/search.xcodeproj/project.xcworkspace/xcuserdata/lihua.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /search/search.xcodeproj/xcuserdata/lihua.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /search/search.xcodeproj/xcuserdata/lihua.xcuserdatad/xcschemes/search.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /search/search.xcodeproj/xcuserdata/lihua.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | search.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1C91E8A11C11398600696AC0 16 | 17 | primary 18 | 19 | 20 | 1C91E8BA1C11398600696AC0 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /search/search/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // search 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /search/search/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // search 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate (){ 13 | 14 | } 15 | 16 | @end 17 | 18 | @implementation AppDelegate 19 | 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | // Override point for customization after application launch. 23 | if(!self.window){ 24 | self.window = [[UIWindow alloc]init]; 25 | } 26 | float width = [[UIScreen mainScreen]bounds].size.width; 27 | float height = [[UIScreen mainScreen]bounds].size.height; 28 | 29 | self.window.frame = CGRectMake(0, 0, width, height); 30 | self.window.backgroundColor = [UIColor whiteColor]; 31 | 32 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:[[ViewController alloc]init]]; 33 | self.window.rootViewController = nav; 34 | 35 | [self.window makeKeyAndVisible]; 36 | return YES; 37 | } 38 | 39 | - (void)applicationWillResignActive:(UIApplication *)application { 40 | // 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. 41 | // 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. 42 | } 43 | 44 | - (void)applicationDidEnterBackground:(UIApplication *)application { 45 | // 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. 46 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 47 | } 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | // 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. 51 | } 52 | 53 | - (void)applicationDidBecomeActive:(UIApplication *)application { 54 | // 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. 55 | } 56 | 57 | - (void)applicationWillTerminate:(UIApplication *)application { 58 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 59 | } 60 | 61 | 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /search/search/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /search/search/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /search/search/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /search/search/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.lihua.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /search/search/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // search 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /search/search/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // search 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController (){ 12 | UIWebView * _wb; 13 | UIActivityIndicatorView *_act; 14 | } 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | 23 | if(!_wb){ 24 | _wb = [[UIWebView alloc]init]; 25 | } 26 | self.title = @"Hybird App"; 27 | 28 | float width = [[UIScreen mainScreen]bounds].size.width; 29 | float height = [[UIScreen mainScreen]bounds].size.height; 30 | 31 | _wb.frame = CGRectMake(0, 0, width, height); 32 | NSString *path = [NSString stringWithFormat:@"http://vczero.github.io/search/html/index.html"]; 33 | NSURL *url = [[NSURL alloc]initWithString:path]; 34 | NSURLRequest *urlReq = [[NSURLRequest alloc]initWithURL:url]; 35 | [_wb loadRequest:urlReq]; 36 | 37 | 38 | 39 | _wb.delegate = self; 40 | 41 | [self.view addSubview:_wb]; 42 | } 43 | 44 | - (void)didReceiveMemoryWarning { 45 | [super didReceiveMemoryWarning]; 46 | // Dispose of any resources that can be recreated. 47 | } 48 | 49 | - (void)webViewDidStartLoad:(UIWebView *)webView{ 50 | if(!_act){ 51 | _act = [[UIActivityIndicatorView alloc]init]; 52 | _act.color = [UIColor blueColor]; 53 | _act.center = self.view.center; 54 | [self.view addSubview:_act]; 55 | } 56 | if(_act.isAnimating){ 57 | return; 58 | } 59 | [_act startAnimating]; 60 | 61 | } 62 | 63 | - (void)webViewDidFinishLoad:(UIWebView *)webView{ 64 | [_act stopAnimating]; 65 | NSString *location =[webView stringByEvaluatingJavaScriptFromString:@"document.location.href"]; 66 | if([location rangeOfString:@"douban.com"].location != NSNotFound){ 67 | UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemReply target:self action:@selector(selectLeftAction:)]; 68 | self.navigationItem.leftBarButtonItem = leftButton; 69 | }else{ 70 | self.navigationItem.leftBarButtonItem = nil; 71 | } 72 | } 73 | 74 | -(void)selectLeftAction:(id)sender{ 75 | NSString *location =[_wb stringByEvaluatingJavaScriptFromString:@"document.location.href"]; 76 | if ([location rangeOfString:@"movie"].location != NSNotFound) { 77 | NSString *str = @"document.location.href='http://vczero.github.io/search/html/index.html#/movie'"; 78 | [_wb stringByEvaluatingJavaScriptFromString:str]; 79 | } 80 | 81 | if ([location rangeOfString:@"music"].location != NSNotFound) { 82 | NSString *str = @"document.location.href='http://vczero.github.io/search/html/index.html#/music'"; 83 | [_wb stringByEvaluatingJavaScriptFromString:str]; 84 | } 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /search/search/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // search 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /search/searchTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.lihua.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /search/searchTests/searchTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // searchTests.m 3 | // searchTests 4 | // 5 | // Created by lihua on 15/12/4. 6 | // Copyright (c) 2015年 lihua. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface searchTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation searchTests 17 | 18 | - (void)setUp { 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 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------