feat:update iOS Project file

This commit is contained in:
pengfei.zhou 2019-12-06 11:15:08 +08:00
parent 458638bd42
commit ccf665ee43
9 changed files with 23 additions and 110 deletions

View File

@ -1,3 +1,5 @@
Podfile.lock Podfile.lock
Example.xcworkspace/* Example.xcworkspace/
Pods/* Pods/
.idea/
Example.xcodeproj/xcuserdata/

View File

@ -10,8 +10,6 @@
95EDDB7EAB47A65821DBC7EC /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB59FE64F1D814FD13C71BB2 /* Pods_Example.framework */; }; 95EDDB7EAB47A65821DBC7EC /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB59FE64F1D814FD13C71BB2 /* Pods_Example.framework */; };
E2F64CEF2399359C0006BD9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CEE2399359C0006BD9A /* AppDelegate.m */; }; E2F64CEF2399359C0006BD9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CEE2399359C0006BD9A /* AppDelegate.m */; };
E2F64CF22399359C0006BD9A /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CF12399359C0006BD9A /* SceneDelegate.m */; }; E2F64CF22399359C0006BD9A /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CF12399359C0006BD9A /* SceneDelegate.m */; };
E2F64CF52399359C0006BD9A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CF42399359C0006BD9A /* ViewController.m */; };
E2F64CF82399359C0006BD9A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F64CF62399359C0006BD9A /* Main.storyboard */; };
E2F64CFA2399359E0006BD9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2F64CF92399359E0006BD9A /* Assets.xcassets */; }; E2F64CFA2399359E0006BD9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2F64CF92399359E0006BD9A /* Assets.xcassets */; };
E2F64CFD2399359E0006BD9A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */; }; E2F64CFD2399359E0006BD9A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */; };
E2F64D002399359E0006BD9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CFF2399359E0006BD9A /* main.m */; }; E2F64D002399359E0006BD9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F64CFF2399359E0006BD9A /* main.m */; };
@ -27,9 +25,6 @@
E2F64CEE2399359C0006BD9A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; E2F64CEE2399359C0006BD9A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
E2F64CF02399359C0006BD9A /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; }; E2F64CF02399359C0006BD9A /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
E2F64CF12399359C0006BD9A /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; }; E2F64CF12399359C0006BD9A /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
E2F64CF32399359C0006BD9A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
E2F64CF42399359C0006BD9A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
E2F64CF72399359C0006BD9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
E2F64CF92399359E0006BD9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; E2F64CF92399359E0006BD9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
E2F64CFC2399359E0006BD9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; E2F64CFC2399359E0006BD9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
E2F64CFE2399359E0006BD9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; E2F64CFE2399359E0006BD9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -84,9 +79,6 @@
E2F64CEE2399359C0006BD9A /* AppDelegate.m */, E2F64CEE2399359C0006BD9A /* AppDelegate.m */,
E2F64CF02399359C0006BD9A /* SceneDelegate.h */, E2F64CF02399359C0006BD9A /* SceneDelegate.h */,
E2F64CF12399359C0006BD9A /* SceneDelegate.m */, E2F64CF12399359C0006BD9A /* SceneDelegate.m */,
E2F64CF32399359C0006BD9A /* ViewController.h */,
E2F64CF42399359C0006BD9A /* ViewController.m */,
E2F64CF62399359C0006BD9A /* Main.storyboard */,
E2F64CF92399359E0006BD9A /* Assets.xcassets */, E2F64CF92399359E0006BD9A /* Assets.xcassets */,
E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */, E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */,
E2F64CFE2399359E0006BD9A /* Info.plist */, E2F64CFE2399359E0006BD9A /* Info.plist */,
@ -166,7 +158,6 @@
E2F64D07239936A70006BD9A /* src in Resources */, E2F64D07239936A70006BD9A /* src in Resources */,
E2F64CFD2399359E0006BD9A /* LaunchScreen.storyboard in Resources */, E2F64CFD2399359E0006BD9A /* LaunchScreen.storyboard in Resources */,
E2F64CFA2399359E0006BD9A /* Assets.xcassets in Resources */, E2F64CFA2399359E0006BD9A /* Assets.xcassets in Resources */,
E2F64CF82399359C0006BD9A /* Main.storyboard in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -236,7 +227,6 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
E2F64CF52399359C0006BD9A /* ViewController.m in Sources */,
E2F64CEF2399359C0006BD9A /* AppDelegate.m in Sources */, E2F64CEF2399359C0006BD9A /* AppDelegate.m in Sources */,
E2F64D002399359E0006BD9A /* main.m in Sources */, E2F64D002399359E0006BD9A /* main.m in Sources */,
E2F64CF22399359C0006BD9A /* SceneDelegate.m in Sources */, E2F64CF22399359C0006BD9A /* SceneDelegate.m in Sources */,
@ -246,14 +236,6 @@
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
E2F64CF62399359C0006BD9A /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
E2F64CF72399359C0006BD9A /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */ = { E2F64CFB2399359E0006BD9A /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (

View File

@ -9,7 +9,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate> @interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end @end

View File

@ -7,16 +7,22 @@
// //
#import "AppDelegate.h" #import "AppDelegate.h"
#import <Doric/Doric.h>
@interface AppDelegate () @interface AppDelegate ()
@end @end
@implementation AppDelegate @implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch. NSString *bundleName = @"__$__";
DoricViewController *doricViewController = [[DoricViewController alloc] initWithScheme:[NSString stringWithFormat:@"assets://src/%@.js", bundleName] alias:bundleName];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UINavigationController *navVC = [[UINavigationController
alloc] initWithRootViewController:doricViewController];
self.window.rootViewController = navVC;
[self.window makeKeyAndVisible];
return YES; return YES;
} }

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -33,16 +33,12 @@
<string>Default Configuration</string> <string>Default Configuration</string>
<key>UISceneDelegateClassName</key> <key>UISceneDelegateClassName</key>
<string>SceneDelegate</string> <string>SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict> </dict>
</array> </array>
</dict> </dict>
</dict> </dict>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>
<array> <array>
<string>armv7</string> <string>armv7</string>

View File

@ -1,16 +1,20 @@
#import "SceneDelegate.h" #import "SceneDelegate.h"
#import <Doric/Doric.h>
@interface SceneDelegate () @interface SceneDelegate ()
@end @end
@implementation SceneDelegate @implementation SceneDelegate
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. UIWindowScene *windowScene = (UIWindowScene *) scene;
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. NSString *bundleName = @"mcd";
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). DoricViewController *doricViewController = [[DoricViewController alloc] initWithScheme:[NSString stringWithFormat:@"assets://src/%@.js", bundleName] alias:bundleName];
doricViewController.view.backgroundColor = [UIColor whiteColor];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:doricViewController];
self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
self.window.frame = windowScene.coordinateSpace.bounds;
self.window.rootViewController = navigationController;
[self.window makeKeyAndVisible];
} }

View File

@ -1,15 +0,0 @@
//
// ViewController.h
// Example
//
// Created by pengfei.zhou on 2019/12/5.
// Copyright © 2019 pengfei.zhou. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end

View File

@ -1,37 +0,0 @@
//
// ViewController.m
// Example
//
// Created by pengfei.zhou on 2019/12/5.
// Copyright © 2019 pengfei.zhou. All rights reserved.
//
#import "ViewController.h"
#import <Doric/Doric.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
NSString *bundleName = @"__$__";
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *demoPath = [path stringByAppendingPathComponent:@"src"];
NSString *fullPath = [demoPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.js",bundleName]];
NSString *jsContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:nil];
DoricPanel *panel = [DoricPanel new];
[panel.view also:^(UIView *it) {
it.width = self.view.width;
it.height = self.view.height - 88;
it.top = 88;
[self.view addSubview:it];
}];
[self addChildViewController:panel];
[panel config:jsContent alias:bundleName];
}
@end