Refactor MobileMiniBrowser into an application framework to allow external XCTesting
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2016 18:01:51 +0000 (18:01 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2016 18:01:51 +0000 (18:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161462

Reviewed by Eric Carlson.

XCTest targets need to be in the same project as the application which they're testing. To facilitate
having external projects with XCTest targets, move the application's implementation into a framework
that can be included with a bare-bones application shell for testing.

Simultaneously, add the ability to load files from within the new framework's bundle by using a
'bundle:/' URL scheme. Update the tests to use this new bundle URL and remove the dependency on
an external server for testing.

* MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
* MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard:
* MobileMiniBrowser/MobileMiniBrowser/Info.plist:
* MobileMiniBrowser/MobileMiniBrowser/main.m:
* MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
* MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m.
(-[AppDelegate application:didFinishLaunchingWithOptions:]): Manually instantiate the main view
    controller from the framework's bundle.
* MobileMiniBrowser/MobileMiniBrowserFramework/Assets.xcassets/AppIcon.appiconset/Contents.json: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json.
* MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard.
* MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist: Added.
* MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
* MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.h.
* MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.m.
* MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.h.
* MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.m.
(+[NSURL __bundleURLForFileURL:bundle:]): Add utility method.
(+[NSURL __fileURLForBundleURL:bundle:]): Ditto.
(-[WebViewController navigateTo:]): Support loading "bundle:/" URLs which are really just "file:" URLs
    pointing to the framework's resources directory.
(-[WebViewController observeValueForKeyPath:ofObject:change:context:]): Ditto.
* MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m:
(-[MobileMiniBrowserUITests testBasicVideoPlayback]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205353 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Tools/ChangeLog
Tools/MobileMiniBrowser/Configurations/Base.xcconfig
Tools/MobileMiniBrowser/Configurations/DebugRelease.xcconfig
Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig
Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj
Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard
Tools/MobileMiniBrowser/MobileMiniBrowser/Info.plist
Tools/MobileMiniBrowser/MobileMiniBrowser/main.m
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.h [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h with 100% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m with 87% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Assets.xcassets/AppIcon.appiconset/Contents.json [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json with 100% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard with 85% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist [new file with mode: 0644]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h [new file with mode: 0644]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/index.html [new file with mode: 0644]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/looping.html [new file with mode: 0644]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test.mp4 [new file with mode: 0644]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.h [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.h with 100% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.m [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.m with 100% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.h [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.h with 100% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m [moved from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.m with 79% similarity]
Tools/MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m

index 5ee887b..6fb5818 100644 (file)
@@ -1,3 +1,42 @@
+2016-08-31  Jer Noble  <jer.noble@apple.com>
+
+        Refactor MobileMiniBrowser into an application framework to allow external XCTesting
+        https://bugs.webkit.org/show_bug.cgi?id=161462
+
+        Reviewed by Eric Carlson.
+
+        XCTest targets need to be in the same project as the application which they're testing. To facilitate
+        having external projects with XCTest targets, move the application's implementation into a framework
+        that can be included with a bare-bones application shell for testing.
+
+        Simultaneously, add the ability to load files from within the new framework's bundle by using a
+        'bundle:/' URL scheme. Update the tests to use this new bundle URL and remove the dependency on
+        an external server for testing.
+
+        * MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
+        * MobileMiniBrowser/MobileMiniBrowser/Base.lproj/LaunchScreen.storyboard:
+        * MobileMiniBrowser/MobileMiniBrowser/Info.plist:
+        * MobileMiniBrowser/MobileMiniBrowser/main.m:
+        * MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.m.
+        (-[AppDelegate application:didFinishLaunchingWithOptions:]): Manually instantiate the main view
+            controller from the framework's bundle.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/Assets.xcassets/AppIcon.appiconset/Contents.json: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/Base.lproj/Main.storyboard: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/Base.lproj/Main.storyboard.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist: Added.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/AppDelegate.h.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.h.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/TabViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/TabViewController.m.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.h: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.h.
+        * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m: Renamed from Tools/MobileMiniBrowser/MobileMiniBrowser/WebViewController.m.
+        (+[NSURL __bundleURLForFileURL:bundle:]): Add utility method.
+        (+[NSURL __fileURLForBundleURL:bundle:]): Ditto.
+        (-[WebViewController navigateTo:]): Support loading "bundle:/" URLs which are really just "file:" URLs
+            pointing to the framework's resources directory.
+        (-[WebViewController observeValueForKeyPath:ofObject:change:context:]): Ditto.
+        * MobileMiniBrowser/MobileMiniBrowserUITests/MobileMiniBrowserUITests.m:
+        (-[MobileMiniBrowserUITests testBasicVideoPlayback]):
+
 2016-09-02  Jonathan Bedard  <jbedard@apple.com>
 
         Fix --no-sample-on-timeout command line argument
index f88c726..ed80413 100644 (file)
 
 #include "../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
 
-SDKROOT = iphoneos;
-
-TARGETED_DEVICE_FAMILY = 1,2;
-
+USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
+USE_INTERNAL_SDK_Production = YES;
+USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
+USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
+
+CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
+CLANG_CXX_LIBRARY = libc++;
+CLANG_WARN_CXX0X_EXTENSIONS = NO;
+HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include;
 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
-
-GCC_C_LANGUAGE_STANDARD = gnu99;
-
-GCC_PREPROCESSOR_DEFINITIONS = $(ENGINEERING_BUILD_DEFINES) $(inherited);
-
-GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-
-CLANG_WARN_BOOL_CONVERSION = YES;
-CLANG_WARN_CONSTANT_CONVERSION = YES;
-CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-CLANG_WARN_EMPTY_BODY = YES;
-CLANG_WARN_ENUM_CONVERSION = YES;
-CLANG_WARN_INT_CONVERSION = YES;
-CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-CLANG_ENABLE_OBJC_ARC = YES;
-
-GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
-GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
-GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-GCC_WARN_ABOUT_RETURN_TYPE = YES;
-GCC_WARN_UNDECLARED_SELECTOR = YES;
-GCC_WARN_UNINITIALIZED_AUTOS = YES;
-GCC_WARN_UNUSED_FUNCTION = YES;
-GCC_WARN_UNUSED_VARIABLE = YES;
-
-WARNING_CFLAGS = -Wall -Wundef -Wformat-security -Wimplicit-fallthrough -Wmissing-format-attribute -Wpointer-arith -Wexit-time-destructors -Wglobal-constructors -Woverriding-method-mismatch -Wmethod-signatures;
-
-OTHER_CFLAGS = -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(inherited);
-
-ALWAYS_SEARCH_USER_PATHS = NO;
+PREBINDING = NO
+GCC_C_LANGUAGE_STANDARD = gnu99
+GCC_ENABLE_CPP_EXCEPTIONS = NO;
+GCC_ENABLE_CPP_RTTI = NO;
+GCC_PRECOMPILE_PREFIX_HEADER = YES
+GCC_TREAT_WARNINGS_AS_ERRORS = YES
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO
+GCC_WARN_UNUSED_FUNCTION = YES
+GCC_WARN_UNUSED_VARIABLE = YES
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64] = NO;
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
+WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
+
+SUPPORTED_PLATFORMS = iphoneos iphonesimulator;
+SDKROOT = iphonesimulator;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
+
+CODE_SIGN_IDENTITY = -;
index 998f198..8e441de 100644 (file)
@@ -28,7 +28,3 @@ ARCHS = $(ARCHS_STANDARD_32_64_BIT);
 ONLY_ACTIVE_ARCH = YES;
 
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
-
-SDKROOT = $(SDKROOT_$(PLATFORM_NAME));
-SDKROOT_iphoneos = $(SDKROOT);
-SDKROOT_iphonesimulator = $(SDKROOT);
index 5117d63..f329577 100644 (file)
@@ -22,4 +22,3 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
 PRODUCT_NAME = MiniBrowser
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *
index c619477..9e963e2 100644 (file)
@@ -8,14 +8,27 @@
 
 /* Begin PBXBuildFile section */
                CD1DAF971D709E3600017CF0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF961D709E3600017CF0 /* main.m */; };
-               CD1DAF9A1D709E3600017CF0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF991D709E3600017CF0 /* AppDelegate.m */; };
-               CD1DAFA01D709E3600017CF0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAF9E1D709E3600017CF0 /* Main.storyboard */; };
-               CD1DAFA21D709E3600017CF0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA11D709E3600017CF0 /* Assets.xcassets */; };
                CD1DAFA51D709E3600017CF0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */; };
                CD1DAFB01D709E3600017CF0 /* MobileMiniBrowserUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFAF1D709E3600017CF0 /* MobileMiniBrowserUITests.m */; };
-               CD1DAFBE1D709EF200017CF0 /* TabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBB1D709EF200017CF0 /* TabViewController.m */; };
-               CD1DAFBF1D709EF200017CF0 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBD1D709EF200017CF0 /* WebViewController.m */; };
                CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD1DAFC11D70E12D00017CF0 /* WebKit.framework */; };
+               CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; };
+               CD498B431D76348000681FA7 /* MobileMiniBrowser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+               CD498B4A1D763D4800681FA7 /* MobileMiniBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               CD498B4B1D763D7100681FA7 /* TabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBB1D709EF200017CF0 /* TabViewController.m */; };
+               CD498B4C1D763D7100681FA7 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFBD1D709EF200017CF0 /* WebViewController.m */; };
+               CD498B4D1D763D7100681FA7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF991D709E3600017CF0 /* AppDelegate.m */; };
+               CD498B4E1D763D7600681FA7 /* TabViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAFBA1D709EF200017CF0 /* TabViewController.h */; };
+               CD498B4F1D763D7600681FA7 /* WebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAFBC1D709EF200017CF0 /* WebViewController.h */; };
+               CD498B501D763D7600681FA7 /* AppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1DAF981D709E3600017CF0 /* AppDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               CD498B511D763D7F00681FA7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAF9E1D709E3600017CF0 /* Main.storyboard */; };
+               CD498B521D763D8800681FA7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA11D709E3600017CF0 /* Assets.xcassets */; };
+               CD498B531D763D9300681FA7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = CD498B471D7634C700681FA7 /* Info.plist */; };
+               CD4DEEE51D78C6FF00625986 /* Base.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE21D78C6FF00625986 /* Base.xcconfig */; };
+               CD4DEEE61D78C6FF00625986 /* DebugRelease.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */; };
+               CD4DEEE71D78C6FF00625986 /* MobileMiniBrowser.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */; };
+               CDA985191D76483400EBC399 /* test.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = CDA985151D76477900EBC399 /* test.mp4 */; };
+               CDA9851A1D76483400EBC399 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985131D76474100EBC399 /* index.html */; };
+               CDA9851B1D76483400EBC399 /* looping.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985171D7647CD00EBC399 /* looping.html */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
                        remoteGlobalIDString = CD1DAF911D709E3600017CF0;
                        remoteInfo = MobileMiniBrowser;
                };
+               CD498B401D76348000681FA7 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = CD1DAF8A1D709E3600017CF0 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = CD498B3A1D76348000681FA7;
+                       remoteInfo = MobileMiniBrowser;
+               };
 /* End PBXContainerItemProxy section */
 
+/* Begin PBXCopyFilesBuildPhase section */
+               CD498B231D76341700681FA7 /* Embed Frameworks */ = {
+                       isa = PBXCopyFilesBuildPhase;
+                       buildActionMask = 2147483647;
+                       dstPath = "";
+                       dstSubfolderSpec = 10;
+                       files = (
+                               CD498B431D76348000681FA7 /* MobileMiniBrowser.framework in Embed Frameworks */,
+                       );
+                       name = "Embed Frameworks";
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXCopyFilesBuildPhase section */
+
 /* Begin PBXFileReference section */
                CD1DAF921D709E3600017CF0 /* MobileMiniBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MobileMiniBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; };
                CD1DAF961D709E3600017CF0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
                CD1DAFBC1D709EF200017CF0 /* WebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewController.h; sourceTree = "<group>"; };
                CD1DAFBD1D709EF200017CF0 /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewController.m; sourceTree = "<group>"; };
                CD1DAFC11D70E12D00017CF0 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = "../../WebKitBuild/Debug-iphonesimulator/WebKit.framework"; sourceTree = "<group>"; };
+               CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MobileMiniBrowser.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+               CD498B471D7634C700681FA7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+               CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobileMiniBrowser.h; sourceTree = "<group>"; };
+               CD4DEEE21D78C6FF00625986 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Base.xcconfig; path = Configurations/Base.xcconfig; sourceTree = "<group>"; };
+               CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = DebugRelease.xcconfig; path = Configurations/DebugRelease.xcconfig; sourceTree = "<group>"; };
+               CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = MobileMiniBrowser.xcconfig; path = Configurations/MobileMiniBrowser.xcconfig; sourceTree = "<group>"; };
+               CDA985131D76474100EBC399 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = index.html; path = Resources/index.html; sourceTree = "<group>"; };
+               CDA985151D76477900EBC399 /* test.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = test.mp4; path = Resources/test.mp4; sourceTree = "<group>"; };
+               CDA985171D7647CD00EBC399 /* looping.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = looping.html; path = Resources/looping.html; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -52,6 +95,7 @@
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */,
                                CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               CD498B371D76348000681FA7 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
                CD1DAF891D709E3600017CF0 = {
                        isa = PBXGroup;
                        children = (
-                               CD1DAF941D709E3600017CF0 /* MobileMiniBrowser */,
+                               CD4DEEE11D78C6F400625986 /* Configurations */,
+                               CD1DAF941D709E3600017CF0 /* MobileMiniBrowser App */,
+                               CD498B3C1D76348000681FA7 /* MobileMiniBrowser Framework */,
                                CD1DAFAE1D709E3600017CF0 /* MobileMiniBrowserUITests */,
                                CD1DAF931D709E3600017CF0 /* Products */,
                                CD1DAFC01D70E12D00017CF0 /* Frameworks */,
                        children = (
                                CD1DAF921D709E3600017CF0 /* MobileMiniBrowser.app */,
                                CD1DAFAB1D709E3600017CF0 /* MobileMiniBrowserUITests.xctest */,
+                               CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                };
-               CD1DAF941D709E3600017CF0 /* MobileMiniBrowser */ = {
+               CD1DAF941D709E3600017CF0 /* MobileMiniBrowser App */ = {
                        isa = PBXGroup;
                        children = (
-                               CD1DAFBA1D709EF200017CF0 /* TabViewController.h */,
-                               CD1DAFBB1D709EF200017CF0 /* TabViewController.m */,
-                               CD1DAFBC1D709EF200017CF0 /* WebViewController.h */,
-                               CD1DAFBD1D709EF200017CF0 /* WebViewController.m */,
-                               CD1DAF981D709E3600017CF0 /* AppDelegate.h */,
-                               CD1DAF991D709E3600017CF0 /* AppDelegate.m */,
-                               CD1DAF9E1D709E3600017CF0 /* Main.storyboard */,
-                               CD1DAFA11D709E3600017CF0 /* Assets.xcassets */,
-                               CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */,
                                CD1DAFA61D709E3600017CF0 /* Info.plist */,
-                               CD1DAF951D709E3600017CF0 /* Supporting Files */,
-                       );
-                       path = MobileMiniBrowser;
-                       sourceTree = "<group>";
-               };
-               CD1DAF951D709E3600017CF0 /* Supporting Files */ = {
-                       isa = PBXGroup;
-                       children = (
+                               CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */,
                                CD1DAF961D709E3600017CF0 /* main.m */,
                        );
-                       name = "Supporting Files";
+                       name = "MobileMiniBrowser App";
+                       path = MobileMiniBrowser;
                        sourceTree = "<group>";
                };
                CD1DAFAE1D709E3600017CF0 /* MobileMiniBrowserUITests */ = {
                        name = Frameworks;
                        sourceTree = "<group>";
                };
+               CD498B3C1D76348000681FA7 /* MobileMiniBrowser Framework */ = {
+                       isa = PBXGroup;
+                       children = (
+                               CDA985121D76471700EBC399 /* Resources */,
+                               CD1DAF981D709E3600017CF0 /* AppDelegate.h */,
+                               CD1DAF991D709E3600017CF0 /* AppDelegate.m */,
+                               CD1DAFA11D709E3600017CF0 /* Assets.xcassets */,
+                               CD498B471D7634C700681FA7 /* Info.plist */,
+                               CD1DAF9E1D709E3600017CF0 /* Main.storyboard */,
+                               CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */,
+                               CD1DAFBA1D709EF200017CF0 /* TabViewController.h */,
+                               CD1DAFBB1D709EF200017CF0 /* TabViewController.m */,
+                               CD1DAFBC1D709EF200017CF0 /* WebViewController.h */,
+                               CD1DAFBD1D709EF200017CF0 /* WebViewController.m */,
+                       );
+                       name = "MobileMiniBrowser Framework";
+                       path = MobileMiniBrowserFramework;
+                       sourceTree = SOURCE_ROOT;
+               };
+               CD4DEEE11D78C6F400625986 /* Configurations */ = {
+                       isa = PBXGroup;
+                       children = (
+                               CD4DEEE21D78C6FF00625986 /* Base.xcconfig */,
+                               CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */,
+                               CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */,
+                       );
+                       name = Configurations;
+                       sourceTree = "<group>";
+               };
+               CDA985121D76471700EBC399 /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               CDA985151D76477900EBC399 /* test.mp4 */,
+                               CDA985131D76474100EBC399 /* index.html */,
+                               CDA985171D7647CD00EBC399 /* looping.html */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
 /* End PBXGroup section */
 
+/* Begin PBXHeadersBuildPhase section */
+               CD498B381D76348000681FA7 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               CD498B4A1D763D4800681FA7 /* MobileMiniBrowser.h in Headers */,
+                               CD498B4F1D763D7600681FA7 /* WebViewController.h in Headers */,
+                               CD498B4E1D763D7600681FA7 /* TabViewController.h in Headers */,
+                               CD498B501D763D7600681FA7 /* AppDelegate.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
 /* Begin PBXNativeTarget section */
                CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */ = {
                        isa = PBXNativeTarget;
                                CD1DAF8E1D709E3600017CF0 /* Sources */,
                                CD1DAF8F1D709E3600017CF0 /* Frameworks */,
                                CD1DAF901D709E3600017CF0 /* Resources */,
+                               CD498B231D76341700681FA7 /* Embed Frameworks */,
                        );
                        buildRules = (
                        );
                        dependencies = (
+                               CD498B411D76348000681FA7 /* PBXTargetDependency */,
                        );
                        name = MobileMiniBrowser;
                        productName = MobileMiniBrowser;
                        productReference = CD1DAFAB1D709E3600017CF0 /* MobileMiniBrowserUITests.xctest */;
                        productType = "com.apple.product-type.bundle.ui-testing";
                };
+               CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = CD498B441D76348000681FA7 /* Build configuration list for PBXNativeTarget "MobileMiniBrowser.framework" */;
+                       buildPhases = (
+                               CD498B361D76348000681FA7 /* Sources */,
+                               CD498B371D76348000681FA7 /* Frameworks */,
+                               CD498B381D76348000681FA7 /* Headers */,
+                               CD498B391D76348000681FA7 /* Resources */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = MobileMiniBrowser.framework;
+                       productName = MobileMiniBrowser;
+                       productReference = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */;
+                       productType = "com.apple.product-type.framework";
+               };
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
                                                CreatedOnToolsVersion = 8.0;
                                                TestTargetID = CD1DAF911D709E3600017CF0;
                                        };
+                                       CD498B3A1D76348000681FA7 = {
+                                               CreatedOnToolsVersion = 8.0;
+                                               ProvisioningStyle = Automatic;
+                                       };
                                };
                        };
                        buildConfigurationList = CD1DAF8D1D709E3600017CF0 /* Build configuration list for PBXProject "MobileMiniBrowser" */;
                        targets = (
                                CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */,
                                CD1DAFAA1D709E3600017CF0 /* MobileMiniBrowserUITests */,
+                               CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */,
                        );
                };
 /* End PBXProject section */
                        buildActionMask = 2147483647;
                        files = (
                                CD1DAFA51D709E3600017CF0 /* LaunchScreen.storyboard in Resources */,
-                               CD1DAFA21D709E3600017CF0 /* Assets.xcassets in Resources */,
-                               CD1DAFA01D709E3600017CF0 /* Main.storyboard in Resources */,
+                               CD4DEEE61D78C6FF00625986 /* DebugRelease.xcconfig in Resources */,
+                               CD4DEEE71D78C6FF00625986 /* MobileMiniBrowser.xcconfig in Resources */,
+                               CD4DEEE51D78C6FF00625986 /* Base.xcconfig in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               CD498B391D76348000681FA7 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               CDA9851A1D76483400EBC399 /* index.html in Resources */,
+                               CD498B521D763D8800681FA7 /* Assets.xcassets in Resources */,
+                               CD498B511D763D7F00681FA7 /* Main.storyboard in Resources */,
+                               CDA9851B1D76483400EBC399 /* looping.html in Resources */,
+                               CD498B531D763D9300681FA7 /* Info.plist in Resources */,
+                               CDA985191D76483400EBC399 /* test.mp4 in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               CD1DAFBE1D709EF200017CF0 /* TabViewController.m in Sources */,
-                               CD1DAF9A1D709E3600017CF0 /* AppDelegate.m in Sources */,
                                CD1DAF971D709E3600017CF0 /* main.m in Sources */,
-                               CD1DAFBF1D709EF200017CF0 /* WebViewController.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               CD498B361D76348000681FA7 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               CD498B4B1D763D7100681FA7 /* TabViewController.m in Sources */,
+                               CD498B4C1D763D7100681FA7 /* WebViewController.m in Sources */,
+                               CD498B4D1D763D7100681FA7 /* AppDelegate.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
                        target = CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */;
                        targetProxy = CD1DAFAC1D709E3600017CF0 /* PBXContainerItemProxy */;
                };
+               CD498B411D76348000681FA7 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */;
+                       targetProxy = CD498B401D76348000681FA7 /* PBXContainerItemProxy */;
+               };
 /* End PBXTargetDependency section */
 
 /* Begin PBXVariantGroup section */
 /* Begin XCBuildConfiguration section */
                CD1DAFB21D709E3600017CF0 /* Debug */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */;
                        buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_ANALYZER_NONNULL = YES;
                };
                CD1DAFB31D709E3600017CF0 /* Release */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE31D78C6FF00625986 /* DebugRelease.xcconfig */;
                        buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
                                CLANG_ANALYZER_NONNULL = YES;
                };
                CD1DAFB51D709E3600017CF0 /* Debug */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
-                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               PRODUCT_NAME = MobileMiniBrowser;
                        };
                        name = Debug;
                };
                CD1DAFB61D709E3600017CF0 /* Release */ = {
                        isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                                INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
                                PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
-                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               PRODUCT_NAME = MobileMiniBrowser;
                        };
                        name = Release;
                };
                        };
                        name = Release;
                };
+               CD498B451D76348000681FA7 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
+                       buildSettings = {
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEFINES_MODULE = YES;
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               DYLIB_INSTALL_NAME_BASE = "@rpath";
+                               INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
+                               INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+                               LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+                               PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
+                               PRODUCT_NAME = MobileMiniBrowser;
+                               SKIP_INSTALL = YES;
+                               VERSIONING_SYSTEM = "apple-generic";
+                               VERSION_INFO_PREFIX = "";
+                       };
+                       name = Debug;
+               };
+               CD498B461D76348000681FA7 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = CD4DEEE41D78C6FF00625986 /* MobileMiniBrowser.xcconfig */;
+                       buildSettings = {
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEFINES_MODULE = YES;
+                               DYLIB_COMPATIBILITY_VERSION = 1;
+                               DYLIB_CURRENT_VERSION = 1;
+                               DYLIB_INSTALL_NAME_BASE = "@rpath";
+                               INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
+                               INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+                               LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+                               PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
+                               PRODUCT_NAME = MobileMiniBrowser;
+                               SKIP_INSTALL = YES;
+                               VERSIONING_SYSTEM = "apple-generic";
+                               VERSION_INFO_PREFIX = "";
+                       };
+                       name = Release;
+               };
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               CD498B441D76348000681FA7 /* Build configuration list for PBXNativeTarget "MobileMiniBrowser.framework" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               CD498B451D76348000681FA7 /* Debug */,
+                               CD498B461D76348000681FA7 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
 /* End XCConfigurationList section */
        };
        rootObject = CD1DAF8A1D709E3600017CF0 /* Project object */;
index 06eb351..b383b8a 100644 (file)
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11191" systemVersion="16B2314" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
     <dependencies>
         <deployment version="2304" identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11156"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--View Controller-->
         <scene sceneID="EHf-IW-A2E">
             <objects>
-                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="idViewController" id="01J-lp-oVM" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
                         <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="9qo-7e-hd1">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F7I-Hn-oUR">
-                                <rect key="frame" x="0.0" y="0.0" width="0.0" height="44"/>
+                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F7I-Hn-oUR">
                                 <constraints>
                                     <constraint firstAttribute="height" constant="44" id="h95-xh-m8y"/>
                                 </constraints>
                                     <barButtonItem title="Tabs" id="dXJ-Pm-BgJ"/>
                                 </items>
                             </toolbar>
-                            <view clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Vg-6f-OBr" userLabel="URL Field Container">
+                            <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Vg-6f-OBr" userLabel="URL Field Container">
                                 <subviews>
-                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nX4-D6-AXV">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="45"/>
+                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nX4-D6-AXV">
                                         <items/>
                                     </toolbar>
-                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="L4i-oL-VFG">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="30"/>
+                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="L4i-oL-VFG">
                                         <nil key="textColor"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                         <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="URL" returnKeyType="go" enablesReturnKeyAutomatically="YES"/>
                                     </textField>
-                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1CE-0G-4aC">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1CE-0G-4aC">
                                         <constraints>
                                             <constraint firstAttribute="width" constant="45.999999999999886" id="Az8-yd-X45"/>
                                         </constraints>
                                         <state key="normal" title="Go"/>
                                     </button>
-                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vYP-Mc-B8q">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="2"/>
-                                    </progressView>
+                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vYP-Mc-B8q"/>
                                 </subviews>
                                 <constraints>
                                     <constraint firstItem="nX4-D6-AXV" firstAttribute="top" secondItem="7Vg-6f-OBr" secondAttribute="top" constant="-1" id="2rs-N5-Hdo"/>
@@ -72,7 +68,7 @@
                                 </constraints>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <color key="backgroundColor" red="1" green="0.99997437000274658" blue="0.99999129772186279" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                             <constraint firstItem="F7I-Hn-oUR" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" id="Dbb-TN-26g"/>
                             <constraint firstItem="7Vg-6f-OBr" firstAttribute="leading" secondItem="9qo-7e-hd1" secondAttribute="leading" id="Qu5-yy-1EE"/>
index 2414986..3461bf6 100644 (file)
@@ -22,8 +22,6 @@
        <true/>
        <key>UILaunchStoryboardName</key>
        <string>LaunchScreen</string>
-       <key>UIMainStoryboardFile</key>
-       <string>Main</string>
        <key>UIRequiredDeviceCapabilities</key>
        <array>
                <string>armv7</string>
index f8aa61d..ec295ac 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "AppDelegate.h"
-#import <UIKit/UIKit.h>
+#import <MobileMiniBrowser/MobileMiniBrowser.h>
 
 int main(int argc, char * argv[])
 {
 
 #import "AppDelegate.h"
 
-@interface AppDelegate ()
+#import "WebViewController.h"
 
+@interface AppDelegate ()
 @end
 
 @implementation AppDelegate
 
-
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
-    // Override point for customization after application launch.
+    UIStoryboard *frameworkMainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle bundleForClass:[AppDelegate class]]];
+    WebViewController *viewController = [frameworkMainStoryboard instantiateInitialViewController];
+    if (!viewController)
+        return NO;
+
+    if (!self.window)
+        self.window = [[UIWindow alloc] init];
+    self.window.rootViewController = viewController;
+    [self.window makeKeyAndVisible];
+
     return YES;
 }
 
@@ -1,8 +1,9 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ohh-6U-lsQ">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11191" systemVersion="16B2314" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Ohh-6U-lsQ">
     <dependencies>
         <deployment version="2304" identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11156"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--Web View-->
                         <viewControllerLayoutGuide type="bottom" id="mUo-dB-Gut"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="1WJ-am-PnB">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SYm-x3-D12">
-                                <rect key="frame" x="0.0" y="0.0" width="0.0" height="44"/>
+                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SYm-x3-D12">
                                 <constraints>
                                     <constraint firstAttribute="height" constant="44" id="0IC-RY-cRv"/>
                                 </constraints>
                                     </barButtonItem>
                                 </items>
                             </toolbar>
-                            <view clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wkd-K8-BC1" userLabel="URL Field Container">
+                            <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wkd-K8-BC1" userLabel="URL Field Container">
                                 <subviews>
-                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SSg-5u-loI">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="46"/>
+                                    <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SSg-5u-loI">
                                         <items/>
                                     </toolbar>
-                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="n4f-v4-gO4">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="30"/>
+                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="249" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="n4f-v4-gO4">
                                         <accessibility key="accessibilityConfiguration" identifier="idURLField" label="URL Field"/>
                                         <nil key="textColor"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -65,7 +63,7 @@
                                             <action selector="urlFieldEditingBegan:" destination="Ohh-6U-lsQ" eventType="editingDidBegin" id="VDr-b6-Z9E"/>
                                         </connections>
                                     </textField>
-                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSw-Ym-IBE">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qSw-Ym-IBE">
                                         <accessibility key="accessibilityConfiguration" identifier="idGoToURL" label="Go To URL"/>
                                         <constraints>
                                             <constraint firstAttribute="width" constant="45.999999999999886" id="hr8-Tf-lDT"/>
@@ -75,9 +73,7 @@
                                             <action selector="navigateTo:" destination="Ohh-6U-lsQ" eventType="touchUpInside" id="va2-3J-Gmh"/>
                                         </connections>
                                     </button>
-                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" misplaced="YES" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="2bJ-bG-4SW">
-                                        <rect key="frame" x="0.0" y="0.0" width="0.0" height="2"/>
-                                    </progressView>
+                                    <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="2bJ-bG-4SW"/>
                                 </subviews>
                                 <constraints>
                                     <constraint firstItem="SSg-5u-loI" firstAttribute="trailing" secondItem="Wkd-K8-BC1" secondAttribute="trailing" id="6KS-dw-2cN"/>
                                     <constraint firstAttribute="height" constant="44" id="zaj-6L-uzc"/>
                                 </constraints>
                             </view>
-                            <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="719-Zt-fvZ" userLabel="Web View Container">
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="719-Zt-fvZ" userLabel="Web View Container">
+                                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <accessibility key="accessibilityConfiguration" label="Web View Container"/>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <color key="backgroundColor" red="1" green="0.99997437000274658" blue="0.99999129772186279" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                             <constraint firstItem="Wkd-K8-BC1" firstAttribute="leading" secondItem="1WJ-am-PnB" secondAttribute="leading" id="2cZ-lB-Wel"/>
                             <constraint firstItem="Wkd-K8-BC1" firstAttribute="trailing" secondItem="1WJ-am-PnB" secondAttribute="trailing" id="9PH-Z4-jms"/>
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="Pid-8n-Ixq">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="idTabViewCustomCell" selectionStyle="default" indentationWidth="10" id="Bxf-dM-uYf">
                                 <rect key="frame" x="0.0" y="28" width="375" height="44"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Bxf-dM-uYf" id="lpb-yc-EJ5">
-                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                    <frame key="frameInset" width="375" height="44"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableViewCellContentView>
                             </tableViewCell>
diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Info.plist
new file mode 100644 (file)
index 0000000..fbe1e6b
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>en</string>
+       <key>CFBundleExecutable</key>
+       <string>$(EXECUTABLE_NAME)</string>
+       <key>CFBundleIdentifier</key>
+       <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>$(PRODUCT_NAME)</string>
+       <key>CFBundlePackageType</key>
+       <string>FMWK</string>
+       <key>CFBundleShortVersionString</key>
+       <string>1.0</string>
+       <key>CFBundleVersion</key>
+       <string>$(CURRENT_PROJECT_VERSION)</string>
+       <key>NSPrincipalClass</key>
+       <string></string>
+</dict>
+</plist>
diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/MobileMiniBrowser.h
new file mode 100644 (file)
index 0000000..11c823e
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <MobileMiniBrowser/AppDelegate.h>
diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/index.html b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/index.html
new file mode 100644 (file)
index 0000000..cb7eb98
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Test Resources</title>
+        <meta name="viewport" content="width=device-width">
+    </head>
+    <body>
+        <div><a href="looping.html">Looping</a></div>
+    </body>
+</html>
diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/looping.html b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/looping.html
new file mode 100644 (file)
index 0000000..e09affd
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Test Resources</title>
+    </head>
+    <body>
+        <video src="test.mp4" controls loop preload="metadata"></video>
+    </body>
+</html>
diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test.mp4 b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test.mp4
new file mode 100644 (file)
index 0000000..bb15fd4
Binary files /dev/null and b/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test.mp4 differ
 #import <WebKit/WKWebView.h>
 #import <WebKit/WKWebViewConfiguration.h>
 
+@implementation NSURL (BundleURLMethods)
++ (NSURL *)__bundleURLForFileURL:(NSURL *)url bundle:(NSBundle *)bundle
+{
+    if (![url.scheme isEqualToString:@"file"])
+        return nil;
+    NSString *resourcePath = [bundle.resourcePath stringByAppendingString:@"/"];
+    if (![url.path hasPrefix:resourcePath])
+        return nil;
+    NSURLComponents *bundleComponents = [[NSURLComponents alloc] init];
+    bundleComponents.scheme = @"bundle";
+    bundleComponents.path = [url.path substringFromIndex:resourcePath.length];
+    return [bundleComponents.URL copy];
+}
+
++ (NSURL *)__fileURLForBundleURL:(NSURL *)url bundle:(NSBundle *)bundle
+{
+    if (![url.scheme isEqualToString:@"bundle"])
+        return nil;
+    return [bundle.resourceURL URLByAppendingPathComponent:url.path];
+}
+@end
+
 @interface WebViewController () <WKNavigationDelegate> {
     WKWebView *_currentWebView;
 }
@@ -90,12 +112,18 @@ void* URLContext = &URLContext;
     NSString* requestedDestination = self.urlField.text;
     if ([requestedDestination rangeOfString:@"^[\\p{Alphabetic}]+:" options:(NSRegularExpressionSearch | NSCaseInsensitiveSearch | NSAnchoredSearch)].location == NSNotFound)
         requestedDestination = [@"http://" stringByAppendingString:requestedDestination];
-    [self.currentWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:requestedDestination]]];
+    NSURL* requestedURL = [NSURL URLWithString:requestedDestination];
+    if ([requestedURL.scheme isEqualToString:@"bundle"]) {
+        NSBundle *frameworkBundle = [NSBundle bundleForClass:[WebViewController class]];
+        requestedURL = [NSURL __fileURLForBundleURL:requestedURL bundle:frameworkBundle];
+        [self.currentWebView loadFileURL:requestedURL allowingReadAccessToURL:frameworkBundle.resourceURL];
+    }
+    [self.currentWebView loadRequest:[NSURLRequest requestWithURL:requestedURL]];
 }
 
 - (IBAction)showTabs:(id)sender
 {
-    [self presentViewController:self.tabViewController animated:YES completion:^{ }];
+    [self presentViewController:self.tabViewController animated:YES completion:nil];
     self.tabViewController.popoverPresentationController.barButtonItem = self.tabButton;
 }
 
@@ -173,7 +201,7 @@ void* URLContext = &URLContext;
 
 #pragma mark Navigation Delegate
 
-- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error;
+- (void)webView:(WKWebView *)webView didFailNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error
 {
     [webView loadHTMLString:[error description] baseURL:nil];
 }
@@ -186,10 +214,12 @@ void* URLContext = &URLContext;
         float value = [[change valueForKey:NSKeyValueChangeNewKey] floatValue];
         [self.progressView setProgress:value animated:YES];
     } else if (context == URLContext) {
-        id newURLValue = [change valueForKey:NSKeyValueChangeNewKey];
-        if ([newURLValue isKindOfClass:[NSURL class]])
+        NSURL *newURLValue = [change valueForKey:NSKeyValueChangeNewKey];
+        if ([newURLValue isKindOfClass:[NSURL class]]) {
+            if ([newURLValue.scheme isEqualToString:@"file"])
+                newURLValue = [NSURL __bundleURLForFileURL:newURLValue bundle:[NSBundle bundleForClass:[WebViewController class]]];
             self.urlField.text = [newURLValue absoluteString];
-        else if ([newURLValue isKindOfClass:[NSNull class]])
+        else if ([newURLValue isKindOfClass:[NSNull class]])
             self.urlField.text = @"";
     } else if (context == TitleContext)
         [self.tabViewController.tableView reloadData];
index 81d209d..2b000ac 100644 (file)
     XCUIElement *clearButton = urlField.buttons[@"Clear text"];
     if (clearButton.exists)
         [clearButton tap];
-    [urlField typeText:@"http://test-safari.apple.com/"];
+    [urlField typeText:@"bundle:/looping.html"];
     [app.buttons[@"Go To URL"] tap];
 
-    XCUIElement *captions = app.links[@"Captions"];
-    [self expectationForPredicate:exists evaluatedWithObject:captions handler:nil];
-    [self waitForExpectationsWithTimeout:5.0 handler:nil];
-    [captions tap];
-
-    XCUIElement *viewInPage = app.links[@"Video in page"];
-    [self expectationForPredicate:exists evaluatedWithObject:viewInPage handler:nil];
-    [self waitForExpectationsWithTimeout:5.0 handler:nil];
-    [viewInPage tap];
-
     XCUIElement *startPlayback = app.buttons[@"Start Playback"];
     [self expectationForPredicate:exists evaluatedWithObject:startPlayback handler:nil];
     [self waitForExpectationsWithTimeout:5.0 handler:nil];