Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Radar model, RadarURLParser, RadarURLBuilder protocols and implemen…
…tation

- RadarOption and BrowserOption
- Basic UI architecture
  • Loading branch information
ethanhuang13 committed Jun 12, 2018
1 parent dfcf29c commit 91d54ce
Show file tree
Hide file tree
Showing 35 changed files with 1,304 additions and 96 deletions.
35 changes: 35 additions & 0 deletions .gitignore
@@ -0,0 +1,35 @@
## Fastlane
*.mobileprovision
*.cer
*.ipa
*.certSigningRequest
*.dSYM.zip
fastlane/report.xml

## Build generated
build/
DerivedData

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint
*.p12
*.dropbox
rvm.env

## Obj-C/Swift specific
*.hmap
*.ipa
12 changes: 12 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,12 @@
# rdar Changelog

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Project init
- Radar model, RadarURLParser, RadarURLBuilder protocols and implementation
- RadarOption and BrowserOption
- Basic UI architecture
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
# rdar
162 changes: 136 additions & 26 deletions rdar.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Expand Up @@ -2,13 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>rdar.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>BuildSystemType</key>
<string>Latest</string>
</dict>
</plist>
111 changes: 111 additions & 0 deletions rdar.xcodeproj/xcshareddata/xcschemes/rdar.xcscheme
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07270720CDC70300603199"
BuildableName = "rdar.app"
BlueprintName = "rdar"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07271B20CDC70600603199"
BuildableName = "rdarTests.xctest"
BlueprintName = "rdarTests"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07272620CDC70600603199"
BuildableName = "rdarUITests.xctest"
BlueprintName = "rdarUITests"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07270720CDC70300603199"
BuildableName = "rdar.app"
BlueprintName = "rdar"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07270720CDC70300603199"
BuildableName = "rdar.app"
BlueprintName = "rdar"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07270720CDC70300603199"
BuildableName = "rdar.app"
BlueprintName = "rdar"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
56 changes: 56 additions & 0 deletions rdar.xcodeproj/xcshareddata/xcschemes/rdarTests.xcscheme
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6C07271B20CDC70600603199"
BuildableName = "rdarTests.xctest"
BlueprintName = "rdarTests"
ReferencedContainer = "container:rdar.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
19 changes: 19 additions & 0 deletions rdar/AppDelegate.swift → rdar/App/AppDelegate.swift
Expand Up @@ -41,6 +41,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

// MARK: - URL Scheme

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
if let radar = Radar(url: url) {
switch UserDefaults.standard.browserOption {
case .safari:
app.open(radar.url(by: UserDefaults.standard.radarOption), options: [:]) { (success) in

}
case .sfvc:
// TODO:
break
}

return true
} else {
return false
}
}

}

24 changes: 0 additions & 24 deletions rdar/Base.lproj/Main.storyboard

This file was deleted.

71 changes: 71 additions & 0 deletions rdar/Favorites/Favorites.storyboard
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="AjK-hs-PBu">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Split View Controller-->
<scene sceneID="jYA-lU-DZg">
<objects>
<splitViewController id="AjK-hs-PBu" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" systemItem="favorites" id="7cT-9t-Gy3"/>
<connections>
<segue destination="Wz5-8E-TWU" kind="relationship" relationship="masterViewController" id="yDf-LI-BFZ"/>
</connections>
</splitViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hgT-5g-OJw" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="65" y="-40"/>
</scene>
<!--Root View Controller-->
<scene sceneID="DZX-ux-4Sl">
<objects>
<tableViewController id="UDe-Bd-7Pk" customClass="FavoritesViewController" customModule="rdar" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="FUL-cI-Phn">
<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="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="U00-py-FKx">
<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" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="U00-py-FKx" id="4n3-iy-Iyd">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="UDe-Bd-7Pk" id="231-MW-z4y"/>
<outlet property="delegate" destination="UDe-Bd-7Pk" id="EIS-ca-6ld"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Root View Controller" id="au4-Nx-RO0"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="AXy-Km-y1w" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1980" y="-40"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="vSQ-Kb-P4m">
<objects>
<navigationController id="Wz5-8E-TWU" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="5yC-J0-dkh">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="UDe-Bd-7Pk" kind="relationship" relationship="rootViewController" id="VYd-l7-YO9"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Pe-rB-Lhn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1030" y="-40"/>
</scene>
</scenes>
</document>

0 comments on commit 91d54ce

Please sign in to comment.