Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Commit

Permalink
Fixed sandboxing + fixed design
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot committed Sep 16, 2018
1 parent 85e64c7 commit c965631
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
12 changes: 7 additions & 5 deletions Chirper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
68796ABA20DFE0230012642D /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68796AB920DFE0230012642D /* Alamofire.framework */; };
68796ABB20DFE0230012642D /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68796AB920DFE0230012642D /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
6892FC3620E07D6D00C8BDA7 /* access_token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6892FC3520E07D6D00C8BDA7 /* access_token.swift */; };
68A69DA7214CB047006B0F76 /* Tweet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68A69DA6214CB047006B0F76 /* Tweet.swift */; };
68C3FF9720EC08A4002D367A /* Welcome.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68C3FF9520EC08A4002D367A /* Welcome.swift */; };
68C3FF9D20EC135E002D367A /* Profiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68C3FF9C20EC135E002D367A /* Profiles.swift */; };
68C4ECEC20DF283C004B5C5B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68C4ECEB20DF283C004B5C5B /* AppDelegate.swift */; };
Expand Down Expand Up @@ -44,6 +45,7 @@
6877C4A020EE1A3000D6E0FD /* MediaVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaVC.swift; sourceTree = "<group>"; };
68796AB920DFE0230012642D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/Mac/Alamofire.framework; sourceTree = "<group>"; };
6892FC3520E07D6D00C8BDA7 /* access_token.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = access_token.swift; sourceTree = "<group>"; };
68A69DA6214CB047006B0F76 /* Tweet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tweet.swift; sourceTree = "<group>"; };
68C3FF9520EC08A4002D367A /* Welcome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Welcome.swift; sourceTree = "<group>"; };
68C3FF9C20EC135E002D367A /* Profiles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profiles.swift; sourceTree = "<group>"; };
68C4ECE820DF283C004B5C5B /* Chirper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chirper.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -133,6 +135,7 @@
68C4ECF120DF283E004B5C5B /* Main.storyboard */,
68C4ECF420DF283E004B5C5B /* Info.plist */,
68C4ECF520DF283E004B5C5B /* Chirper.entitlements */,
68A69DA6214CB047006B0F76 /* Tweet.swift */,
);
path = Chirper;
sourceTree = "<group>";
Expand Down Expand Up @@ -173,7 +176,7 @@
LastSwiftMigration = 1000;
SystemCapabilities = {
com.apple.Sandbox = {
enabled = 1;
enabled = 0;
};
};
};
Expand Down Expand Up @@ -215,6 +218,7 @@
buildActionMask = 2147483647;
files = (
68C4ECEE20DF283C004B5C5B /* ViewController.swift in Sources */,
68A69DA7214CB047006B0F76 /* Tweet.swift in Sources */,
6877C4A120EE1A3000D6E0FD /* MediaVC.swift in Sources */,
683CAB8020F3789B0084BC06 /* PFMoveApplication.m in Sources */,
6892FC3620E07D6D00C8BDA7 /* access_token.swift in Sources */,
Expand Down Expand Up @@ -359,11 +363,10 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chirper/Chirper.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 73CCF549YB;
DEVELOPMENT_TEAM = TT6KKS6MS8;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
Expand All @@ -389,11 +392,10 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chirper/Chirper.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 73CCF549YB;
DEVELOPMENT_TEAM = TT6KKS6MS8;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
Expand Down
21 changes: 11 additions & 10 deletions Chirper/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14269.12" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14269.12"/>
<plugIn identifier="com.apple.WebKit2IBPlugin" version="14269.12"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/>
<plugIn identifier="com.apple.WebKit2IBPlugin" version="14313.18"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -287,10 +287,10 @@
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="qFJ-et-AMY"/>
<toolbarItem implicitItemIdentifier="54559DB8-0878-4E1B-B2F6-F904899EF9BD" label="Tweet" paletteLabel="Tweet" sizingBehavior="auto" id="pgH-0U-vE9">
<nil key="toolTip"/>
<button key="view" verticalHuggingPriority="750" id="eji-cW-dOb">
<rect key="frame" x="0.0" y="14" width="72" height="43"/>
<button key="view" verticalHuggingPriority="750" id="eji-cW-dOb" customClass="Tweet" customModule="Chirper" customModuleProvider="target">
<rect key="frame" x="0.0" y="14" width="75" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Tweet" bezelStyle="rounded" alignment="center" borderStyle="border" sound="Pop" inset="2" id="UPj-am-4u2">
<buttonCell key="cell" type="bevel" title="Tweet" bezelStyle="regularSquare" alignment="center" borderStyle="border" sound="Pop" inset="2" id="UPj-am-4u2">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Expand All @@ -307,7 +307,7 @@ DQ
<toolbarItem implicitItemIdentifier="A9E5308B-95CB-44F0-82FD-8E01F5C5E014" label="Buffer" paletteLabel="Buffer" sizingBehavior="auto" id="BVY-gQ-fod">
<nil key="toolTip"/>
<button key="view" verticalHuggingPriority="750" id="4f0-PB-05o">
<rect key="frame" x="0.0" y="14" width="75" height="37"/>
<rect key="frame" x="0.0" y="14" width="75" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" title="Buffer" bezelStyle="regularSquare" alignment="center" borderStyle="border" sound="Pop" inset="2" id="482-h2-RNz">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
Expand Down Expand Up @@ -385,13 +385,13 @@ DQ
<constraint firstAttribute="height" constant="32" id="oHw-vd-dj2"/>
</constraints>
</progressIndicator>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="04E-4S-J1Z">
<button verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="04E-4S-J1Z">
<rect key="frame" x="14" y="8" width="38" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="1r6-LP-rsl"/>
<constraint firstAttribute="width" constant="26" id="y2z-ea-uwh"/>
</constraints>
<buttonCell key="cell" type="round" bezelStyle="circular" image="NSAddTemplate" imagePosition="overlaps" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rcU-Rd-v7L">
<buttonCell key="cell" type="round" bezelStyle="circular" image="NSAddTemplate" imagePosition="overlaps" alignment="center" alternateImage="NSActionTemplate" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rcU-Rd-v7L">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
Expand Down Expand Up @@ -570,7 +570,7 @@ DQ
</wkWebViewConfiguration>
</wkWebView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s1T-Ti-7xG">
<rect key="frame" x="724" y="12" width="56" height="23"/>
<rect key="frame" x="724.5" y="12" width="56" height="23"/>
<buttonCell key="cell" type="roundTextured" title="Cancel" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="XHu-OU-qUg">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -600,6 +600,7 @@ DQ
</scenes>
<resources>
<image name="Chirper-HD" width="1024" height="1024"/>
<image name="NSActionTemplate" width="14" height="14"/>
<image name="NSAddTemplate" width="11" height="11"/>
<sound name="Pop"/>
</resources>
Expand Down
11 changes: 1 addition & 10 deletions Chirper/Chirper.entitlements
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?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>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
<dict/>
</plist>
21 changes: 21 additions & 0 deletions Chirper/Tweet.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// Tweet.swift
// Chirper
//
// Created by Arthur Guiot on 15/9/18.
// Copyright © 2018 Arthur Guiot. All rights reserved.
//

import Cocoa

class Tweet: NSButton {

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

// Drawing code here.

self.layer?.backgroundColor = #colorLiteral(red: 0, green: 0.3450980484, blue: 0.8156862855, alpha: 1)
}

}
1 change: 1 addition & 0 deletions Chirper/View Controllers/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import Cocoa
import Alamofire

class ViewController: NSViewController, NSTextViewDelegate {
let tweet = 280

Expand Down

0 comments on commit c965631

Please sign in to comment.