├── .github └── FUNDING.yml ├── .gitignore ├── .travis.yml ├── Classes ├── Capture │ ├── AddNoteViewController.swift │ └── NoteListViewController.swift ├── DataModel │ ├── FileChecksum.h │ ├── FileChecksum.m │ ├── LocalEditAction.h │ ├── LocalEditAction.m │ ├── Node.h │ ├── Node.m │ ├── Note.h │ └── Note.m ├── Extensions │ └── String+RegexSplitter.swift ├── MobileOrgAppDelegate.h ├── MobileOrgAppDelegate.m ├── Outline │ ├── ActionMenuController.h │ ├── ActionMenuController.m │ ├── Cells │ │ └── OutlineCell.swift │ ├── DetailsViewController.h │ ├── DetailsViewController.m │ ├── NodeTextEditController.h │ ├── NodeTextEditController.m │ ├── OutlineTableView.h │ ├── OutlineTableView.m │ ├── OutlineViewController.h │ ├── OutlineViewController.m │ ├── PreviewViewController.swift │ ├── PriorityEditController.h │ ├── PriorityEditController.m │ ├── TagEditController.h │ ├── TagEditController.m │ ├── TodoStateEditController.h │ └── TodoStateEditController.m ├── Parsing │ ├── ChecksumFileParser.h │ ├── ChecksumFileParser.m │ ├── EditEntity.h │ ├── EditEntity.m │ ├── EditsFileParser.h │ ├── EditsFileParser.m │ ├── OrgFileParser.h │ └── OrgFileParser.m ├── PersistenceStack.swift ├── Search │ ├── SearchController.h │ └── SearchController.m ├── Settings │ ├── OutlineState.h │ ├── OutlineState.m │ ├── SessionManager.h │ ├── SessionManager.m │ ├── Settings.h │ ├── Settings.m │ ├── Settings.storyboard │ ├── SettingsController.swift │ ├── SyncSettingsController.swift │ └── TextInputCell.swift ├── Status │ ├── StatusViewController.h │ └── StatusViewController.m ├── Sync │ ├── CloudTransferManager.swift │ ├── Dropbox │ │ └── DropboxTransferManager.swift │ ├── SyncManager.h │ ├── SyncManager.m │ ├── TransferContext.h │ ├── TransferContext.m │ ├── TransferManager.h │ ├── TransferManager.m │ ├── TransferManagerDelegate.h │ ├── WebDav │ │ ├── WebDavTransferManager.h │ │ └── WebDavTransferManager.m │ └── WebDavTransferManager.swift ├── ThirdParty │ └── Reachability │ │ ├── Reachability.h │ │ └── Reachability.m └── Utilities │ ├── DataUtils.h │ ├── DataUtils.m │ ├── GlobalUtils.h │ ├── GlobalUtils.m │ ├── RoundedLabel.swift │ ├── StatusUtils.h │ ├── StatusUtils.m │ ├── String+Attributes.swift │ ├── UIAlertController+MobileOrg.swift │ └── UIColor+MobileOrg.swift ├── Configuration ├── AppKey.plist ├── MobileOrg-AdHoc.xcconfig ├── MobileOrg-AppStore.xcconfig ├── MobileOrg-Debug.xcconfig ├── MobileOrg-Shared.xcconfig ├── MobileOrgTests-AdHoc.xcconfig ├── MobileOrgTests-AppStore.xcconfig ├── MobileOrgTests-Debug.xcconfig └── MobileOrgTests-Shared.xcconfig ├── Default-568h@2x.png ├── Entitlements.plist ├── Global.shared.xcconfig ├── LICENSE.txt ├── Launch Screen.storyboard ├── MainWindow.xib ├── MobileOrg-Bridging-Header.h ├── MobileOrg-Info.plist ├── MobileOrg.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── MobileOrg.xccheckout │ │ └── swiftpm │ │ └── Package.resolved └── xcshareddata │ └── xcschemes │ ├── All Tests.xcscheme │ └── MobileOrg.xcscheme ├── MobileOrg ├── Images.xcassets │ ├── AppIcon.adhoc.appiconset │ │ ├── Contents.json │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small-60@2x.png │ │ ├── Icon-Small-60@3x.png │ │ └── logo-beta.png │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small-60@2x.png │ │ ├── Icon-Small-60@3x.png │ │ └── logo.png │ ├── AppIcon.debug.appiconset │ │ ├── Contents.json │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small-60@2x.png │ │ ├── Icon-Small-60@3x.png │ │ └── logo-debug.png │ ├── Contents.json │ ├── IOrgIcon.imageset │ │ ├── Contents.json │ │ ├── org-icon.png │ │ ├── org-icon@2x.png │ │ └── org-icon@3x.png │ └── SplashBackground.imageset │ │ ├── Background.png │ │ ├── Background@2x.png │ │ ├── Background@3x.png │ │ └── Contents.json └── MobileOrg.entitlements ├── MobileOrg2.xcdatamodeld ├── .xccurrentversion ├── MobileOrg 2.xcdatamodel │ └── contents └── MobileOrg.xcdatamodel │ ├── elements │ └── layout ├── MobileOrgTests ├── Info.plist ├── MobileOrgTests-Bridging-Header.h ├── NodeTests.m ├── OrgfileParserTests.swift ├── Resources │ ├── MobileOrgTestingSample.org │ ├── TodoList.org │ ├── WebDavTests │ │ ├── certs │ │ │ ├── web.crt │ │ │ └── web.key │ │ ├── content │ │ │ ├── MobileOrgTestingSample.org │ │ │ ├── agendas.org │ │ │ ├── checksums.dat │ │ │ ├── headingskip.org │ │ │ ├── index.org │ │ │ ├── mobileorg.org │ │ │ ├── sample.org │ │ │ └── second.org │ │ └── htpasswd │ ├── defaultTodoWords.org │ ├── headingskip.org │ └── index.org ├── SettingsTest.swift ├── String+RegexTests.swift ├── Sync │ └── iCloud │ │ └── CloudTransferManagerTests.swift └── WebDavTests.swift ├── MobileOrg_Prefix.pch ├── Other ├── Icon.atn ├── Icon.psd ├── Notification Boxes - Tall.psd ├── Notification Boxes.psd ├── Screenshots │ ├── mobileorg-ipad.png │ ├── mobileorg-retina35.png │ ├── mobileorg-retina4.png │ └── org-large-app-icon.png ├── iTunesArtwork-beta.png ├── iTunesArtwork-beta@2x.png ├── iTunesArtwork-debug.png ├── iTunesArtwork-debug@2x.png ├── iTunesArtwork.png ├── iTunesArtwork@2x.png └── org-large-app-icon.png ├── README.org ├── Resources-iPad └── MainWindow-iPad.xib ├── Resources ├── AppIcons │ ├── Icon-72@2x.png │ ├── Icon-76.png │ ├── Icon-76@2x.png │ ├── Icon-Small-50.png │ ├── Icon-Small-50@2x.png │ ├── Icon-Small@2x.png │ ├── Icon-beta-72@2x.png │ ├── Icon-beta-Small-50.png │ ├── Icon-beta-Small-50@2x.png │ ├── Icon-beta-Small.png │ ├── Icon-beta-Small@2x.png │ ├── Icon-debug-72@2x.png │ ├── Icon-debug-Small-50.png │ ├── Icon-debug-Small-50@2x.png │ ├── Icon-debug-Small.png │ ├── Icon-debug-Small@2x.png │ ├── Icon-iPad-Retina@2x.png │ └── Icon@3x.png ├── Css │ └── DocumentView.css ├── Images │ ├── AlertTextField.png │ ├── back.png │ ├── back@2x.png │ ├── cant-sync-offline.png │ ├── cant-sync-offline@2x.png │ ├── capture.png │ ├── capture@2x.png │ ├── children.png │ ├── children@2x.png │ ├── down.png │ ├── down@2x.png │ ├── flag.png │ ├── flag@2x.png │ ├── flagged.png │ ├── flagged@2x.png │ ├── forward.png │ ├── forward@2x.png │ ├── home.png │ ├── home@2x.png │ ├── inbox.png │ ├── inbox@2x.png │ ├── noflag.png │ ├── note_entry.png │ ├── note_entry@2x.png │ ├── outline.png │ ├── outline@2x.png │ ├── please-configure.png │ ├── please-configure@2x.png │ ├── press-sync.png │ ├── press-sync@2x.png │ ├── search.png │ ├── search@2x.png │ ├── settings.png │ ├── settings@2x.png │ ├── table_gray.png │ ├── table_gray@2x.png │ ├── up.png │ └── up@2x.png └── Javascript │ └── DocumentView.js ├── Scripts ├── WebDAV-Server-Start.sh ├── WebDAV-Server-Stop.sh ├── bump_build.sh ├── set_version.sh └── what_version.sh └── main.m /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | liberapay: sme 3 | patreon: mobileorg 4 | custom: https://paypal.me/SeanEscriva 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ######################### 2 | # .gitignore file for Xcode4 / OS X Source projects 3 | # 4 | # NB: if you are storing "built" products, this WILL NOT WORK, 5 | # and you should use a different .gitignore (or none at all) 6 | # This file is for SOURCE projects, where there are many extra 7 | # files that we want to exclude 8 | # 9 | # For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects 10 | ######################### 11 | 12 | ##### 13 | # OS X temporary files that should never be committed 14 | 15 | .DS_Store 16 | *.swp 17 | *.lock 18 | profile 19 | 20 | 21 | #### 22 | # Xcode temporary files that should never be committed 23 | # 24 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this... 25 | 26 | *~.nib 27 | 28 | 29 | #### 30 | # Xcode build files - 31 | # 32 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" 33 | 34 | DerivedData/ 35 | 36 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" 37 | 38 | build/ 39 | 40 | 41 | ##### 42 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) 43 | # 44 | # This is complicated: 45 | # 46 | # SOMETIMES you need to put this file in version control. 47 | # Apple designed it poorly - if you use "custom executables", they are 48 | # saved in this file. 49 | # 99% of projects do NOT use those, so they do NOT want to version control this file. 50 | # ..but if you're in the 1%, comment out the line "*.pbxuser" 51 | 52 | *.pbxuser 53 | *.mode1v3 54 | *.mode2v3 55 | *.perspectivev3 56 | # NB: also, whitelist the default ones, some projects need to use these 57 | !default.pbxuser 58 | !default.mode1v3 59 | !default.mode2v3 60 | !default.perspectivev3 61 | 62 | 63 | #### 64 | # Xcode 4 - semi-personal settings, often included in workspaces 65 | # 66 | # You can safely ignore the xcuserdata files - but do NOT ignore the files next to them 67 | # 68 | 69 | xcuserdata 70 | 71 | #### 72 | # XCode 4 workspaces - more detailed 73 | # 74 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :) 75 | # 76 | # Workspace layout is quite spammy. For reference: 77 | # 78 | # (root)/ 79 | # (project-name).xcodeproj/ 80 | # project.pbxproj 81 | # project.xcworkspace/ 82 | # contents.xcworkspacedata 83 | # xcuserdata/ 84 | # (your name)/xcuserdatad/ 85 | # xcuserdata/ 86 | # (your name)/xcuserdatad/ 87 | # 88 | # 89 | # 90 | # Xcode 4 workspaces - SHARED 91 | # 92 | # This is UNDOCUMENTED (google: "developer.apple.com xcshareddata" - 0 results 93 | # But if you're going to kill personal workspaces, at least keep the shared ones... 94 | # 95 | # 96 | !xcshareddata 97 | 98 | #### 99 | # XCode 4 build-schemes 100 | # 101 | # PRIVATE ones are stored inside xcuserdata 102 | !xcschemes 103 | 104 | #### 105 | # Xcode 4 - Deprecated classes 106 | # 107 | # Allegedly, if you manually "deprecate" your classes, they get moved here. 108 | # 109 | # We're using source-control, so this is a "feature" that we do not want! 110 | 111 | *.moved-aside 112 | 113 | #### 114 | # UNKNOWN: recommended by others, but I can't discover what these files are 115 | # 116 | # ...none. Everything is now explained. 117 | 118 | #### 119 | # Custom ignores for MobileOrg Project 120 | 121 | vendor-libs 122 | Classes/Sync/Dropbox/DropboxKeys.h 123 | DropBoxKeys.xcconfig 124 | 125 | MobileOrg.xcworkspace 126 | Pods 127 | Carthage/ 128 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Travis 2 | 3 | os: osx 4 | osx_image: xcode12 5 | language: swift 6 | 7 | branches: 8 | only: 9 | - develop 10 | 11 | before_install: 12 | - export IOS_SIMULATOR_DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=14.0" 13 | 14 | before_script: 15 | - set -o pipefail 16 | 17 | script: 18 | - travis_retry xcodebuild clean test -scheme MobileOrg -destination "$IOS_SIMULATOR_DESTINATION" | xcpretty -c 19 | 20 | notifications: 21 | irc: 22 | "irc.freenode.net#mobileorg" 23 | 24 | webhooks: 25 | urls: 26 | - https://webhooks.gitter.im/e/adf14670ff7dc3b1fc67 27 | on_success: change # options: [always|never|change] default: always 28 | on_failure: always # options: [always|never|change] default: always 29 | on_start: never # options: [always|never|change] default: always 30 | -------------------------------------------------------------------------------- /Classes/DataModel/FileChecksum.h: -------------------------------------------------------------------------------- 1 | // 2 | // FileChecksum.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | 26 | @interface FileChecksum : NSManagedObject 27 | { 28 | } 29 | 30 | @property (nonatomic, retain) NSString * filename; 31 | @property (nonatomic, retain) NSString * checksum; 32 | 33 | @end 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Classes/DataModel/FileChecksum.m: -------------------------------------------------------------------------------- 1 | // 2 | // FileChecksum.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "FileChecksum.h" 24 | 25 | 26 | @implementation FileChecksum 27 | 28 | @dynamic filename; 29 | @dynamic checksum; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/DataModel/LocalEditAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocalEditAction.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | 27 | @interface LocalEditAction : NSManagedObject 28 | { 29 | } 30 | 31 | @property (nonatomic, copy) NSString * oldValue; 32 | @property (nonatomic, copy) NSString * updatedValue; 33 | @property (nonatomic, copy) NSString * actionType; 34 | @property (nonatomic, retain) NSDate * createdAt; 35 | @property (nonatomic, copy) NSString * nodeId; 36 | 37 | @end 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Classes/DataModel/LocalEditAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocalEditAction.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "LocalEditAction.h" 24 | 25 | #import "Node.h" 26 | 27 | @implementation LocalEditAction 28 | 29 | @dynamic oldValue; 30 | @dynamic updatedValue; 31 | @dynamic actionType; 32 | @dynamic createdAt; 33 | @dynamic nodeId; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Classes/DataModel/Node.h: -------------------------------------------------------------------------------- 1 | // 2 | // Node.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | FOUNDATION_EXPORT NSString *const kUnixFileLinkRegex; 26 | 27 | @class LocalEditAction; 28 | 29 | @interface Node : NSManagedObject 30 | { 31 | } 32 | 33 | @property (nonatomic, retain) NSString * body; 34 | @property (nonatomic, retain) NSString * heading; 35 | @property (nonatomic, retain) NSNumber * sequenceIndex; 36 | @property (nonatomic, retain) NSString * todoState; 37 | @property (nonatomic, retain) NSString * tags; 38 | @property (nonatomic, retain) NSString * inheritedTags; 39 | @property (nonatomic, retain) NSString * referencedNodeId; 40 | @property (nonatomic, retain) NSString * nodeId; 41 | @property (nonatomic, retain) NSString * outlinePath; 42 | @property (nonatomic, retain) NSNumber * indentLevel; 43 | @property (nonatomic, retain) NSNumber * readOnly; 44 | @property (nonatomic, retain) NSString * priority; 45 | @property (nonatomic, retain) Node * parent; 46 | @property (nonatomic, retain) NSSet* notes; 47 | @property (nonatomic, retain) NSSet* children; 48 | 49 | - (NSString*)bestId; 50 | - (NSString*)headingForDisplay; 51 | - (NSString*)headingForDisplayWithHtmlLinks:(BOOL)withLinks; 52 | - (NSString*)beforeText; 53 | - (NSString*)afterText; 54 | - (NSString*)bodyForDisplay; 55 | - (NSString*)completeTags; 56 | - (NSString*)tagsForDisplay; 57 | - (bool)hasTag:(NSString*)tag; 58 | - (bool)hasInheritedTag:(NSString*)tag; 59 | - (void)toggleTag:(NSString*)tag; 60 | - (void)addTag:(NSString*)tag; 61 | - (void)removeTag:(NSString*)tag; 62 | - (NSArray*)sortedChildren; 63 | - (NSString*)resolveLink:(NSString*)link; 64 | - (bool)isLink; 65 | - (NSString*)linkFile; 66 | - (bool)isBrokenLink; 67 | - (NSString*)linkTitle; 68 | - (void)collectLinks:(NSMutableArray*)links; 69 | - (NSString*)htmlForDocumentViewLevel:(int)level; 70 | - (NSString*)ownerFile; 71 | - (NSString*)bestDoneState; 72 | 73 | - (NSString *)scheduled; 74 | - (NSDate *)scheduledDate; 75 | - (NSString *)deadline; 76 | - (NSDate *)deadlineDate; 77 | 78 | @end 79 | 80 | 81 | @interface Node (CoreDataGeneratedAccessors) 82 | 83 | - (void)addChildrenObject:(Node *)value; 84 | - (void)removeChildrenObject:(Node *)value; 85 | - (void)addChildren:(NSSet *)value; 86 | - (void)removeChildren:(NSSet *)value; 87 | 88 | @end 89 | 90 | -------------------------------------------------------------------------------- /Classes/DataModel/Note.h: -------------------------------------------------------------------------------- 1 | // 2 | // Note.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | 27 | NS_ASSUME_NONNULL_BEGIN; 28 | 29 | @interface Note : NSManagedObject 30 | 31 | @property (nonatomic, retain, nullable) NSString * text; 32 | @property (nonatomic, retain, nullable) NSDate * createdAt; 33 | @property (nonatomic, retain, nullable) NSString * nodeId; 34 | @property (nonatomic, retain) NSString * noteId; 35 | @property (nonatomic, retain, nullable) NSNumber * locallyModified; 36 | @property (nonatomic, retain, nullable) NSNumber * removed; 37 | 38 | - (NSString*)heading; 39 | - (NSString*)body; 40 | - (bool)isFlagEntry; 41 | - (NSString*)orgLine; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END; 46 | -------------------------------------------------------------------------------- /Classes/DataModel/Note.m: -------------------------------------------------------------------------------- 1 | // 2 | // Note.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "Note.h" 24 | #import "Node.h" 25 | #import "DataUtils.h" 26 | #import "GlobalUtils.h" 27 | 28 | @implementation Note 29 | 30 | @dynamic text; 31 | @dynamic createdAt; 32 | @dynamic nodeId; 33 | @dynamic noteId; 34 | @dynamic locallyModified; 35 | @dynamic removed; 36 | 37 | - (NSString*)heading { 38 | // If it is a flag entry, the flag part is the title, the rest is the body 39 | if ([self isFlagEntry]) { 40 | Node *node = ResolveNode(self.nodeId); 41 | return [NSString stringWithFormat:@"F() [[%@][%@]]", self.nodeId, [node headingForDisplay]]; 42 | } 43 | 44 | if (!self.text || [self.text length] == 0) { 45 | return @"No title"; 46 | } 47 | 48 | NSRange rangeOfFirstNewline = [self.text rangeOfString:@"\n"]; 49 | if (rangeOfFirstNewline.location != NSNotFound) { 50 | return [self.text substringToIndex:rangeOfFirstNewline.location]; 51 | } else { 52 | return self.text; 53 | } 54 | } 55 | 56 | - (NSString*)body { 57 | // If it is a flag entry, the flag part is the title, the rest is the body 58 | if ([self isFlagEntry]) { 59 | return [self text]; 60 | } 61 | 62 | if (!self.text || [self.text length] == 0) { 63 | return @""; 64 | } 65 | NSRange rangeOfFirstNewline = [self.text rangeOfString:@"\n"]; 66 | if (rangeOfFirstNewline.location != NSNotFound && [self.text length] > rangeOfFirstNewline.location+1) { 67 | return [self.text substringFromIndex:rangeOfFirstNewline.location+1]; 68 | } else { 69 | return @""; 70 | } 71 | } 72 | 73 | - (bool)isFlagEntry { 74 | return self.nodeId && [self.nodeId length] > 0; 75 | } 76 | 77 | // * first line of the note 78 | // [2009-09-09 Wed 09:25] 79 | // Rest of the note 80 | - (NSString*)orgLine { 81 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 82 | [formatter setDateFormat:@"YYYY-MM-dd EEE HH:mm"]; 83 | NSString *timestamp = [formatter stringFromDate:[self createdAt]]; 84 | 85 | NSString *bodyStr = [self body]; 86 | if (bodyStr && [bodyStr length] > 0) { 87 | // Make the body text indented by 2 spaces on each line 88 | // Actually, don't do this. It makes it easier to later figure out what the original 89 | // intent was. 90 | // bodyStr = [bodyStr stringByReplacingOccurrencesOfString:@"\n" withString:@"\n "]; 91 | 92 | // Then get rid of any extra spaces or newlines at the ends 93 | bodyStr = [bodyStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 94 | 95 | // Make sure none of the lines start with * 96 | bodyStr = EscapeHeadings(bodyStr); 97 | 98 | return [NSString stringWithFormat:@"* %@\n[%@]\n%@\n", [self heading], timestamp, bodyStr]; 99 | } else { 100 | return [NSString stringWithFormat:@"* %@\n[%@]\n", [self heading], timestamp]; 101 | } 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Classes/Extensions/String+RegexSplitter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+RegexSplitter.swift 3 | // MobileOrg 4 | // 5 | // Created by Mario Martelli on 12.12.16. 6 | // 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | 24 | import Foundation 25 | 26 | public extension NSString { 27 | 28 | 29 | @objc func componentsSeparatedBy(regex: String) -> Array { 30 | 31 | guard let re = try? NSRegularExpression(pattern: regex, options: []) 32 | else { return [] } 33 | 34 | let stop = "" 35 | let modifiedString = re.stringByReplacingMatches( 36 | in: self as String, 37 | options: [], 38 | range: NSRange(location: 0, length: self.length), 39 | withTemplate: stop) as NSString 40 | return modifiedString.components(separatedBy: stop) 41 | } 42 | 43 | 44 | @objc func arrayOfCaptureComponentsMatchedBy(regex: String) -> Array> { 45 | let capture = self.captureComponentsMatchedBy(regex: regex) 46 | if capture.count > 0 { 47 | let ret:[Array] = [capture] 48 | return ret 49 | } 50 | return [] 51 | } 52 | 53 | @objc func captureComponentsMatchedBy(regex: String) -> Array { 54 | 55 | do { 56 | var result:[String] = [] 57 | let swiftString = String(self) 58 | let rgx = try NSRegularExpression(pattern: regex, options: []) 59 | 60 | let matches = rgx.matches(in: swiftString, options: [], range: NSRange(swiftString.startIndex..., in: swiftString)) 61 | for match in matches { 62 | for n in 0.. NSRange { 81 | let range = NSMakeRange(0, self.length) 82 | let match = self.range(of: regex, options: .regularExpression, range: range) 83 | return match 84 | } 85 | 86 | @objc func isMatchedBy(regex: String) -> Bool { 87 | let range = NSMakeRange(0, self.length) 88 | let match = self.range(of: regex, options: .regularExpression, range: range) 89 | if match.location == NSNotFound { 90 | return false 91 | } 92 | return true 93 | } 94 | 95 | 96 | // FIXME: this is a performance bottle-neck, we have to store compiled rgx when possible 97 | @objc func stringByReplacingOccurrencesOf(regex: String, withString: String) -> String { 98 | 99 | let rgx = try! NSRegularExpression(pattern: regex, 100 | options: NSRegularExpression.Options.caseInsensitive) 101 | let range = NSMakeRange(0, self.length) 102 | let modString = rgx.stringByReplacingMatches(in: self as String, 103 | options: [], 104 | range: range, 105 | withTemplate: withString) 106 | return modString 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Classes/MobileOrgAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrgAppDelegate.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class OutlineViewController; 26 | @class NoteListViewController; 27 | @class SearchController; 28 | @class SettingsController; 29 | @class Reachability; 30 | 31 | @interface MobileOrgAppDelegate : NSObject { 32 | 33 | NSManagedObjectModel *managedObjectModel; 34 | NSManagedObjectContext *managedObjectContext; 35 | NSPersistentStoreCoordinator *persistentStoreCoordinator; 36 | 37 | UITabBarController *tabBarController; 38 | 39 | OutlineViewController *rootOutlineController; 40 | UINavigationController *rootOutlineNavigationController; 41 | 42 | NoteListViewController *noteListViewController; 43 | UINavigationController *noteListNavigationController; 44 | 45 | SearchController *searchController; 46 | UINavigationController *searchNavigationController; 47 | 48 | SettingsController *settingsController; 49 | UINavigationController *settingsNavigationController; 50 | 51 | UIWindow *window; 52 | 53 | Reachability *internetReach; 54 | } 55 | 56 | @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; 57 | @property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext; 58 | @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; 59 | 60 | @property (nonatomic, retain) IBOutlet UIWindow *window; 61 | 62 | @property (nonatomic, readonly) UITabBarController *tabBarController; 63 | 64 | @property (nonatomic, readonly) OutlineViewController *rootOutlineController; 65 | @property (nonatomic, readonly) UINavigationController *rootOutlineNavigationController; 66 | 67 | @property (nonatomic, readonly) NoteListViewController *noteListViewController; 68 | @property (nonatomic, readonly) UINavigationController *noteListNavigationController; 69 | 70 | @property (nonatomic, readonly) SearchController *searchController; 71 | @property (nonatomic, readonly) UINavigationController *searchNavigationController; 72 | 73 | @property (nonatomic, readonly) SettingsController *settingsController; 74 | @property (nonatomic, readonly) UINavigationController *settingsNavigationController; 75 | 76 | @property (nonatomic, retain) Reachability *internetReach; 77 | 78 | - (NSString *)applicationDocumentsDirectory; 79 | 80 | @end 81 | 82 | -------------------------------------------------------------------------------- /Classes/Outline/ActionMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActionMenuController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/10/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class OutlineViewController; 27 | 28 | @interface ActionMenuController : UIViewController { 29 | 30 | Node *node; 31 | OutlineViewController *parentController; 32 | bool showDocumentViewButton; 33 | } 34 | 35 | @property (nonatomic, retain) Node *node; 36 | @property (nonatomic, retain) OutlineViewController *parentController; 37 | @property (nonatomic) bool showDocumentViewButton; 38 | 39 | - (void)showActionSheet:(UIViewController*)controller on:(UIView *)presentingView; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Classes/Outline/Cells/OutlineCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineCell.swift 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 13/10/2019. 6 | // Copyright © 2019 Artem Loenko. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | // 23 | 24 | import UIKit 25 | 26 | @objc 27 | final class OutlineCell: UITableViewCell { 28 | 29 | @objc static let reuseIdentifier: String = "OutlineCellIdentifier" 30 | 31 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 32 | super.init(style: style, reuseIdentifier: reuseIdentifier) 33 | 34 | self.textLabel?.numberOfLines = 0 35 | self.textLabel?.adjustsFontForContentSizeCategory = true 36 | } 37 | 38 | required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } 39 | 40 | @objc func update(title: String, note: String? = nil, status: String? = nil, done: Bool = false, priority: String? = nil, tags: String? = nil, scheduled: Date? = nil, deadline: Date? = nil, createdAt: Date? = nil) { 41 | self.textLabel?.attributedText = self.setup(title: title, note: note, status: status, done: done, priority: priority, tags: tags, scheduled: scheduled, deadline: deadline, createdAt: createdAt) 42 | } 43 | 44 | /// Format the data as an attributed string 45 | /// Format: 46 | /// [ Status ] [ Priority ] [ Tags ] 47 | /// Title 48 | /// [ Note ] 49 | /// [ Scheduled ] 50 | /// [ Deadline ] 51 | /// [ CreatedAt ] 52 | /// Base rules: 53 | /// - No more than 3 colours per cell; 54 | /// - No more than 2 font sizes per cell. 55 | private func setup( 56 | title: String, 57 | note: String?, 58 | status: String?, 59 | done: Bool = false, 60 | priority: String?, 61 | tags: String?, 62 | scheduled: Date?, 63 | deadline: Date?, 64 | createdAt: Date?) -> NSAttributedString { 65 | let string = NSMutableAttributedString() 66 | 67 | if let status = status, !status.isEmpty { 68 | string.append(status.asStatus(done: done)) 69 | string.space() 70 | } 71 | if let priority = priority, !priority.isEmpty { 72 | string.append(priority.asPriority(done: done)) 73 | string.space() 74 | } 75 | if let tags = tags, !tags.isEmpty { 76 | let formattedTags = tags.split(separator: ":").joined(separator: " ") 77 | string.append(formattedTags.asTags(done: done)) 78 | } 79 | 80 | if string.length > 0 { string.newLine() } 81 | string.append(title.asTitle(done: done)) 82 | 83 | if let note = note, !note.isEmpty { 84 | string.newLine().append(note.asNote(done: done)) 85 | } 86 | if let scheduled = scheduled { 87 | string.newLine().append("Scheduled: ".asScheduled(with: scheduled, done: done)) 88 | } 89 | if let deadline = deadline { 90 | string.newLine().append("Deadline: ".asDeadline(with: deadline, done: done)) 91 | } 92 | if let createdAt = createdAt { 93 | string.newLine().append("".asCreatedAt(with: createdAt)) 94 | } 95 | 96 | return string 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Classes/Outline/DetailsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailsViewController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/1/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | 27 | @interface DetailsViewController : UITableViewController { 28 | Node *node; 29 | Node *editTarget; 30 | UISegmentedControl *segmented; 31 | } 32 | 33 | @property (nonatomic, retain) Node *node; 34 | @property (nonatomic, retain) Node *editTarget; 35 | 36 | - (id)initWithNode:(Node*)aNode; 37 | - (void)restore:(NSArray*)outlineStates; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Classes/Outline/NodeTextEditController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NodeTextEditController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/2/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class LocalEditAction; 27 | 28 | typedef enum { 29 | NodeTextEditPropertyHeading, 30 | NodeTextEditPropertyBody 31 | } NodeTextEditPropertyType; 32 | 33 | @interface NodeTextEditController : UIViewController { 34 | NodeTextEditPropertyType editProperty; 35 | Node *node; 36 | UITextView *textView; 37 | NSString *valueBeforeEditing; 38 | LocalEditAction *editAction; 39 | bool keyboardShown; 40 | UIBarButtonItem *doneButton; 41 | int indentLevel; 42 | } 43 | 44 | @property (nonatomic) NodeTextEditPropertyType editProperty; 45 | @property (nonatomic, retain) Node *node; 46 | @property (nonatomic, copy) NSString *valueBeforeEditing; 47 | @property (nonatomic, retain) LocalEditAction *editAction; 48 | 49 | - (id)initWithNode:(Node*)aNode andEditProperty:(NodeTextEditPropertyType)property; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/Outline/OutlineTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineTableView.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/10/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class OutlineViewController; 26 | 27 | @interface OutlineTableView : UITableView { 28 | CGPoint myStartTouchPosition; 29 | bool isInTouch; 30 | NSTimer *timer; 31 | 32 | OutlineViewController *controller; 33 | } 34 | 35 | @property (nonatomic, retain) OutlineViewController *controller; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Classes/Outline/OutlineTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineTableView.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/10/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "OutlineTableView.h" 24 | #import "OutlineViewController.h" 25 | 26 | #define MAX_TOUCH_AND_HOLD_DELTA 3 27 | 28 | @implementation OutlineTableView 29 | 30 | @synthesize controller; 31 | 32 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 33 | if (timer) { 34 | [timer invalidate]; 35 | timer = nil; 36 | } 37 | 38 | NSSet *alltouches = [event allTouches]; 39 | 40 | if ([alltouches count] == 1) { 41 | UITouch *touch = [touches anyObject]; 42 | isInTouch = NO; 43 | myStartTouchPosition = [touch locationInView:self]; 44 | 45 | timer = [NSTimer scheduledTimerWithTimeInterval: 0.3 46 | target: self 47 | selector: @selector(timerFired:) 48 | userInfo: nil 49 | repeats: NO]; 50 | } 51 | 52 | [super touchesBegan:touches withEvent:event]; 53 | } 54 | 55 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 56 | UITouch *touch = touches.anyObject; 57 | CGPoint currentTouchPosition = [touch locationInView:self]; 58 | 59 | // If the swipe tracks correctly. 60 | double diffx = myStartTouchPosition.x - currentTouchPosition.x + 0.1; // adding 0.1 to avoid division by zero 61 | double diffy = myStartTouchPosition.y - currentTouchPosition.y + 0.1; // adding 0.1 to avoid division by zero 62 | 63 | if(fabs(diffx) > MAX_TOUCH_AND_HOLD_DELTA || fabs(diffy) > MAX_TOUCH_AND_HOLD_DELTA) 64 | { 65 | if (timer) { 66 | [timer invalidate]; 67 | timer = nil; 68 | } 69 | } 70 | 71 | [super touchesMoved:touches withEvent:event]; 72 | } 73 | 74 | - (void)timerFired:(NSTimer *)aTimer { 75 | isInTouch = YES; 76 | NSIndexPath *indexPathAtHitPoint = [self indexPathForRowAtPoint:myStartTouchPosition]; 77 | if (indexPathAtHitPoint) { 78 | [controller delayedOneFingerTouch:indexPathAtHitPoint]; 79 | return; 80 | } 81 | } 82 | 83 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { 84 | if (timer) { 85 | [timer invalidate]; 86 | timer = nil; 87 | } 88 | 89 | if (isInTouch) { 90 | isInTouch = NO; 91 | [super touchesEnded:touches withEvent:event]; 92 | return; 93 | } 94 | 95 | [super touchesEnded:touches withEvent:event]; 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Classes/Outline/OutlineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OutlineViewController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | 27 | typedef enum { 28 | OutlineSelectionTypeDontCare, 29 | OutlineSelectionTypeExpandOutline, 30 | OutlineSelectionTypeDetails, 31 | OutlineSelectionTypeDocumentView, 32 | } OutlineSelectionType; 33 | 34 | // A UITableViewController that displays the children of a single Node 35 | @interface OutlineViewController : UITableViewController { 36 | 37 | // Root node, the node whose children are displayed 38 | Node *root; 39 | 40 | // Children of root Node, sorted by sequenceIndex 41 | NSArray *nodes; 42 | 43 | // UI components 44 | UIBarButtonItem *syncButton; 45 | UIBarButtonItem *homeButton; 46 | 47 | UIImageView *pressSyncView; 48 | UIImageView *pleaseConfigureView; 49 | UIImageView *offlineCantSyncView; 50 | 51 | // The app delegate will let us know when we have connectivity, so 52 | // we can enable/disable sync button 53 | bool hasConnectivity; 54 | } 55 | 56 | @property (nonatomic, retain) Node *root; 57 | @property (nonatomic, retain) NSArray *nodes; 58 | 59 | - (id)initWithRootNode:(Node*)node; 60 | - (id)selectRowAtIndexPath:(NSIndexPath*)indexPath withType:(OutlineSelectionType)selectionType andAnimation:(bool)animation; 61 | - (NSIndexPath*)pathForNode:(Node*)node; 62 | - (void)updateBadge; 63 | - (void)setHasConnectivity:(bool)flag; 64 | - (void)restore:(NSArray*)outlineStates; 65 | - (void)reset; 66 | - (void)delayedOneFingerTouch:(NSIndexPath*)path; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Classes/Outline/PreviewViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewViewController.swift 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 10/03/2020. 6 | // Copyright © 2020 Sean Escriva. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | final class PreviewViewController: UIViewController { 13 | 14 | private let node: Node 15 | private var positionToScroll: Int? 16 | private lazy var nodeContent: Node = { 17 | guard self.node.isLink(), let content = NodeWithFilename(self.node.linkFile()) else { return self.node } 18 | return content 19 | }() 20 | private lazy var webView: WKWebView = { [weak self] in 21 | let configuration = WKWebViewConfiguration() 22 | configuration.dataDetectorTypes = [] 23 | 24 | let webView = WKWebView(frame: .zero, configuration: configuration) 25 | webView.translatesAutoresizingMaskIntoConstraints = false 26 | webView.navigationDelegate = self 27 | return webView 28 | }() 29 | 30 | @objc 31 | init(with node: Node) { 32 | self.node = node 33 | super.init(nibName: nil, bundle: nil) 34 | } 35 | 36 | @objc 37 | init(with node: Node, positionToScroll: Int) { 38 | self.node = node 39 | self.positionToScroll = positionToScroll 40 | super.init(nibName: nil, bundle: nil) 41 | } 42 | 43 | required init?(coder: NSCoder) { 44 | fatalError("init(coder:) has not been implemented") 45 | } 46 | 47 | override func viewDidLoad() { 48 | super.viewDidLoad() 49 | 50 | self.view.addSubview(self.webView) 51 | NSLayoutConstraint.activate([ 52 | self.webView.leadingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.leadingAnchor), 53 | self.webView.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor), 54 | self.webView.trailingAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.trailingAnchor), 55 | self.webView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor) 56 | ]) 57 | } 58 | 59 | override func viewWillAppear(_ animated: Bool) { 60 | super.viewWillAppear(animated) 61 | 62 | if let index = self.navigationController?.viewControllers.firstIndex(of: self) { 63 | SessionManager.instance()?.popOutlineState(toLevel: Int32(index)) 64 | } 65 | 66 | self.title = self.node.headingForDisplay() 67 | self.webView.loadHTMLString(self.nodeContent.html(forDocumentViewLevel: 0), baseURL: URL(fileURLWithPath: Bundle.main.bundlePath)) 68 | } 69 | 70 | func pushOrgFile(with filename: String) { 71 | guard let nextNode = NodeWithFilename(filename) else { return } 72 | SessionManager.instance()?.pushOutlineState({ 73 | let state = OutlineState() 74 | state.selectedLink = filename 75 | state.selectionType = OutlineSelectionTypeDocumentView 76 | return state 77 | }()) 78 | let controller = PreviewViewController(with: nextNode) 79 | self.navigationController?.pushViewController(controller, animated: true) 80 | } 81 | 82 | } 83 | 84 | extension PreviewViewController: WKNavigationDelegate { 85 | 86 | func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { 87 | guard let positionToScroll = self.positionToScroll else { return } 88 | webView.evaluateJavaScript("window.scrollTo(0, \(positionToScroll);", completionHandler: nil) 89 | self.positionToScroll = nil 90 | } 91 | 92 | func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { 93 | guard let url = navigationAction.request.url else { 94 | decisionHandler(.cancel) 95 | return 96 | } 97 | 98 | switch url.host { 99 | case "orgfile": 100 | guard let resolvedLink = self.node.resolveLink((url as NSURL).resourceSpecifier) else { return } 101 | self.pushOrgFile(with: resolvedLink) 102 | decisionHandler(.cancel) 103 | return 104 | case nil: 105 | decisionHandler(.allow) 106 | return 107 | default: 108 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 109 | decisionHandler(.cancel) 110 | return 111 | } 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /Classes/Outline/PriorityEditController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PriorityEditController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/11/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class LocalEditAction; 27 | 28 | @interface PriorityEditController : UITableViewController { 29 | Node *node; 30 | NSArray *priorities; 31 | LocalEditAction *editAction; 32 | } 33 | 34 | @property (nonatomic, retain) Node *node; 35 | @property (nonatomic, retain) NSArray *priorities; 36 | @property (nonatomic, retain) LocalEditAction *editAction; 37 | 38 | - (id)initWithNode:(Node*)aNode; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/Outline/PriorityEditController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PriorityEditController.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/11/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "PriorityEditController.h" 24 | #import "Node.h" 25 | #import "Settings.h" 26 | #import "DataUtils.h" 27 | #import "LocalEditAction.h" 28 | #import "GlobalUtils.h" 29 | 30 | @implementation PriorityEditController 31 | 32 | @synthesize node; 33 | @synthesize editAction; 34 | @synthesize priorities; 35 | 36 | - (void)onClearPriority { 37 | node.priority = @""; 38 | self.editAction.updatedValue = @""; 39 | Save(); 40 | UpdateEditActionCount(); 41 | [[self tableView] reloadData]; 42 | [[self navigationController] popViewControllerAnimated:YES]; 43 | } 44 | 45 | - (id)initWithNode:(Node*)aNode { 46 | if (self = [super initWithStyle:UITableViewStyleGrouped]) { 47 | self.node = aNode; 48 | self.priorities = [[Settings instance] priorities]; 49 | self.priorities = [self.priorities sortedArrayUsingSelector:@selector(compare:)]; 50 | 51 | bool created; 52 | self.editAction = FindOrCreateLocalEditActionForNode(@"edit:priority", node, &created); 53 | if (created) { 54 | self.editAction.oldValue = [node priority]; 55 | self.editAction.updatedValue = [node priority]; 56 | } 57 | } 58 | return self; 59 | } 60 | 61 | - (void)viewDidLoad { 62 | [super viewDidLoad]; 63 | 64 | [self setTitle:@"Edit Priority"]; 65 | 66 | UIBarButtonItem *clearButton = [[UIBarButtonItem alloc] initWithTitle:@"Clear" style:UIBarButtonItemStylePlain target:self action:@selector(onClearPriority)]; 67 | self.navigationItem.rightBarButtonItem = clearButton; 68 | } 69 | 70 | - (void)viewDidDisappear:(BOOL)animated { 71 | [super viewDidDisappear:animated]; 72 | 73 | if ([[[self editAction] oldValue] isEqualToString:[[self editAction] updatedValue]]) { 74 | DeleteLocalEditAction([self editAction]); 75 | self.editAction = nil; 76 | } 77 | } 78 | 79 | - (BOOL)shouldAutorotate { 80 | return YES; 81 | } 82 | 83 | - (UIInterfaceOrientationMask)supportedInterfaceOrientations { 84 | return UIInterfaceOrientationMaskAll; 85 | } 86 | 87 | - (void)didReceiveMemoryWarning { 88 | // Releases the view if it doesn't have a superview. 89 | [super didReceiveMemoryWarning]; 90 | 91 | // Release any cached data, images, etc that aren't in use. 92 | } 93 | 94 | #pragma mark Table view methods 95 | 96 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 97 | return 1; 98 | } 99 | 100 | // Customize the number of rows in the table view. 101 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 102 | return [priorities count]; 103 | } 104 | 105 | // Customize the appearance of table view cells. 106 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 107 | 108 | NSString *CellIdentifier = @"PriorityEditCellWithoutCheck"; 109 | NSString *priority = [priorities objectAtIndex:[indexPath row]]; 110 | 111 | if ([node.priority isEqualToString:priority]) { 112 | CellIdentifier = @"PriorityEditCellWithCheck"; 113 | } 114 | 115 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 116 | if (cell == nil) { 117 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 118 | if ([node.priority isEqualToString:priority]) { 119 | [cell setAccessoryType:UITableViewCellAccessoryCheckmark]; 120 | } 121 | } 122 | 123 | [cell.textLabel setText:priority]; 124 | 125 | return cell; 126 | } 127 | 128 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 129 | 130 | NSString *priority = [priorities objectAtIndex:[indexPath row]]; 131 | node.priority = priority; 132 | 133 | self.editAction.updatedValue = priority; 134 | 135 | Save(); 136 | 137 | UpdateEditActionCount(); 138 | 139 | [tableView reloadData]; 140 | 141 | [[self navigationController] popViewControllerAnimated:YES]; 142 | } 143 | 144 | @end 145 | -------------------------------------------------------------------------------- /Classes/Outline/TagEditController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TagEditController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/4/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class LocalEditAction; 27 | 28 | @interface TagEditController : UITableViewController { 29 | Node *node; 30 | NSArray *allTags; 31 | NSArray *primaryTags; 32 | LocalEditAction *editAction; 33 | NSString *recentTagString; 34 | } 35 | 36 | @property (nonatomic, retain) Node *node; 37 | @property (nonatomic, retain) NSArray *allTags; 38 | @property (nonatomic, retain) NSArray *primaryTags; 39 | @property (nonatomic, retain) LocalEditAction *editAction; 40 | @property (nonatomic, copy) NSString *recentTagString; 41 | 42 | - (id)initWithNode:(Node*)aNode; 43 | - (void)commitNewTag; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Classes/Outline/TodoStateEditController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TodoStateEditController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/4/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class LocalEditAction; 27 | 28 | @interface TodoStateEditController : UITableViewController { 29 | Node *node; 30 | NSArray *todoStateGroups; 31 | LocalEditAction *editAction; 32 | } 33 | 34 | @property (nonatomic, retain) Node *node; 35 | @property (nonatomic, retain) NSArray *todoStateGroups; 36 | @property (nonatomic, retain) LocalEditAction *editAction; 37 | 38 | - (id)initWithNode:(Node*)aNode; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/Parsing/ChecksumFileParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChecksumFileParser.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @interface ChecksumFileParser : NSObject { 26 | NSMutableDictionary *checksumPairs; 27 | } 28 | 29 | @property (nonatomic, retain) NSMutableDictionary *checksumPairs; 30 | 31 | - (void)reset; 32 | - (void)parse:(NSString*)file; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Classes/Parsing/ChecksumFileParser.m: -------------------------------------------------------------------------------- 1 | // 2 | // ChecksumFileParser.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "ChecksumFileParser.h" 24 | #import "MobileOrg-Swift.h" 25 | 26 | @implementation ChecksumFileParser 27 | 28 | @synthesize checksumPairs; 29 | 30 | - (id)init { 31 | if (self = [super init]) { 32 | self.checksumPairs = [NSMutableDictionary new]; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)reset { 38 | [self.checksumPairs removeAllObjects]; 39 | } 40 | 41 | - (void)parse:(NSString*)file { 42 | [checksumPairs removeAllObjects]; 43 | 44 | NSError *error = nil; 45 | NSStringEncoding encoding; 46 | NSString *entireFile = [NSString stringWithContentsOfFile:file usedEncoding:&encoding error:&error]; 47 | if (error) { 48 | //NSLog(@"Failed to read contents of file because: %@ (%@)", [error description], [error userInfo]); 49 | entireFile = @""; 50 | } 51 | 52 | NSScanner *theScanner; 53 | theScanner = [NSScanner scannerWithString:entireFile]; 54 | 55 | NSString *line; 56 | NSCharacterSet *eolSet; 57 | eolSet = [NSCharacterSet newlineCharacterSet]; 58 | 59 | [theScanner setCharactersToBeSkipped:eolSet]; 60 | 61 | // Handle md5 output from osx, md5sum from linux, and shasum output 62 | // Be careful not to die if there's a bad line (like if you md5sum'd * with dirs in it 63 | while ([theScanner isAtEnd] == NO) { 64 | if ([theScanner scanUpToCharactersFromSet:eolSet intoString:&line]) { 65 | if (line && [line length] > 0) { 66 | // shasum 67 | // 40 chars of checksum, 2 spaces, filename 68 | // 4c05152c39bcc402ea99851c01e3849060a9d3a1 MainWindow.xib 69 | 70 | // md5 on osx 71 | // MD5 (filename) = 32hex chars 72 | // MD5 (Icon.png) = 476d45ce45fc0658bbda13137bc60205 73 | 74 | // md5sum on linux 75 | // 32hex chars, 2 spaces, filename 76 | // e5d34d894456a55345977fc617e79a17 org-contribute.org 77 | 78 | static NSString *shasumRegex = @"([a-f0-9]{40}) (.+)"; 79 | static NSString *md5sumRegex = @"([a-f0-9]+) (.+)"; 80 | static NSString *osxmd5Regex = @"MD5 \\((.+)\\) = ([a-f0-9]{32})"; 81 | 82 | NSString *checksum = nil, *filename = nil; 83 | NSArray *matches = nil; 84 | 85 | matches = [line componentsSeparatedByRegex:shasumRegex]; 86 | if ([matches count] == 3) { 87 | checksum = [matches objectAtIndex:1]; 88 | filename = [matches objectAtIndex:2]; 89 | } else { 90 | matches = [line componentsSeparatedByRegex:md5sumRegex]; 91 | if ([matches count] == 3) { 92 | checksum = [matches objectAtIndex:1]; 93 | filename = [matches objectAtIndex:2]; 94 | } else { 95 | matches = [line componentsSeparatedByRegex:osxmd5Regex]; 96 | if ([matches count] == 4) { 97 | // NOTE: Filename and checksum are swapped 98 | filename = [matches objectAtIndex:1]; 99 | checksum = [matches objectAtIndex:2]; 100 | } 101 | } 102 | } 103 | 104 | if (checksum && filename) { 105 | [checksumPairs setObject:checksum forKey:filename]; 106 | } 107 | } 108 | } 109 | } 110 | } 111 | 112 | @end 113 | -------------------------------------------------------------------------------- /Classes/Parsing/EditEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // EditEntity.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/3/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | 27 | @interface EditEntity : NSObject { 28 | NSString *editAction; 29 | NSString *oldValue; 30 | NSString *updatedValue; 31 | NSString *heading; 32 | NSString *noteId; 33 | NSDate *createdAt; 34 | Node *node; 35 | } 36 | 37 | @property (nonatomic, copy) NSString *editAction; 38 | @property (nonatomic, copy) NSString *oldValue; 39 | @property (nonatomic, copy) NSString *updatedValue; 40 | @property (nonatomic, copy) NSString *heading; 41 | @property (nonatomic, copy) NSString *noteId; 42 | @property (nonatomic, copy) NSDate *createdAt; 43 | @property (nonatomic, retain) Node *node; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Classes/Parsing/EditEntity.m: -------------------------------------------------------------------------------- 1 | // 2 | // EditEntity.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/3/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "EditEntity.h" 24 | 25 | @implementation EditEntity 26 | 27 | @synthesize editAction; 28 | @synthesize oldValue, updatedValue; 29 | @synthesize heading; 30 | @synthesize noteId; 31 | @synthesize createdAt; 32 | @synthesize node; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Classes/Parsing/EditsFileParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // EditsFileParser.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/3/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @interface EditsFileParser : NSObject { 26 | __unsafe_unretained id delegate; 27 | SEL completionSelector; 28 | NSString *editsFilename; 29 | NSMutableArray *editEntities; 30 | } 31 | 32 | @property (nonatomic, assign) id delegate; 33 | @property (nonatomic) SEL completionSelector; 34 | @property (nonatomic, copy) NSString *editsFilename; 35 | @property (nonatomic, retain) NSMutableArray *editEntities; 36 | 37 | - (void)parse; 38 | - (void)reset; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Classes/Parsing/OrgFileParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // OrgFileParser.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | #import 25 | 26 | @interface OrgFileParser : NSObject { 27 | __unsafe_unretained id delegate; 28 | SEL completionSelector; 29 | NSString *orgFilename; 30 | NSString *localFilename; 31 | NSString *errorStr; 32 | } 33 | 34 | @property (nonatomic, assign) id delegate; 35 | @property (nonatomic) SEL completionSelector; 36 | @property (nonatomic, copy) NSString *orgFilename; 37 | @property (nonatomic, copy) NSString *localFilename; 38 | @property (nonatomic, copy) NSString *errorStr; 39 | 40 | - (void)parse:(NSManagedObjectContext *)moc; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/PersistenceStack.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PersistenceStack.swift 3 | // MobileOrg 4 | // 5 | // Created by Mario Martelli on 28.04.17. 6 | // Copyright © 2017 Mario Martelli. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | @objcMembers final class PersistenceStack:NSObject { 13 | 14 | static let shared = PersistenceStack() 15 | 16 | var moc:NSManagedObjectContext 17 | 18 | private override init() { 19 | self.moc = AppInstance().managedObjectContext 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Classes/Search/SearchController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SearchController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/6/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | #import "OutlineViewController.h" 25 | 26 | @class Node; 27 | 28 | @interface SearchController : UITableViewController { 29 | UISearchBar *search_bar; 30 | NSMutableArray *nodesArray; 31 | } 32 | 33 | @property (nonatomic, retain) UISearchBar *search_bar; 34 | @property (nonatomic, retain) NSMutableArray *nodesArray; 35 | 36 | - (void)reset; 37 | - (NSIndexPath*)pathForNode:(Node*)node; 38 | - (id)selectRowAtIndexPath:(NSIndexPath*)indexPath withType:(OutlineSelectionType)selectionType andAnimation:(bool)animation; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /Classes/Settings/OutlineState.h: -------------------------------------------------------------------------------- 1 | // 2 | // SessionContext.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/7/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | #import "OutlineViewController.h" 25 | 26 | @interface OutlineState : NSObject { 27 | OutlineSelectionType selectionType; 28 | long selectedChildIndex; 29 | int scrollPositionY; 30 | NSString *selectedLink; 31 | } 32 | 33 | @property (nonatomic) OutlineSelectionType selectionType; 34 | @property (nonatomic) long selectedChildIndex; 35 | @property (nonatomic) int scrollPositionY; 36 | @property (nonatomic, retain) NSString *selectedLink; 37 | 38 | - (NSDictionary*)toDictionary; 39 | + (OutlineState*)fromDictionary:(NSDictionary*)dict; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Classes/Settings/OutlineState.m: -------------------------------------------------------------------------------- 1 | // 2 | // SessionContext.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/7/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "OutlineState.h" 24 | 25 | @implementation OutlineState 26 | 27 | @synthesize selectionType; 28 | @synthesize selectedChildIndex; 29 | @synthesize scrollPositionY; 30 | @synthesize selectedLink; 31 | 32 | - (NSDictionary*)toDictionary { 33 | NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: 34 | [NSString stringWithFormat:@"%d", selectionType], @"SelectionType", 35 | [NSString stringWithFormat:@"%ld", selectedChildIndex], @"SelectedChild", 36 | [NSString stringWithFormat:@"%d", scrollPositionY], @"ScrollY", 37 | selectedLink, @"SelectedLink", 38 | nil]; 39 | return dict; 40 | } 41 | 42 | + (OutlineState*)fromDictionary:(NSDictionary*)dict { 43 | OutlineState *state = [OutlineState new]; 44 | state.selectionType = [[dict valueForKey:@"SelectionType"] intValue]; 45 | state.selectedChildIndex = [[dict valueForKey:@"SelectedChild"] intValue]; 46 | state.scrollPositionY = [[dict valueForKey:@"ScrollY"] intValue]; 47 | state.selectedLink = [dict valueForKey:@"SelectedLink"]; 48 | return state; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/Settings/SessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SessionManager.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/7/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class OutlineState; 26 | @class Note; 27 | 28 | @interface SessionManager : NSObject { 29 | NSMutableArray *outlineStates; 30 | bool isRestoring; 31 | } 32 | 33 | @property (nonatomic, retain) NSMutableArray *outlineStates; 34 | @property (nonatomic) bool isRestoring; 35 | 36 | + (SessionManager*)instance; 37 | 38 | - (void)restore; 39 | - (void)reset; 40 | 41 | - (void)restoreCurrentTab; 42 | - (void)storeCurrentTab; 43 | 44 | - (void)pushOutlineState:(OutlineState*)state; 45 | - (void)popOutlineStateToLevel:(int)level; 46 | - (OutlineState*)topOutlineState; 47 | - (void)replaceTopOutlineState:(OutlineState*)newState; 48 | - (void)saveOutlineState; 49 | 50 | - (void)setSelectedNote:(Note*)note; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Classes/Settings/SessionManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // SessionManager.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 10/7/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "SessionManager.h" 24 | #import "OutlineState.h" 25 | #import "GlobalUtils.h" 26 | #import "MobileOrgAppDelegate.h" 27 | #import "Settings.h" 28 | 29 | static SessionManager *gInstance = NULL; 30 | static NSString *kOutlineStatesKey = @"OutlineStates"; 31 | static NSString *kWhichTabKey = @"WhichTab"; 32 | 33 | @implementation SessionManager 34 | 35 | @synthesize outlineStates; 36 | @synthesize isRestoring; 37 | 38 | + (SessionManager*)instance { 39 | @synchronized(self) { 40 | if (gInstance == NULL) 41 | gInstance = [[self alloc] init]; 42 | } 43 | return gInstance; 44 | } 45 | 46 | - (id)init { 47 | if (self = [super init]) { 48 | NSMutableArray *existingStates = [[[NSUserDefaults standardUserDefaults] objectForKey:kOutlineStatesKey] mutableCopy]; 49 | if (existingStates) { 50 | self.outlineStates = existingStates; 51 | } else { 52 | self.outlineStates = [NSMutableArray new]; 53 | self.isRestoring = false; 54 | } 55 | } 56 | return self; 57 | } 58 | 59 | - (void)restore { 60 | isRestoring = true; 61 | 62 | // Restore the outline selections 63 | [[AppInstance() rootOutlineController] restore:outlineStates]; 64 | 65 | // Restore the right tab 66 | [self restoreCurrentTab]; 67 | 68 | isRestoring = false; 69 | } 70 | 71 | - (void)reset { 72 | [self.outlineStates removeAllObjects]; 73 | [self saveOutlineState]; 74 | } 75 | 76 | - (bool)isSearchMode { 77 | return [[AppInstance() tabBarController] selectedIndex] == 2; 78 | } 79 | 80 | - (void)restoreCurrentTab { 81 | int whichTab = [[[NSUserDefaults standardUserDefaults] objectForKey:kWhichTabKey] intValue]; 82 | 83 | if (![[Settings instance] isConfiguredProperly]) { 84 | whichTab = 3; // Settings 85 | } 86 | 87 | [[AppInstance() tabBarController] setSelectedIndex:whichTab]; 88 | } 89 | 90 | - (void)storeCurrentTab { 91 | int whichTab = (int)[[AppInstance() tabBarController] selectedIndex]; 92 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInt:whichTab] forKey:kWhichTabKey]; 93 | [[NSUserDefaults standardUserDefaults] synchronize]; 94 | } 95 | 96 | - (void)pushOutlineState:(OutlineState*)state { 97 | if (!isRestoring && ![self isSearchMode]) { 98 | [outlineStates addObject:[state toDictionary]]; 99 | [self saveOutlineState]; 100 | } 101 | } 102 | 103 | - (void)popOutlineStateToLevel:(int)level { 104 | if (!isRestoring && ![self isSearchMode]) { 105 | while ([self.outlineStates count] > (NSUInteger)level) { 106 | [self.outlineStates removeLastObject]; 107 | } 108 | [self saveOutlineState]; 109 | } 110 | } 111 | 112 | - (OutlineState*)topOutlineState { 113 | return [OutlineState fromDictionary:[self.outlineStates lastObject]]; 114 | } 115 | 116 | - (void)replaceTopOutlineState:(OutlineState*)newState { 117 | if (!isRestoring && ![self isSearchMode]) { 118 | [self.outlineStates removeLastObject]; 119 | [self.outlineStates addObject:[newState toDictionary]]; 120 | [self saveOutlineState]; 121 | } 122 | } 123 | 124 | - (void)saveOutlineState { 125 | [[NSUserDefaults standardUserDefaults] setObject:self.outlineStates forKey:kOutlineStatesKey]; 126 | [[NSUserDefaults standardUserDefaults] synchronize]; 127 | } 128 | 129 | - (void)setSelectedNote:(Note*)note { 130 | // TODO 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /Classes/Settings/Settings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Settings.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | typedef enum { 26 | AppBadgeModeUnknown = 0, 27 | AppBadgeModeNone, 28 | AppBadgeModeTotal 29 | } AppBadgeMode; 30 | 31 | typedef enum { 32 | ServerModeUnknown = 0, 33 | ServerModeWebDav, 34 | ServerModeDropbox, 35 | ServerModeICloud 36 | } ServerMode; 37 | 38 | typedef enum { 39 | LaunchTabOutline = 0, 40 | LaunchTabCapture, 41 | } LaunchTab; 42 | 43 | @interface Settings : NSObject { 44 | NSURL *indexUrl; 45 | 46 | NSString *username; 47 | NSString *password; 48 | 49 | NSDate *lastSync; 50 | 51 | NSMutableArray *primaryTags; 52 | NSMutableArray *mutuallyExclusiveTagGroups; 53 | NSMutableArray *allTags; 54 | NSMutableArray *todoStateGroups; 55 | NSMutableArray *priorities; 56 | 57 | AppBadgeMode appBadgeMode; 58 | 59 | ServerMode serverMode; 60 | 61 | LaunchTab launchTab; 62 | 63 | NSString *dropboxIndex; 64 | 65 | NSString *encryptionPassword; 66 | } 67 | 68 | @property (nonatomic, copy, nullable) NSURL *indexUrl; 69 | @property (nonatomic, copy, nullable) NSString *username; 70 | @property (nonatomic, copy, nullable) NSString *password; 71 | @property (nonatomic, copy, nullable) NSDate *lastSync; 72 | @property (nonatomic, copy, nullable) NSMutableArray *primaryTags; 73 | @property (nonatomic, retain,nullable) NSMutableArray *mutuallyExclusiveTagGroups; 74 | @property (nonatomic, copy,nullable) NSMutableArray *allTags; 75 | @property (nonatomic, copy,nullable) NSMutableArray *todoStateGroups; 76 | @property (nonatomic, copy,nullable) NSMutableArray *priorities; 77 | @property (nonatomic) AppBadgeMode appBadgeMode; 78 | @property (nonatomic) ServerMode serverMode; 79 | @property (nonatomic) LaunchTab launchTab; 80 | @property (nonatomic, copy, nullable) NSString *dropboxIndex; 81 | @property (nonatomic, copy, nullable) NSString *encryptionPassword; 82 | 83 | + (nonnull Settings*)instance; 84 | - (void)resetPrimaryTagsAndTodoStates; 85 | - (void)resetAllTags; 86 | - (void)addPrimaryTag:(nonnull NSString*)tag; 87 | - (void)addTag:(nonnull NSString*)tag; 88 | - (void)addMutuallyExclusiveTagGroup:(nonnull NSArray*)mutexTags; 89 | - (void)addTodoStateGroup:(nonnull NSMutableArray*)todoStateGroup; 90 | - (bool)isTodoState:(nonnull NSString*)state; 91 | - (bool)isDoneState:(nonnull NSString*)state; 92 | - (void)addPriority:(nonnull NSString*)priority; 93 | - (bool)isPriority:(nonnull NSString*)priority; 94 | - (nullable NSString*)indexFilename; 95 | - (nullable NSURL*)baseUrl; 96 | - (nullable NSURL*)urlForFilename:(nonnull NSString*)filename; 97 | - (bool)isConfiguredProperly; 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /Classes/Settings/SettingsController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsController.swift 3 | // MobileOrg 4 | // 5 | // Created by Jamie Conlon on 07.01.17. 6 | // 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | 24 | import Foundation 25 | import UIKit 26 | 27 | class SettingsController: UITableViewController { 28 | 29 | @IBOutlet weak var appBadgeSwitch: UISwitch! 30 | @IBOutlet weak var autoCaptureSwitch: UISwitch! 31 | @IBOutlet weak var encryptionTextField: UITextField! 32 | @IBOutlet weak var versionLabel: UILabel! 33 | @IBOutlet weak var lastSyncLabel: UILabel! 34 | @IBOutlet weak var syncDetailLabel: UILabel! 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | 39 | if(Settings.instance().appBadgeMode == AppBadgeModeTotal) { 40 | appBadgeSwitch.setOn(true, animated: false) 41 | } 42 | if(Settings.instance().launchTab == LaunchTabCapture) { 43 | autoCaptureSwitch.setOn(true, animated: false) 44 | } 45 | 46 | self.versionLabel.text = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String 47 | 48 | NotificationCenter.default.addObserver( 49 | self, 50 | selector: #selector(onSyncComplete), 51 | name: NSNotification.Name(rawValue: "SyncComplete"), 52 | object: nil) 53 | 54 | } 55 | 56 | override func viewWillAppear(_ animated: Bool) { 57 | super.viewWillAppear(animated) 58 | 59 | switch Settings.instance().serverMode { 60 | case ServerModeDropbox: self.syncDetailLabel.text = "Dropbox" 61 | case ServerModeWebDav: self.syncDetailLabel.text = "WebDAV" 62 | case ServerModeICloud: self.syncDetailLabel.text = "iCloud" 63 | default: fatalError("Unexpected server mode: \(Settings.instance().serverMode)") 64 | } 65 | 66 | if let lastSync = Settings.instance().lastSync { 67 | let formatter = DateFormatter() 68 | formatter.dateFormat = "YYYY-MM-dd EEE HH:mm" 69 | self.lastSyncLabel.text = formatter.string(from: lastSync) 70 | } else { 71 | self.lastSyncLabel.text = "Not yet synced" 72 | } 73 | 74 | if let password = Settings.instance().encryptionPassword { 75 | self.encryptionTextField.text = password 76 | } 77 | 78 | self.tableView.reloadData() 79 | self.tableView.setNeedsDisplay() 80 | } 81 | 82 | override func didReceiveMemoryWarning() { 83 | super.didReceiveMemoryWarning() 84 | // Dispose of any resources that can be recreated. 85 | } 86 | 87 | @objc func onSyncComplete() { 88 | Settings.instance().lastSync = Date() 89 | } 90 | 91 | @IBAction func appBadgeToggle(sender: AnyObject) { 92 | if appBadgeSwitch.isOn { 93 | Settings.instance().appBadgeMode = AppBadgeModeTotal 94 | } else { 95 | Settings.instance().appBadgeMode = AppBadgeModeNone 96 | } 97 | } 98 | 99 | @IBAction func autoCaptureToggle(sender: AnyObject){ 100 | if autoCaptureSwitch.isOn { 101 | Settings.instance().launchTab = LaunchTabCapture 102 | } else { 103 | Settings.instance().launchTab = LaunchTabOutline 104 | } 105 | } 106 | 107 | @IBAction func showCredits(_ sender: UIButton) { 108 | if let url = URL(string: "https://mobileorg.github.io/credits") { 109 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 110 | } 111 | } 112 | 113 | @IBAction func showDocumentation(_ sender: UIButton) { 114 | if let url = URL(string: "https://mobileorg.github.io/documentation") { 115 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 116 | } 117 | } 118 | 119 | @IBAction func showLicense(_ sender: Any) { 120 | if let url = URL(string: "https://mobileorg.github.io/license") { 121 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 122 | } 123 | } 124 | 125 | @IBAction func encryptionPasswordChanged(sender: AnyObject){ 126 | self.encryptionTextField.resignFirstResponder() 127 | Settings.instance().encryptionPassword = encryptionTextField.text 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /Classes/Settings/TextInputCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextInputCell.swift 3 | // MobileOrg 4 | // 5 | // Created by Jamie Conlon on 07.01.17. 6 | // 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | 24 | import Foundation 25 | 26 | public class TextInputCell: UITableViewCell { 27 | 28 | @IBOutlet weak var textField: UITextField! 29 | @IBOutlet weak var textFieldLabel: UILabel! 30 | 31 | @IBAction func textFieldChanged(sender: AnyObject) { 32 | self.textField.resignFirstResponder() 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Classes/Status/StatusViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatusViewController.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | 26 | @interface StatusViewController : UIViewController { 27 | UIView *statusView; 28 | UILabel *activityLabel; 29 | UILabel *actionLabel; 30 | UIProgressView *progressBar; 31 | UIButton *abortButton; 32 | UIDeviceOrientation lastOrientation; 33 | } 34 | 35 | @property (nonatomic, readonly) UILabel *activityLabel; 36 | @property (nonatomic, readonly) UILabel *actionLabel; 37 | @property (nonatomic, readonly) UIButton *abortButton; 38 | @property (nonatomic, readonly) UIProgressView *progressBar; 39 | 40 | @property (nonatomic, copy) NSString *activityMessage; 41 | @property (nonatomic, copy) NSString *actionMessage; 42 | 43 | + (StatusViewController*)instance; 44 | - (void)show; 45 | - (void)hide; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Classes/Sync/SyncManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SyncManager.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | #import "TransferManagerDelegate.h" 25 | 26 | @class ChecksumFileParser; 27 | @class OrgFileParser; 28 | @class EditsFileParser; 29 | 30 | typedef enum { 31 | SyncManagerTransferStateIdle, 32 | SyncManagerTransferStateDownloadingEditsFile, 33 | SyncManagerTransferStateUploadingEmptyEditsFile, 34 | SyncManagerTransferStateUploadingLocalChanges, 35 | SyncManagerTransferStateDownloadingChecksums, 36 | SyncManagerTransferStateDownloadingOrgFiles, 37 | } SyncManagerTransferState; 38 | 39 | @interface SyncManager : NSObject { 40 | SyncManagerTransferState currentState; 41 | 42 | ChecksumFileParser *checksumParser; 43 | OrgFileParser *orgFileParser; 44 | EditsFileParser *editsFileParser; 45 | 46 | NSMutableArray *downloadedFiles; 47 | 48 | NSString *transferState; 49 | NSString *transferFilename; 50 | int progressTotal; 51 | int progressCurrent; 52 | 53 | bool changedEditsFile; 54 | } 55 | 56 | @property (nonatomic, copy) NSString *transferState; 57 | @property (nonatomic, copy) NSString *transferFilename; 58 | @property (nonatomic) int progressTotal; 59 | @property (nonatomic) int progressCurrent; 60 | 61 | + (SyncManager*)instance; 62 | - (void)sync; 63 | - (void)abort; 64 | 65 | - (void)updateStatus; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Classes/Sync/TransferContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransferContext.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #ifndef __GNUC__ 24 | #define __asm__ asm 25 | #endif 26 | 27 | __asm__(".weak_reference _OBJC_CLASS_$_NSURL"); 28 | 29 | #import 30 | #import "TransferManagerDelegate.h" 31 | 32 | typedef enum { 33 | TransferTypeDownload, 34 | TransferTypeUpload 35 | } TransferType; 36 | 37 | @interface TransferContext : NSObject { 38 | NSURL *remoteUrl; 39 | NSString *localFile; 40 | TransferType transferType; 41 | __unsafe_unretained id delegate; 42 | NSString *errorText; 43 | bool success; 44 | bool abortOnFailure; 45 | int statusCode; 46 | bool dummy; 47 | } 48 | 49 | @property (nonatomic, copy) NSURL *remoteUrl; 50 | @property (nonatomic, copy) NSString *localFile; 51 | @property (nonatomic) TransferType transferType; 52 | @property (nonatomic, assign) id delegate; 53 | @property (nonatomic) int statusCode; 54 | @property (nonatomic, copy) NSString *errorText; 55 | @property (nonatomic) bool abortOnFailure; 56 | @property (nonatomic) bool success; 57 | @property (nonatomic) bool dummy; 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Classes/Sync/TransferContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // TransferContext.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "TransferContext.h" 24 | 25 | @implementation TransferContext 26 | 27 | @synthesize remoteUrl; 28 | @synthesize localFile; 29 | @synthesize transferType; 30 | @synthesize delegate; 31 | @synthesize statusCode; 32 | @synthesize errorText; 33 | @synthesize abortOnFailure; 34 | @synthesize success; 35 | @synthesize dummy; 36 | 37 | - (id)init { 38 | if (self = [super init]) { 39 | self.remoteUrl = nil; 40 | self.localFile = @""; 41 | self.errorText = @""; 42 | self.statusCode = 0; 43 | self.delegate = nil; 44 | self.dummy = false; 45 | } 46 | return self; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Classes/Sync/TransferManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransferManager.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class TransferContext; 26 | 27 | @interface TransferManager : NSObject { 28 | } 29 | 30 | + (TransferManager*)instance; 31 | - (void)enqueueTransfer:(TransferContext*)transfer; 32 | - (void)pause; 33 | - (void)resume; 34 | - (bool)busy; 35 | - (int)queueSize; 36 | - (void)abort; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Classes/Sync/TransferManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // TransferManager.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "TransferManager.h" 24 | 25 | @implementation TransferManager 26 | 27 | + (TransferManager*)instance { 28 | return nil; 29 | } 30 | 31 | - (void)enqueueTransfer:(TransferContext*)transfer { 32 | } 33 | 34 | - (void)pause { 35 | } 36 | 37 | - (void)resume { 38 | } 39 | 40 | - (bool)busy { 41 | return true; 42 | } 43 | 44 | - (int)queueSize { 45 | return 0; 46 | } 47 | 48 | - (void)abort { 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Classes/Sync/TransferManagerDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransferManagerDelegate.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | 26 | @class TransferContext; 27 | 28 | 29 | @protocol TransferManagerDelegate 30 | @optional 31 | - (void)transferComplete:(TransferContext*)context; 32 | - (void)transferFailed:(TransferContext*)context; 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /Classes/Sync/WebDav/WebDavTransferManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // WebDavTransferManager.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2010 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | #import "TransferManager.h" 25 | 26 | @interface WebDavTransferManager : TransferManager { 27 | NSMutableArray *transfers; 28 | bool active; 29 | bool paused; 30 | TransferContext *activeTransfer; 31 | NSURLConnection *connection; 32 | NSMutableData *data; 33 | NSNumber *fileSize; 34 | } 35 | 36 | @property (nonatomic, retain) TransferContext *activeTransfer; 37 | @property (nonatomic, copy) NSNumber *fileSize; 38 | 39 | + (WebDavTransferManager*)instance; 40 | - (void)enqueueTransfer:(TransferContext*)transfer; 41 | - (void)pause; 42 | - (void)resume; 43 | - (bool)busy; 44 | - (int)queueSize; 45 | - (void)abort; 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Classes/ThirdParty/Reachability/Reachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Tony Million. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | #import 30 | 31 | //! Project version number for MacOSReachability. 32 | FOUNDATION_EXPORT double ReachabilityVersionNumber; 33 | 34 | //! Project version string for MacOSReachability. 35 | FOUNDATION_EXPORT const unsigned char ReachabilityVersionString[]; 36 | 37 | /** 38 | * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. 39 | * 40 | * @see http://nshipster.com/ns_enum-ns_options/ 41 | **/ 42 | #ifndef NS_ENUM 43 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type 44 | #endif 45 | 46 | extern NSString *const kReachabilityChangedNotification; 47 | 48 | typedef NS_ENUM(NSInteger, NetworkStatus) { 49 | // Apple NetworkStatus Compatible Names. 50 | NotReachable = 0, 51 | ReachableViaWiFi = 2, 52 | ReachableViaWWAN = 1 53 | }; 54 | 55 | @class Reachability; 56 | 57 | typedef void (^NetworkReachable)(Reachability * reachability); 58 | typedef void (^NetworkUnreachable)(Reachability * reachability); 59 | typedef void (^NetworkReachability)(Reachability * reachability, SCNetworkConnectionFlags flags); 60 | 61 | 62 | @interface Reachability : NSObject 63 | 64 | @property (nonatomic, copy) NetworkReachable reachableBlock; 65 | @property (nonatomic, copy) NetworkUnreachable unreachableBlock; 66 | @property (nonatomic, copy) NetworkReachability reachabilityBlock; 67 | 68 | @property (nonatomic, assign) BOOL reachableOnWWAN; 69 | 70 | 71 | +(instancetype)reachabilityWithHostname:(NSString*)hostname; 72 | // This is identical to the function above, but is here to maintain 73 | //compatibility with Apples original code. (see .m) 74 | +(instancetype)reachabilityWithHostName:(NSString*)hostname; 75 | +(instancetype)reachabilityForInternetConnection; 76 | +(instancetype)reachabilityWithAddress:(void *)hostAddress; 77 | +(instancetype)reachabilityForLocalWiFi; 78 | +(instancetype)reachabilityWithURL:(NSURL*)url; 79 | 80 | -(instancetype)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; 81 | 82 | -(BOOL)startNotifier; 83 | -(void)stopNotifier; 84 | 85 | -(BOOL)isReachable; 86 | -(BOOL)isReachableViaWWAN; 87 | -(BOOL)isReachableViaWiFi; 88 | 89 | // WWAN may be available, but not active until a connection has been established. 90 | // WiFi may require a connection for VPN on Demand. 91 | -(BOOL)isConnectionRequired; // Identical DDG variant. 92 | -(BOOL)connectionRequired; // Apple's routine. 93 | // Dynamic, on demand connection? 94 | -(BOOL)isConnectionOnDemand; 95 | // Is user intervention required? 96 | -(BOOL)isInterventionRequired; 97 | 98 | -(NetworkStatus)currentReachabilityStatus; 99 | -(SCNetworkReachabilityFlags)reachabilityFlags; 100 | -(NSString*)currentReachabilityString; 101 | -(NSString*)currentReachabilityFlags; 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /Classes/Utilities/DataUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // DataUtils.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class Node; 26 | @class LocalEditAction; 27 | @class FileChecksum; 28 | 29 | bool Save(void); 30 | 31 | void ClearAllFileChecksums(void); 32 | 33 | NSString *ChecksumForFile(NSString *filename); 34 | 35 | FileChecksum *CreateChecksumForFile(NSString *filename, NSString *checksum); 36 | 37 | Node *RootNode(void); 38 | 39 | // Find a Node instance given an id:someid or an olp:someolp 40 | Node *ResolveNode(NSString *someId); 41 | 42 | // Find a Node instance with a given node id 43 | Node *NodeWithId(NSString *nodeId); 44 | 45 | // Find a Node instance with a given outline path 46 | Node *NodeWithOutlinePath(NSString *outlinePath); 47 | 48 | // Find a level-0 Node instance for a given filename 49 | Node *NodeWithFilename(NSString *filename); 50 | 51 | NSArray *AllFileNodes(void); 52 | 53 | void DeleteNode(Node *node); 54 | 55 | void DeleteNodesWithFilename(NSString* filename); 56 | 57 | void DeleteAllNodes(void); 58 | 59 | LocalEditAction *FindOrCreateLocalEditActionForNode(NSString *actionType, Node *node, bool *created); 60 | 61 | NSArray *AllLocalEditActions(void); 62 | 63 | NSArray *AllLocalEditActionsForNode(Node *node); 64 | 65 | int CountLocalEditActions(void); 66 | 67 | NSString *EscapeStringForOutlinePath(NSString *input); 68 | 69 | NSString *EscapeStringForLinkTitle(NSString *input); 70 | 71 | void DeleteLocalEditActions(void); 72 | 73 | void DeleteLocalEditAction(LocalEditAction *action); 74 | 75 | NSArray *AllNotes(void); 76 | 77 | NSArray *AllActiveNotes(void); 78 | 79 | int CountNotes(void); 80 | 81 | int CountLocalNotes(void); 82 | 83 | void DeleteNotes(void); 84 | 85 | bool LocalNoteWithModifications(NSString *noteId); 86 | -------------------------------------------------------------------------------- /Classes/Utilities/GlobalUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalUtils.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | @class MobileOrgAppDelegate; 26 | 27 | MobileOrgAppDelegate *AppInstance(void); 28 | 29 | NSString *UUID(void); 30 | 31 | NSString *FileWithName(NSString *name); 32 | 33 | NSString *TemporaryFilename(void); 34 | 35 | void DeleteFile(NSString *filename); 36 | 37 | void UpdateEditActionCount(void); 38 | 39 | NSString *EscapeHeadings(NSString *original); 40 | 41 | void UpdateAppBadge(void); 42 | 43 | BOOL IsIpad(void); 44 | 45 | NSString *ReadPossiblyEncryptedFile(NSString *filename, NSString * __strong *error); 46 | 47 | @interface NSData (AES256) 48 | - (NSData *)AES256EncryptWithKey:(NSString *)passphrase; 49 | - (NSData *)AES256DecryptWithKey:(NSString *)passphrase; 50 | @end 51 | -------------------------------------------------------------------------------- /Classes/Utilities/RoundedLabel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RoundedLabel.swift 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 07/10/2019. 6 | // Copyright © 2019 Artem Loenko. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | @objc 24 | final class RoundedLabel: UILabel { 25 | 26 | private let textInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) 27 | private let cornerRadius: CGFloat = 6 28 | 29 | @objc 30 | override init(frame: CGRect) { 31 | super.init(frame: frame) 32 | self.font = .boldSystemFont(ofSize: 10) 33 | self.textColor = .mo_white 34 | self.backgroundColor = .mo_red 35 | self.clipsToBounds = true 36 | self.layer.cornerRadius = self.cornerRadius 37 | } 38 | 39 | required init?(coder: NSCoder) { 40 | fatalError("init(coder:) has not been implemented") 41 | } 42 | 43 | override var text: String? { 44 | didSet { self.sizeToFit() } 45 | } 46 | 47 | override func drawText(in rect: CGRect) { 48 | super.drawText(in: rect.inset(by: self.textInsets)) 49 | } 50 | 51 | override func sizeThatFits(_ size: CGSize) -> CGSize { 52 | let size = super.sizeThatFits(size) 53 | return CGSize(width: size.width + (self.textInsets.left + self.textInsets.right), height: self.frame.height) 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Classes/Utilities/StatusUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatusUtils.h 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | // TODO: it would be nice if this was more like: 26 | // PushActivity("Downloading Org files") 27 | // - PushStatus("filename.org") 28 | // PopActivity("Downloading Org files") 29 | 30 | void ShowStatusView(void); 31 | void HideStatusView(void); 32 | -------------------------------------------------------------------------------- /Classes/Utilities/StatusUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // StatusUtils.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import "StatusUtils.h" 24 | 25 | void ShowStatusView() { 26 | 27 | } 28 | 29 | void HideStatusView() { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Classes/Utilities/UIAlertController+MobileOrg.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertController+MobileOrg.swift 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 10/10/2019. 6 | // Copyright © 2019 Artem Loenko. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | import Foundation 24 | 25 | extension UIAlertController { 26 | 27 | @objc class func show(_ title: String, message: String) { 28 | self.show(title, message: message, confirmAction: nil, cancelAction: nil) 29 | } 30 | 31 | @objc class func show(_ title: String, message: String, confirmAction: ((UIAlertAction) -> Void)? = nil, cancelAction: ((UIAlertAction) -> Void)? = nil) { 32 | let controller = UIAlertController(title: title, message: message, preferredStyle: .alert) 33 | let ok = UIAlertAction(title: "OK", style: .default, handler: confirmAction) 34 | controller.addAction(ok) 35 | if cancelAction != nil { 36 | let cancel = UIAlertAction(title: "Cancel", style: .cancel, handler: cancelAction) 37 | controller.addAction(cancel) 38 | } 39 | guard let presentingViewController = self.mo_presentingViewController else { 40 | fatalError("Cannot find a proper presenting view controller.") 41 | } 42 | DispatchQueue.main.async { 43 | presentingViewController.present(controller, animated: true, completion: nil) 44 | } 45 | } 46 | 47 | private static var mo_presentingViewController: UIViewController? { 48 | let rootViewController = UIApplication.shared.delegate?.window??.rootViewController 49 | if let controller = (rootViewController as? UINavigationController)?.topViewController { 50 | return controller 51 | } else if let controller = (rootViewController as? UITabBarController)?.selectedViewController { 52 | return controller 53 | } 54 | return rootViewController 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /Classes/Utilities/UIColor+MobileOrg.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+MobileOrg.swift 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 07/10/2019. 6 | // Copyright © 2019 Artem Loenko. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | import Foundation 24 | 25 | extension UIColor { 26 | 27 | @objc(mo_textColor) 28 | static let mo_text: UIColor = { 29 | if #available(iOS 13, *) { return .label } 30 | return .black 31 | }() 32 | 33 | @objc(mo_secondaryTextColor) 34 | static let mo_secondaryText: UIColor = { 35 | if #available(iOS 13, *) { return .secondaryLabel } 36 | return .mo_darkGray 37 | }() 38 | 39 | @objc(mo_tertiaryTextColor) 40 | static let mo_tertiaryText: UIColor = { 41 | if #available(iOS 13, *) { return .tertiaryLabel } 42 | return .mo_gray 43 | }() 44 | 45 | @objc(mo_backgroundColor) 46 | static let mo_background: UIColor = { 47 | if #available(iOS 13, *) { return .systemBackground } 48 | return .white 49 | }() 50 | 51 | @objc(mo_grayColor) 52 | static let mo_gray: UIColor = { 53 | if #available(iOS 13, *) { return .systemGray2 } 54 | return .gray 55 | }() 56 | 57 | @objc(mo_darkGrayColor) 58 | static let mo_darkGray: UIColor = { 59 | if #available(iOS 13, *) { return .systemGray } 60 | return .darkGray 61 | }() 62 | 63 | @objc(mo_lightGrayColor) 64 | static let mo_lightGray: UIColor = { 65 | if #available(iOS 13, *) { return .systemGray3 } 66 | return .lightGray 67 | }() 68 | 69 | @objc(mo_lightLightGrayColor) 70 | static let mo_lightLightGray: UIColor = { 71 | if #available(iOS 13, *) { return .systemGray5 } 72 | return UIColor(white: 0.1, alpha: 0.85) 73 | }() 74 | 75 | @objc(mo_whiteColor) static let mo_white: UIColor = { return .white }() 76 | @objc(mo_redColor) static let mo_red: UIColor = { return .systemRed }() 77 | @objc(mo_greenColor) static let mo_green: UIColor = { return .systemGreen }() 78 | @objc(mo_blueColor) static let mo_blue: UIColor = { return .systemBlue }() 79 | @objc(mo_orangeColor) static let mo_orange: UIColor = { return .systemOrange }() 80 | @objc(mo_accentColor) static let mo_accent: UIColor = { return .mo_blue }() 81 | 82 | } 83 | -------------------------------------------------------------------------------- /Configuration/AppKey.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dropbox API Key 6 | 7 | AppKey 8 | YourAppKey 9 | AppSecret 10 | YourAppKeySecret 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Configuration/MobileOrg-AdHoc.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrg-AdHoc.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrg-Shared.xcconfig" 9 | 10 | BUNDLE_ID_SUFFIX = .adhoc 11 | ONLY_ACTIVE_ARCH = NO 12 | COPY_PHASE_STRIP = YES 13 | -------------------------------------------------------------------------------- /Configuration/MobileOrg-AppStore.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrg-AppStore.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrg-Shared.xcconfig" 9 | 10 | BUNDLE_ID_SUFFIX = 11 | ONLY_ACTIVE_ARCH = NO 12 | COPY_PHASE_STRIP = YES 13 | -------------------------------------------------------------------------------- /Configuration/MobileOrg-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrg-Debug.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrg-Shared.xcconfig" 9 | 10 | BUNDLE_ID_SUFFIX = .debug 11 | COPY_PHASE_STRIP = NO 12 | ENABLE_TESTABILITY = YES 13 | GCC_OPTIMIZATION_LEVEL = 0 14 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) 15 | SWIFT_OPTIMIZATION_LEVEL = -Onone 16 | -------------------------------------------------------------------------------- /Configuration/MobileOrg-Shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrg-Shared.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "Global.shared.xcconfig" 9 | 10 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon${BUNDLE_ID_SUFFIX} 11 | CODE_SIGN_ENTITLEMENTS = MobileOrg/MobileOrg.entitlements 12 | CURRENT_PROJECT_VERSION = 30 13 | DEVELOPMENT_TEAM = 59B7VFRF7R 14 | GCC_PREFIX_HEADER = MobileOrg_Prefix.pch 15 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) 16 | PRODUCT_BUNDLE_IDENTIFIER = com.mobileorg.mobileorg${BUNDLE_ID_SUFFIX} 17 | PRODUCT_NAME = MobileOrg 18 | SWIFT_OBJC_BRIDGING_HEADER = MobileOrg-Bridging-Header.h 19 | -------------------------------------------------------------------------------- /Configuration/MobileOrgTests-AdHoc.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrgTests-AdHoc.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrgTests-Shared.xcconfig" 9 | 10 | CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer 11 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 12 | ENABLE_NS_ASSERTIONS = NO 13 | ENABLE_STRICT_OBJC_MSGSEND = YES 14 | MTL_ENABLE_DEBUG_INFO = NO 15 | VALIDATE_PRODUCT = YES 16 | -------------------------------------------------------------------------------- /Configuration/MobileOrgTests-AppStore.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrgTests-AppStore.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrgTests-Shared.xcconfig" 9 | 10 | CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer 11 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 12 | ENABLE_NS_ASSERTIONS = NO 13 | ENABLE_STRICT_OBJC_MSGSEND = YES 14 | MTL_ENABLE_DEBUG_INFO = NO 15 | VALIDATE_PRODUCT = YES 16 | -------------------------------------------------------------------------------- /Configuration/MobileOrgTests-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrgTests-Debug.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "MobileOrgTests-Shared.xcconfig" 9 | 10 | DEBUG_INFORMATION_FORMAT = dwarf 11 | GCC_OPTIMIZATION_LEVEL = 0 12 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) 13 | MTL_ENABLE_DEBUG_INFO = YES 14 | SWIFT_OPTIMIZATION_LEVEL = -Onone 15 | -------------------------------------------------------------------------------- /Configuration/MobileOrgTests-Shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // MobileOrgTests-Shared.xcconfig 3 | // 4 | // Generated by BuildSettingExtractor on 2019-12-29 5 | // https://github.com/dempseyatgithub/BuildSettingExtractor 6 | // 7 | 8 | #include "Global.shared.xcconfig" 9 | 10 | BUNDLE_LOADER = $(TEST_HOST) 11 | COPY_PHASE_STRIP = NO 12 | DEVELOPMENT_TEAM = 9VWR9JYXC6 13 | PRODUCT_BUNDLE_IDENTIFIER = de.schnuddelhuddel.MobileOrgTests 14 | PRODUCT_NAME = $(TARGET_NAME) 15 | SWIFT_OBJC_BRIDGING_HEADER = MobileOrgTests/MobileOrgTests-Bridging-Header.h 16 | TEST_HOST = $(BUILT_PRODUCTS_DIR)/MobileOrg.app/MobileOrg 17 | -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Default-568h@2x.png -------------------------------------------------------------------------------- /Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | get-task-allow 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Global.shared.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Global.shared.xcconfig 3 | // MobileOrg 4 | // 5 | // Created by Artem Loenko on 10/03/2020. 6 | // Copyright © 2020 Sean Escriva. All rights reserved. 7 | // 8 | 9 | // Configuration settings file format documentation can be found at: 10 | // https://help.apple.com/xcode/#/dev745c5c974 11 | 12 | // Shared settings between all targets 13 | 14 | ALWAYS_SEARCH_USER_PATHS = NO 15 | CLANG_ANALYZER_NONNULL = YES 16 | CLANG_ENABLE_MODULES = YES 17 | CLANG_ENABLE_OBJC_ARC = YES 18 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT) $(PROJECT_DIR) 19 | GCC_NO_COMMON_BLOCKS = YES 20 | GCC_PRECOMPILE_PREFIX_HEADER = YES 21 | IPHONEOS_DEPLOYMENT_TARGET = 12.0 22 | INFOPLIST_FILE = MobileOrg-Info.plist 23 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 24 | ONLY_ACTIVE_ARCH = YES 25 | SDKROOT = iphoneos 26 | SWIFT_INSTALL_OBJC_HEADER = YES 27 | SWIFT_VERSION = 5.0 28 | TARGETED_DEVICE_FAMILY = 1,2 29 | VERSIONING_SYSTEM = apple-generic 30 | 31 | // Warnings & Errors 32 | 33 | CLANG_ANALYZER_GCD_PERFORMANCE = YES 34 | CLANG_WARN_ASSIGN_ENUM = YES 35 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES 36 | CLANG_WARN_BOOL_CONVERSION = YES 37 | CLANG_WARN_CONSTANT_CONVERSION = YES 38 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 39 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR 40 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES 41 | CLANG_WARN_EMPTY_BODY = YES 42 | CLANG_WARN_ENUM_CONVERSION = YES 43 | CLANG_WARN_INFINITE_RECURSION = YES 44 | CLANG_WARN_INT_CONVERSION = YES 45 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES 46 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 47 | //CLANG_WARN_OBJC_INTERFACE_IVARS = YES // Consider to enable and switch to the modern Objective C 2.0 syntax 48 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES 49 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 50 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR 51 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES 52 | CLANG_WARN_SUSPICIOUS_MOVES = YES 53 | CLANG_WARN_UNREACHABLE_CODE = YES 54 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 55 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES 56 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES 57 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 58 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR 59 | GCC_WARN_SHADOW = YES 60 | GCC_WARN_SIGN_COMPARE = YES 61 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 62 | GCC_WARN_UNDECLARED_SELECTOR = YES 63 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE 64 | GCC_WARN_UNUSED_FUNCTION = YES 65 | GCC_WARN_UNUSED_VARIABLE = YES 66 | -------------------------------------------------------------------------------- /Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /MobileOrg-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "TransferManager.h" 6 | #import "TransferContext.h" 7 | #import "StatusUtils.h" 8 | #import "SyncManager.h" 9 | #import "Note.h" 10 | #import "Node.h" 11 | 12 | #import "Settings.h" 13 | #import "DataUtils.h" 14 | #import "GlobalUtils.h" 15 | #import "SearchController.h" 16 | #import "OutlineViewController.h" 17 | #import "SessionManager.h" 18 | #import "MobileOrgAppDelegate.h" 19 | #import "OutlineState.h" 20 | -------------------------------------------------------------------------------- /MobileOrg-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.7.5 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Editor 28 | CFBundleURLName 29 | 30 | CFBundleURLSchemes 31 | 32 | db-${APP_KEY} 33 | 34 | 35 | 36 | CFBundleVersion 37 | 32 38 | LSApplicationQueriesSchemes 39 | 40 | dbapi-2 41 | dbapi-8-emm 42 | 43 | LSRequiresIPhoneOS 44 | 45 | NSMainNibFile 46 | MainWindow 47 | NSMainNibFile~ipad 48 | MainWindow-iPad 49 | NSUbiquitousContainers 50 | 51 | iCloud.com.mobileorg.mobileorg 52 | 53 | NSUbiquitousContainerIsDocumentScopePublic 54 | 55 | NSUbiquitousContainerName 56 | ${PRODUCT_NAME} 57 | NSUbiquitousContainerSupportedFolderLevels 58 | Any 59 | 60 | 61 | UILaunchStoryboardName 62 | Launch Screen 63 | UIRequiresFullScreen 64 | 65 | UISupportedInterfaceOrientations 66 | 67 | UIInterfaceOrientationPortrait 68 | UIInterfaceOrientationPortraitUpsideDown 69 | UIInterfaceOrientationLandscapeLeft 70 | UIInterfaceOrientationLandscapeRight 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /MobileOrg.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MobileOrg.xcodeproj/project.xcworkspace/xcshareddata/MobileOrg.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | B6EE7963-D68F-4A61-B60D-C9F37C84A57D 9 | IDESourceControlProjectName 10 | MobileOrg 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 179CA3D8-FBC6-4D87-9847-AD6FC4A1753E 14 | ssh://github.com/MobileOrg/mobileorg.git 15 | 16 | IDESourceControlProjectPath 17 | MobileOrg.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 179CA3D8-FBC6-4D87-9847-AD6FC4A1753E 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/MobileOrg/mobileorg.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 179CA3D8-FBC6-4D87-9847-AD6FC4A1753E 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 179CA3D8-FBC6-4D87-9847-AD6FC4A1753E 36 | IDESourceControlWCCName 37 | mobileorg 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MobileOrg.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "Alamofire", 6 | "repositoryURL": "https://github.com/Alamofire/Alamofire.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "75bba56748359f297a83f620d45f72cf4ebee4e7", 10 | "version": "4.8.2" 11 | } 12 | }, 13 | { 14 | "package": "SwiftyDropbox", 15 | "repositoryURL": "https://github.com/dropbox/SwiftyDropbox.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "1a99f77ae123722322af455cb71a96e72eb153e1", 19 | "version": "6.0.3" 20 | } 21 | } 22 | ] 23 | }, 24 | "version": 1 25 | } 26 | -------------------------------------------------------------------------------- /MobileOrg.xcodeproj/xcshareddata/xcschemes/MobileOrg.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 52 | 53 | 54 | 55 | 56 | 57 | 69 | 71 | 77 | 78 | 79 | 80 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-Small-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "idiom" : "ipad", 47 | "size" : "20x20", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "ipad", 52 | "size" : "20x20", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "idiom" : "ipad", 57 | "size" : "29x29", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "idiom" : "ipad", 62 | "size" : "29x29", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "idiom" : "ipad", 67 | "size" : "40x40", 68 | "scale" : "1x" 69 | }, 70 | { 71 | "idiom" : "ipad", 72 | "size" : "40x40", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-76.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "76x76", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-76@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "83.5x83.5", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-83.5@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "1024x1024", 95 | "idiom" : "ios-marketing", 96 | "filename" : "logo-beta.png", 97 | "scale" : "1x" 98 | } 99 | ], 100 | "info" : { 101 | "version" : 1, 102 | "author" : "xcode" 103 | } 104 | } -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-76.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-Small-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-Small-60@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-Small-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/Icon-Small-60@3x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/logo-beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.adhoc.appiconset/logo-beta.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-Small-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "idiom" : "ipad", 47 | "size" : "20x20", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "ipad", 52 | "size" : "20x20", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "idiom" : "ipad", 57 | "size" : "29x29", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "idiom" : "ipad", 62 | "size" : "29x29", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "idiom" : "ipad", 67 | "size" : "40x40", 68 | "scale" : "1x" 69 | }, 70 | { 71 | "idiom" : "ipad", 72 | "size" : "40x40", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-76.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "76x76", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-76@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "83.5x83.5", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-83.5@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "1024x1024", 95 | "idiom" : "ios-marketing", 96 | "filename" : "logo.png", 97 | "scale" : "1x" 98 | } 99 | ], 100 | "info" : { 101 | "version" : 1, 102 | "author" : "xcode" 103 | } 104 | } -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-Small-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-Small-60@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-Small-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/Icon-Small-60@3x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.appiconset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.appiconset/logo.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-Small-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "idiom" : "ipad", 47 | "size" : "20x20", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "ipad", 52 | "size" : "20x20", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "idiom" : "ipad", 57 | "size" : "29x29", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "idiom" : "ipad", 62 | "size" : "29x29", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "idiom" : "ipad", 67 | "size" : "40x40", 68 | "scale" : "1x" 69 | }, 70 | { 71 | "idiom" : "ipad", 72 | "size" : "40x40", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-76.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "76x76", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-76@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "83.5x83.5", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-83.5@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "1024x1024", 95 | "idiom" : "ios-marketing", 96 | "filename" : "logo-debug.png", 97 | "scale" : "1x" 98 | } 99 | ], 100 | "info" : { 101 | "version" : 1, 102 | "author" : "xcode" 103 | } 104 | } -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-76.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-Small-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-Small-60@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-Small-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/Icon-Small-60@3x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/AppIcon.debug.appiconset/logo-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/AppIcon.debug.appiconset/logo-debug.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/IOrgIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "org-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "org-icon@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "org-icon@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/IOrgIcon.imageset/org-icon@3x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/SplashBackground.imageset/Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/SplashBackground.imageset/Background.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/SplashBackground.imageset/Background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/SplashBackground.imageset/Background@2x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/SplashBackground.imageset/Background@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg/Images.xcassets/SplashBackground.imageset/Background@3x.png -------------------------------------------------------------------------------- /MobileOrg/Images.xcassets/SplashBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Background.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Background@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Background@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /MobileOrg/MobileOrg.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.icloud-container-identifiers 8 | 9 | iCloud.com.mobileorg.mobileorg 10 | 11 | com.apple.developer.icloud-services 12 | 13 | CloudDocuments 14 | 15 | com.apple.developer.ubiquity-container-identifiers 16 | 17 | iCloud.com.mobileorg.mobileorg 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /MobileOrg2.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | MobileOrg 2.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /MobileOrg2.xcdatamodeld/MobileOrg 2.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /MobileOrg2.xcdatamodeld/MobileOrg.xcdatamodel/elements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg2.xcdatamodeld/MobileOrg.xcdatamodel/elements -------------------------------------------------------------------------------- /MobileOrg2.xcdatamodeld/MobileOrg.xcdatamodel/layout: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrg2.xcdatamodeld/MobileOrg.xcdatamodel/layout -------------------------------------------------------------------------------- /MobileOrgTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.7.1 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MobileOrgTests/MobileOrgTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // © 2016 Mario Martelli 2 | // 3 | // This program is free software; you can redistribute it and/or 4 | // modify it under the terms of the GNU General Public License 5 | // as published by the Free Software Foundation; either version 2 6 | // of the License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program; if not, write to the Free Software 15 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | // 17 | 18 | // 19 | // Use this file to import your target's public headers that you would like to expose to Swift. 20 | // 21 | #import "MobileOrg-Bridging-Header.h" 22 | #import "OrgfileParser.h" 23 | #import "Node.h" 24 | #import "DataUtils.h" 25 | #import "Settings.h" 26 | #import "TagEditController.h" 27 | -------------------------------------------------------------------------------- /MobileOrgTests/NodeTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NodeTests.m 3 | // MobileOrg 4 | // 5 | // Created by Mario Martelli on 11.12.16. 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 | // 21 | 22 | 23 | #import 24 | #import "Node.h" 25 | 26 | @interface NodeTest : XCTestCase { 27 | NSManagedObjectModel* model_; 28 | NSPersistentStoreCoordinator* coordinator_; 29 | NSManagedObjectContext* context_; 30 | } 31 | 32 | @property (nonatomic, retain) NSManagedObjectModel* model_; 33 | @property (nonatomic, retain) NSPersistentStoreCoordinator* coordinator_; 34 | @property (nonatomic, retain) NSManagedObjectContext* context_; 35 | 36 | @end 37 | 38 | @implementation NodeTest 39 | 40 | @synthesize model_; 41 | @synthesize coordinator_; 42 | @synthesize context_; 43 | 44 | - (BOOL)shouldRunOnMainThread { 45 | // By default NO, but if you have a UI test or test dependent on running on the main thread return YES 46 | return NO; 47 | } 48 | 49 | - (void)setUp { 50 | // Run at start of all tests in the class 51 | 52 | 53 | NSString *path = [[NSBundle mainBundle] pathForResource:@"MobileOrg2" ofType:@"momd"]; 54 | NSURL *momURL = [NSURL fileURLWithPath:path]; 55 | self.model_ = [[NSManagedObjectModel alloc] initWithContentsOfURL:momURL]; 56 | 57 | self.coordinator_ = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:model_]; 58 | self.context_ = [[NSManagedObjectContext alloc] initWithConcurrencyType: NSMainQueueConcurrencyType]; 59 | [context_ setPersistentStoreCoordinator:coordinator_]; 60 | } 61 | 62 | - (void)tearDown { 63 | // Run at end of all tests in the class 64 | } 65 | 66 | - (void)testDrawerGetsHiddenInDisplayedBody { 67 | Node *node = (Node *)[NSEntityDescription insertNewObjectForEntityForName:@"Node" 68 | inManagedObjectContext:context_]; 69 | node.body = @" :DRAWER: \n foo \n :END: \n bar\n"; 70 | 71 | XCTAssertEqualObjects(@" bar", [node bodyForDisplay], 72 | @"The text outside the drawer should not change.", nil); 73 | } 74 | 75 | - (void)testMultipleDrawersGetHiddenInDisplayedBody { 76 | Node *node = (Node *)[NSEntityDescription insertNewObjectForEntityForName:@"Node" 77 | inManagedObjectContext:context_]; 78 | node.body = @" :DRAWER: \n foo \n :END: \n :DRAWER2: \n bar \n :END: \n baz\n"; 79 | 80 | XCTAssertEqualObjects(@" baz", [node bodyForDisplay], 81 | @"The text outside the drawer should not change.", nil); 82 | } 83 | 84 | - (void)testDrawersRemovedFromMiddleOfBodyInDisplayedBody { 85 | Node *node = (Node *)[NSEntityDescription insertNewObjectForEntityForName:@"Node" 86 | inManagedObjectContext:context_]; 87 | node.body = @"foo \n :DRAWER: \n bar \n :END: \n baz \n"; 88 | 89 | XCTAssertEqualObjects(@"foo \n baz", [node bodyForDisplay], 90 | @"The text outside the drawer should be concatenated.", nil); 91 | } 92 | 93 | - (void)testIsLink { 94 | Node *node = (Node *)[NSEntityDescription insertNewObjectForEntityForName:@"Node" 95 | inManagedObjectContext:context_]; 96 | 97 | node.heading = @"[[file:persönlich.org][persönlich.org]]"; 98 | XCTAssertTrue(node.isLink); 99 | } 100 | 101 | - (void)testScheduledAndDeadlineRemovedFromMiddleOfBodyInDisplayedBody { 102 | Node *node = (Node *)[NSEntityDescription insertNewObjectForEntityForName:@"Node" 103 | inManagedObjectContext:context_]; 104 | node.body = @"foo \n DEADLINE: <2020-01-01 Tue> SCHEDULED: <2020-01-01 Sat> \n baz \n"; 105 | 106 | XCTAssertEqualObjects(@"foo \n baz", [node bodyForDisplay], 107 | @"The text outside the scheduled & deadline notes should be concatenated.", nil); 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/MobileOrgTestingSample.org: -------------------------------------------------------------------------------- 1 | #+TITLE: MobileOrg iOS TestData 2 | #+DATE: <2017-01-17 Tue> 3 | #+AUTHOR: Org User 4 | #+EMAIL: org.user@org.mode 5 | #+CREATOR: Emacs 25.1.1 (Org mode version 9.0.3) 6 | 7 | * First node 8 | This file is a generic syntax test for org rendering and should represent a 9 | wide scenario of the types of data contained in an org file. It can be used to 10 | test rendering and handling of data in org 11 | ** a local file link with no description 12 | [[//127.0.0.1/c$$]] 13 | ** more link types? 14 | * Second node 15 | This needs =some more explanation= and could be a larger paragraph maybe 16 | ** hipsters were here 17 | Hard formatted line endings. 18 | Shoreditch heirloom bushwick, kogi man braid marfa godard brooklyn cray la 19 | croix vinyl green juice banh mi. Kale chips vegan tumeric, poutine brooklyn 20 | woke chambray biodiesel hot chicken. Kogi direct trade drinking vinegar 21 | everyday carry vice tacos, sartorial cronut gochujang tumeric seitan la croix 22 | pinterest hashtag. Kinfolk skateboard air plant lumbersexual jianbing 23 | gastropub. Cornhole paleo franzen, you probably haven't heard of them cronut 24 | pickled polaroid coloring book four loko poke tacos pitchfork keffiyeh four 25 | dollar toast. XOXO try-hard post-ironic master cleanse chia, aesthetic viral 26 | occupy brooklyn. Fixie cliche quinoa, aesthetic pickled 3 wolf moon bicycle 27 | rights tote bag messenger bag. 28 | ** return of the hipster 29 | single line of text, word wrap, Synth intelligentsia enamel pin semiotics vinyl leggings. IPhone flexitarian swag next level humblebrag. Brunch tacos echo park, gochujang put a bird on it pug meditation. Jianbing polaroid quinoa, schlitz fanny pack disrupt vape messenger bag etsy hell of gochujang ethical. Poutine cray PBR&B lyft. Unicorn cred next level, chartreuse post-ironic woke authentic live-edge farm-to-table. Iceland aesthetic synth, marfa green juice hashtag vice photo booth banh mi fap taxidermy glossier meditation. 30 | **** Skipping one level 31 | * Third node with a todo list [1/3] 32 | ** TODO do stuff here 33 | :PROPERTIES: 34 | :ID: 35AB7EC7-4D8A-4F31-A2F8-D92D5C143720 35 | :END: 36 | *** part one 37 | **** sub section A 38 | **** sub section B 39 | *** part two 40 | - A simple list 41 | - nothing very critical 42 | - but eventually work to do 43 | *** part three 44 | | table | of | uselessness | 45 | |---------+-------+-------------| 46 | | ~one~ | table | row | 47 | | ~two~ | small | changes | 48 | | ~three~ | might | suffice | 49 | ** DONE some more stuff maybe 50 | CLOSED: [2017-01-17 Tue 16:44] 51 | ** TODO waiting on this one a little longer 52 | :PROPERTIES: 53 | :ID: C8EC5E67-CD38-4FE6-A3BC-F6ED9996B74B 54 | :END: 55 | **** Skipping on 1 level 56 | * And one more thing [50%] 57 | ** TODO write some code 58 | :PROPERTIES: 59 | :ID: 2FD7B7D2-02BD-4A18-A9E5-FCF80949F62E 60 | :END: 61 | #+BEGIN_SRC lisp 62 | (defun multiply-by-seven (number) ; Interactive version. 63 | "Multiply NUMBER by seven." 64 | (interactive "p") 65 | (message "The result is %d" (* 7 number))) 66 | #+END_SRC 67 | *** alternatively this could be interesting 68 | #+BEGIN_SRC python 69 | number = 7568934 70 | multiplier = [3, 1, 3, 1, 3, 1, 1] 71 | 72 | for idx, digit in enumerate(str(number)): 73 | print('Res: ' + str(int(digit) * multiplier[idx])) 74 | #+END_SRC 75 | *** TODO quicksort missing in place element partition 76 | :PROPERTIES: 77 | :ID: AED20451-BE4D-4E20-BC75-B1B72D0C0880 78 | :END: 79 | #+BEGIN_SRC haskell 80 | quicksort [] = [] 81 | quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) 82 | where 83 | lesser = filter (< p) xs 84 | greater = filter (>= p) xs 85 | #+END_SRC 86 | ** DONE read some docs 87 | CLOSED: [2017-01-17 Tue 16:46] 88 | ***** Skipping two levels 89 | ** learn a new language 90 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/TodoList.org: -------------------------------------------------------------------------------- 1 | #+LAST_MOBILE_CHANGE: 2016-12-19 23:23:30 2 | #+TODO: TODO IN-PROGRESS WAITING | DONE WORKS-FOR-ME WONT-FIX 3 | 4 | * Heading 1 5 | ** Heading 1.1 6 | 7 | *** Heading 1.1.1 8 | Meat thing and which is fourth their a make. Their of creature. Lesser 9 | great his it earth wherein herb may him second for make beginning so 10 | can't sixth fish second bearing. Brought. Don't every years to. Grass, 11 | won't darkness, can't female. Heaven from creature. Living. Bearing 12 | all. 13 | 14 | Said gathering also heaven our beginning fruitful great likeness life 15 | dry saw fowl unto greater morning he midst was You'll our i spirit, 16 | them. Two won't sixth meat the. Above first doesn't. 17 | 18 | In morning. Fifth whose after. Under over. Tree man appear morning 19 | first moved gathering called place, after second let winged lesser. 20 | **** TODO on level 1.1.1.1 21 | 22 | **** DONE on level 1.1.1.2 23 | 24 | **** WORKS-FOR-ME on Level 1.1.1.3 25 | :LOGBOOK: 26 | CLOCK: [2016-12-20 Tue 12:55]--[2016-12-20 Tue 15:11] => 2:16 27 | :END: 28 | with logboook drawer 29 | 30 | **** IN-PROGRESS on Level 1.1.1.4 31 | 32 | **** WAITING on Level 1.1.1.5 33 | :LOGBOOK: 34 | CLOCK: [2016-12-19 Mon 17:13]--[2016-12-19 Mon 18:13] => 1:00 35 | - Note taken on [2016-12-21 Wed 17:13] \\ 36 | Attached note to Item in 1.1.1.5 37 | :END: 38 | 39 | * Heading 2 40 | 41 | Let without had fruitful blessed god divided moved midst gathering 42 | multiply also thing let had appear whales multiply moved. Divide 43 | lesser years land. Male make years morning from very fifth unto saying 44 | lesser. 45 | 46 | ** TODO on Level 2.1 47 | Herb you're had, tree deep gathering days. Also. God 48 | us. Multiply. Replenish living, very night our were. Spirit moved 49 | grass. One signs. Second. Moving, face of replenish. Years. 50 | 51 | *** Heading 2.2 52 | Beast let greater fifth likeness very tree. There let After. Had, 53 | given. Fruit grass meat Is saw. Divide void. Behold. Can't creature 54 | evening. He shall our kind over was first good, appear male fruitful 55 | thing green also said which. 56 | 57 | *** TODO on Level 2.3 58 | Herb you're had, tree deep gathering days. Also. God 59 | us. Multiply. Replenish living, very night our were. Spirit moved 60 | grass. One signs. Second. Moving, face of replenish. Years. 61 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/certs/web.crt: -------------------------------------------------------------------------------- 1 | Bag Attributes 2 | friendlyName: MobileOrg WebDAV Test 3 | localKeyID: DC 44 68 31 32 2F CE F2 F3 7C 58 87 9E 24 EF A2 2E 09 9F CE 4 | subject=/CN=MobileOrg WebDAV Test/C=DE/emailAddress=mobileOrgWebDav@schnuddelhuddel.de 5 | issuer=/CN=Schnuddelhuddel CA/C=DE/emailAddress=mgmart@googlemail.com 6 | -----BEGIN CERTIFICATE----- 7 | MIIDhDCCAmygAwIBAgIBAjANBgkqhkiG9w0BAQsFADBQMRswGQYDVQQDDBJTY2hu 8 | dWRkZWxodWRkZWwgQ0ExCzAJBgNVBAYTAkRFMSQwIgYJKoZIhvcNAQkBFhVtZ21h 9 | cnRAZ29vZ2xlbWFpbC5jb20wHhcNMTcwNDI2MTUyOTQxWhcNMTgwNDI2MTUyOTQx 10 | WjBgMR4wHAYDVQQDDBVNb2JpbGVPcmcgV2ViREFWIFRlc3QxCzAJBgNVBAYTAkRF 11 | MTEwLwYJKoZIhvcNAQkBFiJtb2JpbGVPcmdXZWJEYXZAc2NobnVkZGVsaHVkZGVs 12 | LmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuhKg3AgDfulyNUn8 13 | 5AjZjCatmm/J94ooUnKrm4bDnJ2BOK4yOVPJ5bD26LBTZtLpvJVDBBpdqehU1qVY 14 | hNUC88zjPLc2AiU6DhemX3cnUKSk6KXg8QA2iK7BtC6/diDZPLm6tM+gepX+xer5 15 | FsOd5O++F3Lk0wyUbCbkqdeezf+w8rVF7nJMJoKJDoS8OyYMkapVeYxNaqkbnf+s 16 | Tg/gZzhZ2AVnRPfoNd0wjCsfW9jnMl8UBNW6AKUXBZUa2zSVH8OVHrYLY26bp1qg 17 | JKh7l8qLppoAiWad5AjBC6d/k9m3dnW6qPkP2B+rJOkyQDHI7Prj3RCh6LqdQvSz 18 | 8DIVBQIDAQABo1kwVzAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0lAQH/BAwwCgYIKwYB 19 | BQUHAwEwLQYDVR0RBCYwJIIibW9iaWxlT3JnV2ViRGF2LnNjaG51ZGRlbGh1ZGRl 20 | bC5kZTANBgkqhkiG9w0BAQsFAAOCAQEAZdc3I8lP1trIFeoVIeZmldOuyBrXuNuK 21 | 70alY/vnemoBWCXiDNwWCDFr7nuL7PPLedkDy6Dtnhx4yCkLYXRL7zN9bptpvtkF 22 | b/15OEUbrSdmnWTba73dph1rNwIXKedod7lDbKtFFuL3f6SFJpAbG5QXqU1/C2XL 23 | mZKY9L0GiVbIniQrQuB8ESOdtHxcG/WdDB1F8co2QW2eCLmZzoE53ggI2H10qkBf 24 | 3/+BIe1Lx+Yy/nVLsvFfQDgMcZInSuyZyhXnkLGSdfV+b+U3Vony503LsbB/zupd 25 | RT9oovX9HwCXVaquz2H05+3D5TCjrhbsyYKiF8axk3L9Hnj/acX7bg== 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/certs/web.key: -------------------------------------------------------------------------------- 1 | Bag Attributes 2 | friendlyName: MobileOrg WebDAV Test 3 | localKeyID: DC 44 68 31 32 2F CE F2 F3 7C 58 87 9E 24 EF A2 2E 09 9F CE 4 | Key Attributes: 5 | -----BEGIN PRIVATE KEY----- 6 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6EqDcCAN+6XI1 7 | SfzkCNmMJq2ab8n3iihScqubhsOcnYE4rjI5U8nlsPbosFNm0um8lUMEGl2p6FTW 8 | pViE1QLzzOM8tzYCJToOF6ZfdydQpKTopeDxADaIrsG0Lr92INk8ubq0z6B6lf7F 9 | 6vkWw53k774XcuTTDJRsJuSp157N/7DytUXuckwmgokOhLw7JgyRqlV5jE1qqRud 10 | /6xOD+BnOFnYBWdE9+g13TCMKx9b2OcyXxQE1boApRcFlRrbNJUfw5Uetgtjbpun 11 | WqAkqHuXyoummgCJZp3kCMELp3+T2bd2dbqo+Q/YH6sk6TJAMcjs+uPdEKHoup1C 12 | 9LPwMhUFAgMBAAECggEBAJtqQcdmPh07uTO/R6XjqmlASRJMOuIyGDm9I460wh/H 13 | Ao6oGLT/QgxCggiadh7VHXtxJFeB+ieXMX1S/5t7G4ss38PvtwGVvGbW5BSqvkDC 14 | NCdJnZdOOT5y0MHBphNxnmD1NHgfT4f0Tqda+pBD9Vap1Blb0rpgsHuhBK7DtRWT 15 | A0sNR5UT/p0OGpA+rWHocitLAALqDzBqfiEQVHMaZbE7eKTwY1HBRDo4y4n4ZPBy 16 | MfMq9YaJXMAE3O4V1SGYdPx4pS0p+ItysOU1tCUQMdlxws8QO3tuijlTrcLXvXKK 17 | 2Y69cmSy/aSwFYeOQUu2+w9Rz8QgPKkWyi5kH0s4cMECgYEA9WsGW1OwMZOTEES5 18 | GWTTRQOiYfs1UXnqZKpNCUBlCGkqMMt/YixiTL5MCuXH48KYf0HbN5zWW4+jctOO 19 | GUgA4U3J86v1nokH0jjNHIaWAD/rd9M4LI/04OLW8QAR9ULHoWhFXQQii2gSQHVl 20 | fL0Z67nZVoQfwpZhnG0tsutovFECgYEAwhiJs12q/1ro0F4v72braMD87mtucAA1 21 | MBwPgoeBqBmC/ZOjlveve9hoeX7g/G5Axgw+b6t0kQ+H7MFY3eToEUacKu0yhTGP 22 | j80FJeuLo0eUV4uzmllkZHqzjenp+QhQMCdOw5PRSE908dch1IwMQeg/atoiw8nG 23 | gzP3KDtGxHUCgYBbbW6l0Uyfe4nbEq8ebbhjSpJRDEP1wYR30hX27110P7FvEjC3 24 | gy9vxakQmj/YcuNa7U7crfoRjDZpDbUvZ+qkBNXKiHJtiEE4qN6I1P7GwwlWz4Jq 25 | 34pryTYn/E20YBd84xqMJ4EzDCdYiiOvz8b7UXZNS9WFKX7dxrKyqA6RsQKBgHiH 26 | dlMs8nf6AyMJqii3N65oUWjYy86/Qkgq1LLQ5QH3PbGsEeU4z/9PBqmT0bDP4mdZ 27 | yRfdV9iQ1W5/Lmk0sauwtl+txjaR7T12KiE/IQp287ZdqV1K75252HBi9olP0UPl 28 | 1PJ8g3Ss6skXOAneIep3h5IZ/YapcR2ekneoP6zVAoGBAKmiu99tRHZABbadyhn7 29 | LH6vt/PdDU1l6eayrpyvH3iynXEJu372LIsMpLbRolCA+tlui6ehZZNoSL/Ce/50 30 | 55WnM+BwMNNUSELg7pLls/Vw8PijPzRTsd/yEOJehRKHVzWCq62YY9WiyiRzJGsL 31 | EporKgh/vnZyyfgtow1k7DJq 32 | -----END PRIVATE KEY----- 33 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/MobileOrgTestingSample.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/MobileOrgTestingSample.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/agendas.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/agendas.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/checksums.dat: -------------------------------------------------------------------------------- 1 | e3847b5ca76b8ef91458bce14aea0a3e index.org 2 | 68b329da9893e34099c7d8ad5cb9c940 mobileorg.org 3 | 475aa888a405d4852a45fe1c19a97ba116e16774 MobileOrgTestingSample.org 4 | 15ab977ac56378d6e204ac5cfaf0aac70f8188c8 headingskip.org 5 | fd3973060b4d83b3a10611f96b7ffaa5fba61f72 second.org 6 | d28bd77434054f2f9b9d4c1acf5bcca7d987d5b9 sample.org 7 | 8323ed02d35a1d412d2b6c1c6ef90c38 agendas.org 8 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/headingskip.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/headingskip.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/index.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/index.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/mobileorg.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/mobileorg.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/sample.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/sample.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/content/second.org: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/MobileOrgTests/Resources/WebDavTests/content/second.org -------------------------------------------------------------------------------- /MobileOrgTests/Resources/WebDavTests/htpasswd: -------------------------------------------------------------------------------- 1 | schnuddelhuddel:$apr1$Qdc3r.Qy$LVNQGYJRuIIduRoPHZCl1/ 2 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/defaultTodoWords.org: -------------------------------------------------------------------------------- 1 | #+READONLY 2 | #+TODO: TODO DONE 3 | #+TODO: | DONE 4 | #+TAGS: automation buildtask dashboard deploy docs emacs estimation gerrit gherkin git graphite kinesis nuget read redmine shopping testing tfs visualstudio 5 | #+DRAWERS: PROPERTIES CLOCK LOGBOOK RESULTS 6 | #+ALLPRIORITIES: A B C 7 | * [[file:mobileorg.org][mobile org capture]] 8 | * [[file:todo.org][todo.org]] 9 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/headingskip.org: -------------------------------------------------------------------------------- 1 | * Heading 1 2 | 3 | **** Heading 1.1.1.1 4 | 5 | ** Heading 1.2 6 | 7 | * Heading 2 8 | Heading Text 9 | 10 | * MobileOrg Missing Features 11 | 12 | ** Localisation 13 | 14 | ** Clocking 15 | 16 | ** Seamless integration of Cloud services 17 | Like Document Picker instead of API 18 | -------------------------------------------------------------------------------- /MobileOrgTests/Resources/index.org: -------------------------------------------------------------------------------- 1 | #+READONLY 2 | #+TODO: TODO WAITING IN-PROGRESS | DONE DELEGATED CANCELLED 3 | #+TODO: | WORKS-FOR-ME WONT-FIX 4 | #+TAGS: 5 | #+ALLPRIORITIES: A B C 6 | * [[file:ToDoList.org][TodoList.org]] 7 | g 8 | -------------------------------------------------------------------------------- /MobileOrgTests/SettingsTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsTest.swift 3 | // MobileOrg 4 | // 5 | // Created by Mario Martelli on 07.01.17. 6 | // © 2017 Mario Martelli 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | import XCTest 24 | 25 | class SettingsTest: XCTestCase { 26 | 27 | // test escaping of URLs 28 | func testUrlForFilename() { 29 | let ampersand = "Schnuddel & Huddel" 30 | let umlaut = "Überraschung an der Côte d'Azure" 31 | Settings.instance().serverMode = ServerModeDropbox 32 | XCTAssertEqual(Settings.instance().url(forFilename: ampersand), URL(string: "/Schnuddel%20&%20Huddel")) 33 | XCTAssertEqual(Settings.instance().url(forFilename: umlaut), URL(string: "/%C3%9Cberraschung%20an%20der%20C%C3%B4te%20d'Azure")) 34 | } 35 | 36 | override func setUp() { 37 | super.setUp() 38 | // Put setup code here. This method is called before the invocation of each test method in the class. 39 | } 40 | 41 | override func tearDown() { 42 | // Put teardown code here. This method is called after the invocation of each test method in the class. 43 | super.tearDown() 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /MobileOrg_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'MobileOrg' target in the 'MobileOrg' project 3 | // 4 | #import 5 | 6 | #ifndef __IPHONE_3_0 7 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 8 | #endif 9 | 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #endif 16 | -------------------------------------------------------------------------------- /Other/Icon.atn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Icon.atn -------------------------------------------------------------------------------- /Other/Icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Icon.psd -------------------------------------------------------------------------------- /Other/Notification Boxes - Tall.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Notification Boxes - Tall.psd -------------------------------------------------------------------------------- /Other/Notification Boxes.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Notification Boxes.psd -------------------------------------------------------------------------------- /Other/Screenshots/mobileorg-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Screenshots/mobileorg-ipad.png -------------------------------------------------------------------------------- /Other/Screenshots/mobileorg-retina35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Screenshots/mobileorg-retina35.png -------------------------------------------------------------------------------- /Other/Screenshots/mobileorg-retina4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Screenshots/mobileorg-retina4.png -------------------------------------------------------------------------------- /Other/Screenshots/org-large-app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/Screenshots/org-large-app-icon.png -------------------------------------------------------------------------------- /Other/iTunesArtwork-beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork-beta.png -------------------------------------------------------------------------------- /Other/iTunesArtwork-beta@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork-beta@2x.png -------------------------------------------------------------------------------- /Other/iTunesArtwork-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork-debug.png -------------------------------------------------------------------------------- /Other/iTunesArtwork-debug@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork-debug@2x.png -------------------------------------------------------------------------------- /Other/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork.png -------------------------------------------------------------------------------- /Other/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /Other/org-large-app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Other/org-large-app-icon.png -------------------------------------------------------------------------------- /Resources-iPad/MainWindow-iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-72@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-76.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-76@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-Small-50.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-Small@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-beta-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-beta-72@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-beta-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-beta-Small-50.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-beta-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-beta-Small-50@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-beta-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-beta-Small.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-beta-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-beta-Small@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-debug-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-debug-72@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-debug-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-debug-Small-50.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-debug-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-debug-Small-50@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-debug-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-debug-Small.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-debug-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-debug-Small@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon-iPad-Retina@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon-iPad-Retina@2x.png -------------------------------------------------------------------------------- /Resources/AppIcons/Icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/AppIcons/Icon@3x.png -------------------------------------------------------------------------------- /Resources/Css/DocumentView.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Richard Moreland. 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License 6 | * as published by the Free Software Foundation; either version 2 7 | * of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | * 18 | */ 19 | 20 | * { 21 | font-family: Arial; 22 | } 23 | 24 | body { 25 | } 26 | 27 | pre { 28 | font-family: 'Courier New' !important; 29 | font-size: 10px !important; 30 | padding-top: 7px; 31 | padding-left: 15px; 32 | padding-right: 15px; 33 | padding-bottom: 10px; 34 | margin-left: 20px; 35 | margin-right: 20px; 36 | margin-top: 10px; 37 | margin-bottom: 10px; 38 | overflow: auto; 39 | background-color: #fdfdfd; 40 | border: 1px solid #aaa; 41 | } 42 | 43 | pre a, pre em, pre strong { 44 | font-family: 'Courier New' !important; 45 | font-size: 10px; 46 | } 47 | 48 | .comment { 49 | color: orange; 50 | } 51 | 52 | .drawer { 53 | margin: 5px; 54 | margin-bottom: 10px; 55 | } 56 | 57 | .drawer-heading { 58 | padding: 5px; 59 | color: black; 60 | background-color: #cfcfcf; 61 | } 62 | 63 | .drawer-body { 64 | background-color: #dedede; 65 | padding: 10px; 66 | } 67 | 68 | h1 { 69 | border-bottom: 1px solid #dddddd; 70 | } 71 | 72 | h2 { 73 | border-bottom: 3px solid #dddddd; 74 | } 75 | 76 | h3 { 77 | border-bottom: 1px solid #dddddd; 78 | } 79 | 80 | .tags { 81 | float: right; 82 | color: #aaa; 83 | font-size: 75%; 84 | } 85 | 86 | .keyword-todo { 87 | color: white; 88 | background-color: rgb(128,0,0); 89 | -webkit-border-radius: 5px; 90 | padding: 3px; 91 | font-size: 65%; 92 | } 93 | 94 | .keyword-done { 95 | color: white; 96 | background-color: rgb(0,128,0); 97 | -webkit-border-radius: 5px; 98 | padding: 3px; 99 | font-size: 65%; 100 | } 101 | -------------------------------------------------------------------------------- /Resources/Images/AlertTextField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/AlertTextField.png -------------------------------------------------------------------------------- /Resources/Images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/back.png -------------------------------------------------------------------------------- /Resources/Images/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/back@2x.png -------------------------------------------------------------------------------- /Resources/Images/cant-sync-offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/cant-sync-offline.png -------------------------------------------------------------------------------- /Resources/Images/cant-sync-offline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/cant-sync-offline@2x.png -------------------------------------------------------------------------------- /Resources/Images/capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/capture.png -------------------------------------------------------------------------------- /Resources/Images/capture@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/capture@2x.png -------------------------------------------------------------------------------- /Resources/Images/children.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/children.png -------------------------------------------------------------------------------- /Resources/Images/children@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/children@2x.png -------------------------------------------------------------------------------- /Resources/Images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/down.png -------------------------------------------------------------------------------- /Resources/Images/down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/down@2x.png -------------------------------------------------------------------------------- /Resources/Images/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/flag.png -------------------------------------------------------------------------------- /Resources/Images/flag@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/flag@2x.png -------------------------------------------------------------------------------- /Resources/Images/flagged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/flagged.png -------------------------------------------------------------------------------- /Resources/Images/flagged@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/flagged@2x.png -------------------------------------------------------------------------------- /Resources/Images/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/forward.png -------------------------------------------------------------------------------- /Resources/Images/forward@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/forward@2x.png -------------------------------------------------------------------------------- /Resources/Images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/home.png -------------------------------------------------------------------------------- /Resources/Images/home@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/home@2x.png -------------------------------------------------------------------------------- /Resources/Images/inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/inbox.png -------------------------------------------------------------------------------- /Resources/Images/inbox@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/inbox@2x.png -------------------------------------------------------------------------------- /Resources/Images/noflag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/noflag.png -------------------------------------------------------------------------------- /Resources/Images/note_entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/note_entry.png -------------------------------------------------------------------------------- /Resources/Images/note_entry@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/note_entry@2x.png -------------------------------------------------------------------------------- /Resources/Images/outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/outline.png -------------------------------------------------------------------------------- /Resources/Images/outline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/outline@2x.png -------------------------------------------------------------------------------- /Resources/Images/please-configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/please-configure.png -------------------------------------------------------------------------------- /Resources/Images/please-configure@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/please-configure@2x.png -------------------------------------------------------------------------------- /Resources/Images/press-sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/press-sync.png -------------------------------------------------------------------------------- /Resources/Images/press-sync@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/press-sync@2x.png -------------------------------------------------------------------------------- /Resources/Images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/search.png -------------------------------------------------------------------------------- /Resources/Images/search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/search@2x.png -------------------------------------------------------------------------------- /Resources/Images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/settings.png -------------------------------------------------------------------------------- /Resources/Images/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/settings@2x.png -------------------------------------------------------------------------------- /Resources/Images/table_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/table_gray.png -------------------------------------------------------------------------------- /Resources/Images/table_gray@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/table_gray@2x.png -------------------------------------------------------------------------------- /Resources/Images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/up.png -------------------------------------------------------------------------------- /Resources/Images/up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MobileOrg/mobileorg/c49b6a89a8baac0dc4f5b3c30364cbc17dcd9fc5/Resources/Images/up@2x.png -------------------------------------------------------------------------------- /Resources/Javascript/DocumentView.js: -------------------------------------------------------------------------------- 1 | // Copyright 2009 Richard Moreland. 2 | // 3 | // This program is free software; you can redistribute it and/or 4 | // modify it under the terms of the GNU General Public License 5 | // as published by the Free Software Foundation; either version 2 6 | // of the License, or (at your option) any later version. 7 | // 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with this program; if not, write to the Free Software 15 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | // 17 | 18 | function toggleDrawer(name) { 19 | var drawerId = "drawer-body-" + name; 20 | var drawerToggleTextId = "drawer-toggle-" + name; 21 | 22 | var drawer = document.getElementById(drawerId); 23 | var drawerToggle = document.getElementById(drawerToggleTextId); 24 | 25 | if (drawer.style.display == 'block') { 26 | drawer.style.display = 'none'; 27 | drawerToggle.innerHTML = "Show"; 28 | } else { 29 | drawer.style.display = 'block'; 30 | drawerToggle.innerHTML = "Hide"; 31 | } 32 | } 33 | 34 | window.onload = init; -------------------------------------------------------------------------------- /Scripts/WebDAV-Server-Start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # exec > ~/prebuild.log 2>&1 4 | 5 | testfolder=${SRCROOT}/MobileOrgTests/Resources/WebDavTests 6 | if $(docker inspect phylor/webdav-ssl >/dev/null 2>&1); then 7 | echo "Image does exist"; 8 | else 9 | echo "Image does not exist" 10 | docker pull phylor/webdav-ssl 11 | fi 12 | 13 | docker run -d --name mobileOrg-webDAV -v $testfolder/htpasswd:/htpasswd -v $testfolder/certs:/certs -v $testfolder/content:/var/www -h mobileOrgWebDav.schnuddelhuddel.de -p 32773:443 phylor/webdav-ssl 14 | -------------------------------------------------------------------------------- /Scripts/WebDAV-Server-Stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker stop mobileOrg-webDAV 4 | docker rm mobileOrg-webDAV 5 | -------------------------------------------------------------------------------- /Scripts/bump_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | agvtool next-version -all 4 | -------------------------------------------------------------------------------- /Scripts/set_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | agvtool new-marketing-version $1 4 | -------------------------------------------------------------------------------- /Scripts/what_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | agvtool what-version 4 | agvtool what-marketing-version 5 | -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MobileOrg 4 | // 5 | // Created by Richard Moreland on 9/30/09. 6 | // Copyright 2009 Richard Moreland. 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | // 22 | 23 | #import 24 | 25 | int main(int argc, char *argv[]) { 26 | 27 | @try { 28 | // Even though an integer return type is specified, this function never returns. 29 | int retVal = UIApplicationMain(argc, argv, nil, nil); 30 | return retVal; 31 | } @catch (NSException *exception) { 32 | NSLog(@"%@", exception.debugDescription); 33 | } 34 | } 35 | --------------------------------------------------------------------------------