kfix / macpin Goto Github PK
View Code? Open in Web Editor NEWa webapp container & site specific browser made from WebKit.swift and JavaScriptCore
License: GNU General Public License v3.0
a webapp container & site specific browser made from WebKit.swift and JavaScriptCore
License: GNU General Public License v3.0
MacPin doesn't really do it for me anymore.
Safari 9 added Pinned Tabs, so its not the only provider of pinned pages on OSX anymore.
There also a story to be told for iOS.. potentially bridging native functions & advanced data acquisition to sites.
I want the new name to suggest the App-yness that the tool creates from not much more than a website.
And bonus, differentiating from fully-programmable toolboxes like Electron.
"SiteShim" is my only idea at the moment...
Tagline:
Turn a website into a single-window App, configured with Javascript.
you can pick file destinations but you cant focus the filename and type changes to it
Looks like the version on Async included in MacPin doesn't build with Xcode / Swift 3.0:
$ make sites/Digg
[eXcode.mk] $(platform) := OSX
[eXcode.mk] $(arch) := x86_64
[eXcode.mk] $(sdk) := macosx
[eXcode.mk] $(target) := apple-macosx10.11
[eXcode.mk] $(build_mods) (compilable modules): Async MacPin Prompt SSKeychain UTIKit WebKitPrivates XMLHTTPRequest
[eXcode.mk] $(execs) (executables available to assemble): build/macosx-x86_64-apple-macosx10.11/exec/MacPin
[eXcode.mk] $(statics) (static libraries available to build): build/macosx-x86_64-apple-macosx10.11/obj/libAsync.a build/macosx-x86_64-apple-macosx10.11/obj/libPrompt.a build/macosx-x86_64-apple-macosx10.11/obj/libSSKeychain.a build/macosx-x86_64-apple-macosx10.11/obj/libUTIKit.a build/macosx-x86_64-apple-macosx10.11/obj/libWebKitPrivates.a build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest.a
[eXcode.mk] $(dynamics) (dynamic libraries available to build): build/macosx-x86_64-apple-macosx10.11/Frameworks/libAsync.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libPrompt.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libSSKeychain.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libUTIKit.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libWebKitPrivates.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libXMLHTTPRequest.dylib
[eXcode.mk] compiling against /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
[eXcode.mk] swift libraries: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx
Buildable MacPin apps:
build/macosx-x86_64-apple-macosx10.11/apps/CloudPebble.app
build/macosx-x86_64-apple-macosx10.11/apps/DevDocs.app
build/macosx-x86_64-apple-macosx10.11/apps/Digg.app
build/macosx-x86_64-apple-macosx10.11/apps/Facebook.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Drive.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Maps.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Photos.app
build/macosx-x86_64-apple-macosx10.11/apps/Hangouts.app
build/macosx-x86_64-apple-macosx10.11/apps/Inbox.app
build/macosx-x86_64-apple-macosx10.11/apps/MacPin.app
build/macosx-x86_64-apple-macosx10.11/apps/Messenger.app
build/macosx-x86_64-apple-macosx10.11/apps/Slack.app
build/macosx-x86_64-apple-macosx10.11/apps/Stack_Overflow.app
build/macosx-x86_64-apple-macosx10.11/apps/Trello.app
build/macosx-x86_64-apple-macosx10.11/apps/Vine.app
build/macosx-x86_64-apple-macosx10.11/apps/WhatsApp.app
make: Circular build/macosx-x86_64-apple-macosx10.11/apps/Digg.app <- sites/Digg dependency dropped.
install -d build/macosx-x86_64-apple-macosx10.11/obj
install -d build/macosx-x86_64-apple-macosx10.11/exec
install -d build/macosx-x86_64-apple-macosx10.11/Frameworks
install -d build/macosx-x86_64-apple-macosx10.11/SwiftSupport
xcrun -sdk macosx swiftc -target x86_64-apple-macosx10.11 -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks -F build/macosx-x86_64-apple-macosx10.11/Frameworks -I modules -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks -I build/macosx-x86_64-apple-macosx10.11 -L build/macosx-x86_64-apple-macosx10.11/Frameworks -L build/macosx-x86_64-apple-macosx10.11/obj \
-whole-module-optimization \
-module-name Async -emit-module-path build/macosx-x86_64-apple-macosx10.11/Async.swiftmodule \
-emit-dependencies \
-emit-object -o build/macosx-x86_64-apple-macosx10.11/obj/Async.o \
modules/Async/Async.swift modules/Async/OSX/null.swift
modules/Async/Async.swift:196:29: warning: extraneous duplicate parameter name; 'after' already has an argument label
public static func main(after after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:211:40: warning: extraneous duplicate parameter name; 'after' already has an argument label
public static func userInteractive(after after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:226:38: warning: extraneous duplicate parameter name; 'after' already has an argument label
public static func userInitiated(after after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:241:32: warning: extraneous duplicate parameter name; 'after' already has an argument label
public static func utility(after after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:256:35: warning: extraneous duplicate parameter name; 'after' already has an argument label
public static func background(after after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:361:22: warning: extraneous duplicate parameter name; 'after' already has an argument label
public func main(after after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:376:33: warning: extraneous duplicate parameter name; 'after' already has an argument label
public func userInteractive(after after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:391:31: warning: extraneous duplicate parameter name; 'after' already has an argument label
public func userInitiated(after after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:406:25: warning: extraneous duplicate parameter name; 'after' already has an argument label
public func utility(after after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:421:28: warning: extraneous duplicate parameter name; 'after' already has an argument label
public func background(after after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~
modules/Async/Async.swift:475:22: warning: extraneous duplicate parameter name; 'seconds' already has an argument label
public func wait(seconds seconds: Double = 0.0) {
^~~~~~~~
modules/Async/Async.swift:52:32: error: 'dispatch_queue_t' is unavailable in Swift
static func mainQueue() -> dispatch_queue_t {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:65:43: error: 'dispatch_queue_t' is unavailable in Swift
static func userInteractiveQueue() -> dispatch_queue_t {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:77:41: error: 'dispatch_queue_t' is unavailable in Swift
static func userInitiatedQueue() -> dispatch_queue_t {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:89:35: error: 'dispatch_queue_t' is unavailable in Swift
static func utilityQueue() -> dispatch_queue_t {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:101:38: error: 'dispatch_queue_t' is unavailable in Swift
static func backgroundQueue() -> dispatch_queue_t {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:173:24: error: 'dispatch_block_t' is unavailable in Swift
private let block: dispatch_block_t
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:271:43: error: 'dispatch_queue_t' is unavailable in Swift
public static func customQueue(queue: dispatch_queue_t, after: Double? = nil, block: dispatch_block_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:288:101: error: 'dispatch_queue_t' is unavailable in Swift
private static func async(seconds: Double? = nil, block chainingBlock: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:304:66: error: 'dispatch_queue_t' is unavailable in Swift
private static func asyncNow(block: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:324:85: error: 'dispatch_queue_t' is unavailable in Swift
private static func asyncAfter(seconds: Double, block: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:340:83: error: 'dispatch_queue_t' is unavailable in Swift
private static func at(time: dispatch_time_t, block: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:436:36: error: 'dispatch_queue_t' is unavailable in Swift
public func customQueue(queue: dispatch_queue_t, after: Double? = nil, chainingBlock: dispatch_block_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:497:94: error: 'dispatch_queue_t' is unavailable in Swift
private func chain(seconds: Double? = nil, block chainingBlock: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:515:73: error: 'dispatch_queue_t' is unavailable in Swift
private func chainNow(block chainingBlock: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:533:92: error: 'dispatch_queue_t' is unavailable in Swift
private func chainAfter(seconds: Double, block chainingBlock: dispatch_block_t, queue: dispatch_queue_t) -> Async {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:584:64: error: single argument function types require parentheses
public static func userInteractive(iterations: Int, block: Int -> ()) {
^~~
( )
modules/Async/Async.swift:595:62: error: single argument function types require parentheses
public static func userInitiated(iterations: Int, block: Int -> ()) {
^~~
( )
modules/Async/Async.swift:606:56: error: single argument function types require parentheses
public static func utility(iterations: Int, block: Int -> ()) {
^~~
( )
modules/Async/Async.swift:617:59: error: single argument function types require parentheses
public static func background(iterations: Int, block: Int -> ()) {
^~~
( )
modules/Async/Async.swift:628:60: error: 'dispatch_queue_t' is unavailable in Swift
public static func customQueue(iterations: Int, queue: dispatch_queue_t, block: Int -> ()) {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:628:85: error: single argument function types require parentheses
public static func customQueue(iterations: Int, queue: dispatch_queue_t, block: Int -> ()) {
^~~
( )
modules/Async/Async.swift:307:44: error: use of unresolved identifier 'DISPATCH_BLOCK_INHERIT_QOS_CLASS'
let _block = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, block)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dispatch.__DISPATCH_BLOCK_INHERIT_QOS_CLASS:3:12: note: did you mean '__DISPATCH_BLOCK_INHERIT_QOS_CLASS'?
public var __DISPATCH_BLOCK_INHERIT_QOS_CLASS: __dispatch_block_flags_t { get }
^
modules/Async/Async.swift:326:34: error: cannot convert value of type 'Int' to expected argument type 'dispatch_time_t' (aka 'UInt64')
let time = dispatch_time(DISPATCH_TIME_NOW, nanoSeconds)
^~~~~~~~~~~~~~~~~
dispatch_time_t( )
modules/Async/Async.swift:342:44: error: use of unresolved identifier 'DISPATCH_BLOCK_INHERIT_QOS_CLASS'
let _block = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, block)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dispatch.__DISPATCH_BLOCK_INHERIT_QOS_CLASS:3:12: note: did you mean '__DISPATCH_BLOCK_INHERIT_QOS_CLASS'?
public var __DISPATCH_BLOCK_INHERIT_QOS_CLASS: __dispatch_block_flags_t { get }
^
modules/Async/Async.swift:478:38: error: cannot convert value of type 'Int' to expected argument type 'dispatch_time_t' (aka 'UInt64')
let time = dispatch_time(DISPATCH_TIME_NOW, nanoSeconds)
^~~~~~~~~~~~~~~~~
dispatch_time_t( )
modules/Async/Async.swift:517:52: error: use of unresolved identifier 'DISPATCH_BLOCK_INHERIT_QOS_CLASS'
let _chainingBlock = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, chainingBlock)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dispatch.__DISPATCH_BLOCK_INHERIT_QOS_CLASS:3:12: note: did you mean '__DISPATCH_BLOCK_INHERIT_QOS_CLASS'?
public var __DISPATCH_BLOCK_INHERIT_QOS_CLASS: __dispatch_block_flags_t { get }
^
modules/Async/Async.swift:536:52: error: use of unresolved identifier 'DISPATCH_BLOCK_INHERIT_QOS_CLASS'
let _chainingBlock = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, chainingBlock)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dispatch.__DISPATCH_BLOCK_INHERIT_QOS_CLASS:3:12: note: did you mean '__DISPATCH_BLOCK_INHERIT_QOS_CLASS'?
public var __DISPATCH_BLOCK_INHERIT_QOS_CLASS: __dispatch_block_flags_t { get }
^
modules/Async/Async.swift:539:35: error: 'dispatch_block_t' is unavailable in Swift
let chainingWrapperBlock: dispatch_block_t = {
^~~~~~~~~~~~~~~~
modules/Async/Async.swift:547:59: error: use of unresolved identifier 'DISPATCH_BLOCK_INHERIT_QOS_CLASS'
let _chainingWrapperBlock = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, chainingWrapperBlock)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dispatch.__DISPATCH_BLOCK_INHERIT_QOS_CLASS:3:12: note: did you mean '__DISPATCH_BLOCK_INHERIT_QOS_CLASS'?
public var __DISPATCH_BLOCK_INHERIT_QOS_CLASS: __dispatch_block_flags_t { get }
^
make: *** [build/macosx-x86_64-apple-macosx10.11/obj/Async.o] Error 1
Hi. I am a graphic designer. I volunteer to design a logo for open source projects. I can design it for you to use it in the readme file. What dou you say?
Shipping services on OSX is very clunky, I'd much rather build a generic NSExtension for each app that can accept any URL when selected via "Share" menus all over the system.
This will not be helpful for clipping text (like bare phone numbers and street addresses) but Safari already does some auto detection of those to make tel: and maps: urls so that's fine.
Is it possible to create an 'app', that launches with two or more tabs? ie: facebook and messenger? I looked through the examples but couldn't find an example of that.
Automator is going away, and I don't use these workflows any more
Tried doing a make reinstall
as suggested in a different issue, but it gets stuck with the same error as the one in Hangouts below. The previous apps in the list build fine. Messenger doesn't build either, with some weird write error. I checked the permissions in the folder and they're fine. Slack also builds fine, which is the other one I was interested in. Do you have any idea for how to fix this?
I'm running 10.12.3 and got latest XCode and STP.
Oh, and any chances for a new release?
Xcode is huge, almost 12GB downloaded and needs 40GB to extract (really 50Gb if your XCode.xip is on the same filesystem you're installing to)
now that swiftlibs are in the base macOS, should investigate whether the plain "Command Line Tools" package is enough to build MacPin. I think building with CLT used to work but can't remember when/if/why it stopped.
CDT won't have the iOS Simulator to test the mobile builds (or even its SDKs??), but that port is just a toy at this point.
output:
Hello, I'm using osx 10.9.5, I downloaded your latest release but it seems is not compatible with maverick.
I just need hangouts and whatsapp, where can I find a download link for previous versions of this two apps?
I'm using macpin latest release in another mac with El Capitan and I'm very happy with everything, I would love to use this in Maverick too.
Can someone help me please?
Thanks!
ps: I'm not a programmer, I don't know anything about code, I found a few months ago MacPin and I was using the included apps. I need these apps for maverick please.
create an NSProgress for the download task and notify com.apple.DownloadFileFinished
https://chromium.googlesource.com/chromium/src.git/+/master/chrome/browser/download/download_status_updater_mac.mm
set the Quarantine xattrs too: https://codereview.chromium.org/220037/patch/6001/7001
write an Applescript that can package a basic MacPin app from MacPin.app's Resources, Icon png, and start URL. Make it launchable as a menu option in MacPin itself and able to publish derivative of current app.
Most of the API surface I want to use & support is now exposed, but its a bit clunky.
delegate
:
$
is also vague and intones jQuery.
MacPin
singleton?
Downloaded the MacPin.zip
for 1.3.0
from the Releases page.
Unzipped and right-clicked menu-opened Vine.app. App launched, but no windows opened.
From Console.app:
4/23/15 5:21:43.924 PM taskgated[100]: no application identifier provided, can't use provisioning profiles [pid=41137]
4/23/15 5:21:49.000 PM kernel[0]: Sandbox: Vine(41137) System Policy: deny file-write-unlink /Users/XXXXX/Library/Saved Application State/com.github.kfix.MacPin.Vine.savedState/restorecount.plist
Just FYI.
The app looks really cool. I'm going to try the makefile and play around with it. ๐
Not sure if this is an OS compatibility issue. Thoughts? Is there support for Sierra? If there is, any other ideas what might be going on?
Hey, great project.
Should shortcuts be working?
Also, header shows up as black which looks sort of weird.
Not a Mac dev myself or I'd put in a PR, but thought I'd at least bring to your attn.
If you could update for big sur that'd be great! Also an option for Xcode build projects were also be good.
http://ankit.im/swift/2016/05/21/creating-objc-cpp-packages-with-swift-package-manager/
https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md
https://github.com/apple/swift-package-manager/blob/master/Documentation/Package.swift.md
https://github.com/apple/swift-package-manager/blob/master/Documentation/DevelopingPackages.md
https://swift.org/package-manager/#example-usage
I tried opening the built in Trello and Google Drive apps:
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MacPin.MPWebView _drawsTransparentBackground]: unrecognized selector sent to instance 0x7f8857528520'
abort() called
terminating with uncaught exception of type NSException
the multi-chat Franz app has "recipes", very similar to MacPin sites: https://github.com/meetfranz/recipe-slack/blob/master/webview.js
https://github.com/meetfranz/plugins/blob/master/docs/integration.md
They have pulled off multi-repo sites, so maybe I could do the same?
Or just move sites/ to a submodule....
Or try to support the W3C WebExtensions API?
JXA stuff barely works anymore and using Image Events to write files requests system privileges to be authorized by the user with a modal UI prompt.....
The URL that's linked from the front page is not found.
is XMLHttpRequest supposed to be compiled as non-ARC source?
Build output:
user@host /S/U/i/d/s/p/MacPin> make allapps 2 master
[eXcode.mk] $(platform) := OSX
[eXcode.mk] $(arch) := x86_64
[eXcode.mk] $(sdk) := macosx
[eXcode.mk] $(target) := apple-macosx10.11
[eXcode.mk] $(build_mods) (compilable modules): Async MacPin Prompt SSKeychain UTIKit XMLHTTPRequest
[eXcode.mk] $(execs) (executables available to assemble): build/macosx-x86_64-apple-macosx10.11/exec/MacPin
[eXcode.mk] $(statics) (static libraries available to build): build/macosx-x86_64-apple-macosx10.11/obj/libAsync.a build/macosx-x86_64-apple-macosx10.11/obj/libPrompt.a build/macosx-x86_64-apple-macosx10.11/obj/libSSKeychain.a build/macosx-x86_64-apple-macosx10.11/obj/libUTIKit.a build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest.a
[eXcode.mk] $(dynamics) (dynamic libraries available to build): build/macosx-x86_64-apple-macosx10.11/Frameworks/libAsync.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libPrompt.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libSSKeychain.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libUTIKit.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libXMLHTTPRequest.dylib
[eXcode.mk] compiling against /Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
[eXcode.mk] swift libraries: /Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx
Buildable MacPin apps:
build/macosx-x86_64-apple-macosx10.11/apps/CloudPebble.app
build/macosx-x86_64-apple-macosx10.11/apps/DevDocs.app
build/macosx-x86_64-apple-macosx10.11/apps/Digg.app
build/macosx-x86_64-apple-macosx10.11/apps/Facebook.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Drive.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Maps.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Photos.app
build/macosx-x86_64-apple-macosx10.11/apps/Hangouts.app
build/macosx-x86_64-apple-macosx10.11/apps/Inbox.app
build/macosx-x86_64-apple-macosx10.11/apps/MacPin.app
build/macosx-x86_64-apple-macosx10.11/apps/Messenger.app
build/macosx-x86_64-apple-macosx10.11/apps/Slack.app
build/macosx-x86_64-apple-macosx10.11/apps/Stack_Overflow.app
build/macosx-x86_64-apple-macosx10.11/apps/Trello.app
build/macosx-x86_64-apple-macosx10.11/apps/Vine.app
build/macosx-x86_64-apple-macosx10.11/apps/WhatsApp.app
make: Circular sites/CloudPebble <- build/macosx-x86_64-apple-macosx10.11/apps/CloudPebble.app dependency dropped.
mkdir build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest; cd build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest; for i in /Shared/Users/user/dev/src/public/MacPin/modules/XMLHTTPRequest/XMLHTTPRequest.m; do \
xcrun -sdk macosx clang -fmodules -target x86_64-apple-macosx10.11 -mmacosx-version-min=10.11 -ObjC -c -F /Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -L /Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -F build/macosx-x86_64-apple-macosx10.11/Frameworks -I modules -I build/macosx-x86_64-apple-macosx10.11 -L build/macosx-x86_64-apple-macosx10.11/Frameworks -L build/macosx-x86_64-apple-macosx10.11/obj $i; \
done;
mkdir: build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest: File exists
clang: warning: argument unused during compilation: '-L/Shared/Users/user/dev/tools/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks'
clang: warning: argument unused during compilation: '-Lbuild/macosx-x86_64-apple-macosx10.11/Frameworks'
clang: warning: argument unused during compilation: '-Lbuild/macosx-x86_64-apple-macosx10.11/obj'
/Shared/Users/user/dev/src/public/MacPin/modules/XMLHTTPRequest/XMLHTTPRequest.m:77:13: error: cannot create __weak reference in
file using manual reference counting
__block __weak XMLHttpRequest *weakSelf = self;
^
1 error generated.
make: *** [build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest.a] Error 1
user@host /S/U/i/d/s/p/MacPin> 2 master
Is is possible to skip the Download dialog and directly download files to a default location?
Running make install
on macOS Catalina (10.15.6) returns the following errors.
modules/MacPin/WebView.swift:1307:27: error: 'rects(forCharacterRange:)' is only available in macOS 10.15 or newer
guard let frects = self.rects(forCharacterRange: range),
$ make install
[eXcode.mk]
modules/ => MacPin Prompt UTIKit
macos sdk:
=> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
swiftlibs:
=> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx
=>
swiftc:
=> Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53) Target: x86_64-apple-macosx10.13
[Makefile]
sites/* => build/macosx-x86_64-apple-macosx10.13/apps => ~/Applications/MacPin.localized/*.app
Jumbo-execs: build/macosx-x86_64-apple-macosx10.13/lexec/MacPin
Jumbo-deps: build/macosx-x86_64-apple-macosx10.13/obj/libPrompt.a build/macosx-x86_64-apple-macosx10.13/obj/libUTIKit.a
Jumbo-lib: build/macosx-x86_64-apple-macosx10.13/Frameworks/MacPin.framework
/Applications/Safari.app => 13.1.2
/System/Library/Frameworks/WebKit.framework => 15609.3.5.1.3
make: Circular sites/DevDocs <- build/macosx-x86_64-apple-macosx10.13/apps/DevDocs.app dependency dropped.
Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
Target: x86_64-apple-macosx10.13
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c modules/MacPin/App.swift modules/MacPin/AppDelegate.swift modules/MacPin/AppScriptRuntime.swift modules/MacPin/BrowserViewController.swift modules/MacPin/CocoaShims.swift modules/MacPin/FavIcon.swift modules/MacPin/Generics.swift modules/MacPin/Geolocator.swift modules/MacPin/Prompter.swift modules/MacPin/Retriever.swift modules/MacPin/TabFlowController.swift modules/MacPin/WebNotifier.swift modules/MacPin/WebView.swift modules/MacPin/WebViewCallbacks.swift modules/MacPin/WebViewController.swift modules/MacPin/WebViewDelegates.swift modules/MacPin/_macos/AppDelegateOSX.swift modules/MacPin/_macos/BrowserViewControllerOSX.swift modules/MacPin/_macos/EffectViewController.swift modules/MacPin/_macos/FoundationExts.swift modules/MacPin/_macos/OmniBoxController.swift modules/MacPin/_macos/Services.swift modules/MacPin/_macos/StatusBarController.swift modules/MacPin/_macos/WebViewControllerOSX.swift modules/MacPin/_macos/WebViewDelegatesOSX.swift modules/MacPin/_macos/WindowController.swift -supplementary-output-file-map /var/folders/9g/g6tf7dm93ln55szbqsvty2j00000gs/T/supplementaryOutputs-c0b761 -target x86_64-apple-macosx10.13 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -color-diagnostics -I modules -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -I build/macosx-x86_64-apple-macosx10.13 -F build/macosx-x86_64-apple-macosx10.13/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks -suppress-warnings -swift-version 5 -color-diagnostics -Xcc -Wno-unreachable-code -parse-as-library -module-name MacPin -o /var/folders/9g/g6tf7dm93ln55szbqsvty2j00000gs/T/MacPin-c28baf.o
modules/MacPin/WebView.swift:1307:27: error: 'rects(forCharacterRange:)' is only available in macOS 10.15 or newer
guard let frects = self.rects(forCharacterRange: range),
^
modules/MacPin/WebView.swift:1307:27: note: add 'if #available' version check
guard let frects = self.rects(forCharacterRange: range),
^
modules/MacPin/WebView.swift:1304:22: note: add @available attribute to enclosing instance method
@objc override func scrollRangeToVisible(_ range: NSRange) {
^
modules/MacPin/WebView.swift:1285:1: note: add @available attribute to enclosing extension
extension MPWebView { // NSTextFinderClient
^
modules/MacPin/WebView.swift:1312:9: error: 'scrollRangeToVisible' is only available in macOS 10.15 or newer
super.scrollRangeToVisible(range)
^
modules/MacPin/WebView.swift:1312:9: note: add 'if #available' version check
super.scrollRangeToVisible(range)
^
modules/MacPin/WebView.swift:1304:22: note: add @available attribute to enclosing instance method
@objc override func scrollRangeToVisible(_ range: NSRange) {
^
modules/MacPin/WebView.swift:1285:1: note: add @available attribute to enclosing extension
extension MPWebView { // NSTextFinderClient
^
make: *** [build/macosx-x86_64-apple-macosx10.13/obj/libMacPin.dylib] Error 1
You will get some error if you try to compile using Swift 2.0. As I am not a Swift programmer I cannot help. :(
modules/Async/Async.swift:208:18: error: '#' has been removed from Swift; double up 'after after' to make the argument label the same as the parameter name
func background(#after: Double, block: dispatch_block_t) -> Async {
^
after
modules/Async/Async.swift:295:24: error: redundant conformance of 'qos_class_t' to protocol 'Equatable'
extension qos_class_t: Equatable {}
^
Darwin.qos_class_t:1:15: note: 'qos_class_t' declares conformance to protocol 'Equatable' here
public struct qos_class_t : RawRepresentable, Equatable {
^
modules/Async/Async.swift:291:12: error: value of type 'qos_class_t' has no member 'value'
return lhs.value ~= rhs.value
MacPin doesn't seem to support retina displays. At least, the apps in release v1.3.0b1 are all fuzzy on my retina macbook pro.
I'm trying to work my way through building a perfect 'franz' style app in macpin.
So far, I've got Gmail, Gcal and Slack setup, and the app reliably loads all three sites and they function 99% perfectly fine.
That last 1% though, is driving me nuts. Whenever the app starts, all 3 tabs show their respective webapp's request to display desktop notifications.
However, no notifications are ever displayed, and the app doesn't 'remember' the notification settings after a restart.
Below is what I've hacked together.
/*
* eslint-env applescript
* eslint-env builtins
* eslint-env es6
* eslint eqeqeq:0, quotes:0, space-infix-ops:0, curly:0
*/
"use strict";
const {app, BrowserWindow, WebView} = require('@MacPin');
let injectTab = require('app_injectTab.js');
let enDarken = require('enDarken.js');
let slackTab = {
url: 'https://app.slack.com/client/T0FSN3Z16/D19MH3CQ2/thread/C2K8LNETG-1574707732.133300',
authorizedOriginsForNotifications: [
'https://app.slack.com',
'https://app.slack.com:443'
],
style: ['autodark']
}
let sfCalendarTab = {
url: 'https://calendar.google.com/calendar/r/customday?pli=1',
authorizedOriginsForNotifications: [
'https://notifications.google.com',
'https://notifications.google.com:443'
],
}
let sfMailTab = {
url: 'https://mail.google.com/mail/u/0/#inbox',
authorizedOriginsForNotifications: [
'https://notifications.google.com',
'https://notifications.google.com:443'
]
}
var SFCalendar = new WebView(sfCalendarTab);
var SFMail = new WebView(sfMailTab);
var SFSlack = new WebView(slackTab);
let browser = new BrowserWindow();
app.on("postedDesktopNotification", (note, tab) => {
console.log(Date() + `[${tab.url}] posted HTML5 desktop notification: ${note.id}`);
console.log(JSON.stringify(note));
return false
});
app.on('handleClickedNotification', (note) => {
console.log("App signals a clicked notification: "+ JSON.stringify(note));
return false;
});
app.on('didWindowOpenForURL', function(url, newTab, tab) {
if (url.length > 0 && newTab)
console.log(`window.open(${url})`);
return false; // macpin will popup(newTab, url) and return newTab to tab's JS
});
let openInChrome = function(tab) {
console.log(`app.js: opening (${tab.url}) in chrome`);
switch (app.platform) {
case "OSX":
app.openURL(tab.url, "com.google.Chrome");
break;
case "iOS":
app.openURL(tab.url,
tab.url.startsWith("https://") ? "googlechromes" : "googlechrome");
break;
}
};
// handles cmd-line and LaunchServices openURL()s
app.on('launchURL', (url) => {
console.log("app.js: launching " + url);
var comps = url.split(':'),
scheme = comps.shift(),
addr = comps.shift();
switch (scheme + ':') {
default:
browser.tabSelected = new WebView({url: url}); //FIXME: retains???!
}
});
// app.on('launchURL', (url) => new $.WebView({url: url}));
app.on('networkIsOffline', (url, tab) => {
console.log(`Could not navigate to ${url} - network is offline!`);
});
let setAgent = function(agent, tab) { tab.userAgent = agent; };
let getAgent = function(tab) { tab.evalJS(`window.alert(navigator.userAgent);`); };
app.on('AppWillFinishLaunching', (AppUI) => {
//browser.unhideApp();
browser.addShortcut('DarkMode', [], enDarken);
// http://user-agents.me
browser.addShortcut('Show current User-Agent', [], getAgent);
if (app.doesAppExist("com.google.Chrome")) browser.addShortcut('Open in Chrome', [], openInChrome);
//browser.addShortcut('HTML5 editor -> preview', editorPreview);
//editorPreview should find editor tab (passed by ref?) and render its source
// WebView.init ends up with WebViewInitProps.handlers: <__NSFrozenDictionaryM>
if (app.platform === "OSX") app.changeAppIcon('icon.png');
//browser.tabSelected = new $.WebView({url: 'http://github.com/kfix/MacPin'});
AppUI.browserController = browser; // make sure main app menu can get at our shortcuts
console.log(app.browserController);
// shuffle the _tabs using the tabs Proxy
browser.tabs.push(SFMail);
browser.tabs.push(SFCalendar);
browser.tabs.push(SFSlack);
});
app.on('AppFinishedLaunching', (launchURLs) => {
console.log(launchURLs);
});
app.on('AppShouldTerminate', (app) => {
console.log("main.js shutting down!");
docTab = null;
gitTab = null;
});
// https://www.lucidchart.com/techblog/2018/02/14/javascriptcore-the-holy-grail-of-cross-platform/
//app.loadAppScript('fetchDeps.js`);
//let fetchURL = require('fetchURL');
Following the instructions from the readme, make MySite.app
fails.
$ mkdir sites/MySite
$ cp sites/MacPin/app.js sites/MySite/
$ cp sites/MacPin/icon.png sites/MySite/
$ make MySite.app
[eXcode.mk] $(platform) := OSX
[eXcode.mk] $(arch) := x86_64
[eXcode.mk] $(sdk) := macosx
[eXcode.mk] $(target) := apple-macosx10.11
[eXcode.mk] $(build_mods) (compilable modules): Async MacPin Prompt SSKeychain UTIKit XMLHTTPRequest
[eXcode.mk] $(execs) (executables available to assemble): build/macosx-x86_64-apple-macosx10.11/exec/MacPin
[eXcode.mk] $(statics) (static libraries available to build): build/macosx-x86_64-apple-macosx10.11/obj/libAsync.a build/macosx-x86_64-apple-macosx10.11/obj/libPrompt.a build/macosx-x86_64-apple-macosx10.11/obj/libSSKeychain.a build/macosx-x86_64-apple-macosx10.11/obj/libUTIKit.a build/macosx-x86_64-apple-macosx10.11/obj/libXMLHTTPRequest.a
[eXcode.mk] $(dynamics) (dynamic libraries available to build): build/macosx-x86_64-apple-macosx10.11/Frameworks/libAsync.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libPrompt.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libSSKeychain.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libUTIKit.dylib build/macosx-x86_64-apple-macosx10.11/Frameworks/libXMLHTTPRequest.dylib
[eXcode.mk] compiling against /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
[eXcode.mk] swift libraries: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx
Buildable MacPin apps:
build/macosx-x86_64-apple-macosx10.11/apps/CloudPebble.app
build/macosx-x86_64-apple-macosx10.11/apps/DevDocs.app
build/macosx-x86_64-apple-macosx10.11/apps/Digg.app
build/macosx-x86_64-apple-macosx10.11/apps/Facebook.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Drive.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Maps.app
build/macosx-x86_64-apple-macosx10.11/apps/Google_Photos.app
build/macosx-x86_64-apple-macosx10.11/apps/Hangouts.app
build/macosx-x86_64-apple-macosx10.11/apps/Inbox.app
build/macosx-x86_64-apple-macosx10.11/apps/MacPin.app
build/macosx-x86_64-apple-macosx10.11/apps/Messenger.app
build/macosx-x86_64-apple-macosx10.11/apps/MySite.app
build/macosx-x86_64-apple-macosx10.11/apps/Slack.app
build/macosx-x86_64-apple-macosx10.11/apps/Stack_Overflow.app
build/macosx-x86_64-apple-macosx10.11/apps/Trello.app
build/macosx-x86_64-apple-macosx10.11/apps/Vine.app
build/macosx-x86_64-apple-macosx10.11/apps/WhatsApp.app
make: *** No rule to make target `MySite.app'. Stop.
Using make allapps
works as a workaround, but takes much longer than a single app of course.
build some VPN support in for doing ad-hoc redirection/filtering of specific hosts' WebView requests and/or their DNS resolutions
https://github.com/lshuzhi/SimpleTunnelMacos
https://github.com/liruqi/Mume-iOS
https://developer.apple.com/reference/networkextension/netunnelprovidermanager
Chrome does this with --host-rules=MAP <src-pattern> <host:port>, EXCLUDE <pattern>
https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md#--host-rulesrules
upstream changes: WebKit/WebKit@551a9e2
log of NSLayout when inspector docked to bottom of floating browser window
<build/macosx-x86_64-apple-macosx10.11/apps/MacPin.app/Contents/MacOS/MacPin> modules/MacPin/AppScriptRuntime.swift[REPL()]:> 2015-12-31 15:40:40.971 MacPin[22268:266644] Clicked on overlapping visualized constraints: (
"<NSAutoresizingMaskLayoutConstraint:0x7f8ebc02b2a0 h=-&- v=--& V:[WKWebInspectorWKWebView:0x7f8ebc120420(300)]> (Actual Distance - pixels):600",
"<NSAutoresizingMaskLayoutConstraint:0x7f8ebc14d8e0 h=--& v=--& V:[WKView:0x7f8eba562020(784)]> (Actual Distance - pixels):1568",
"<NSAutoresizingMaskLayoutConstraint:0x7f8ebc09a5f0 h=-&- v=--& H:|-(0)-[WKWebInspectorWKWebView:0x7f8ebc120420] (Names: '|':MacPin.MPWebView:0x7f8eba540d50'kfix/MacPin \U00b7 GitHub' )> (Actual Distance - pixels):0",
"<NSAutoresizingMaskLayoutConstraint:0x7f8ebc14dae0 h=--& v=--& H:|-(0)-[WKView:0x7f8eba562020] (Names: '|':MacPin.MPWebView:0x7f8eba540d50'kfix/MacPin \U00b7 GitHub' )> (Actual Distance - pixels):0"
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.