├── .gitignore ├── .gradle ├── 4.10.1 │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ └── fileHashes.lock │ ├── gc.properties │ └── taskHistory │ │ └── taskHistory.lock └── buildOutputCleanup │ ├── buildOutputCleanup.lock │ └── cache.properties ├── README.md ├── Screen Shot 2019-05-25 at 4.49.02 PM.png ├── Screen Shot 2019-05-25 at 4.57.18 PM.png ├── Screen Shot 2020-04-23 at 9.33.16 PM.png ├── babel.config.js ├── capacitor.config.json ├── ionic.config.json ├── ios ├── .gitignore └── App │ ├── App.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── App.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── App │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon-20x20@1x.png │ │ │ ├── AppIcon-20x20@2x-1.png │ │ │ ├── AppIcon-20x20@2x.png │ │ │ ├── AppIcon-20x20@3x.png │ │ │ ├── AppIcon-29x29@1x.png │ │ │ ├── AppIcon-29x29@2x-1.png │ │ │ ├── AppIcon-29x29@2x.png │ │ │ ├── AppIcon-29x29@3x.png │ │ │ ├── AppIcon-40x40@1x.png │ │ │ ├── AppIcon-40x40@2x-1.png │ │ │ ├── AppIcon-40x40@2x.png │ │ │ ├── AppIcon-40x40@3x.png │ │ │ ├── AppIcon-512@2x.png │ │ │ ├── AppIcon-60x60@2x.png │ │ │ ├── AppIcon-60x60@3x.png │ │ │ ├── AppIcon-76x76@1x.png │ │ │ ├── AppIcon-76x76@2x.png │ │ │ ├── AppIcon-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Splash.imageset │ │ │ ├── Contents.json │ │ │ ├── splash-2732x2732-1.png │ │ │ ├── splash-2732x2732-2.png │ │ │ └── splash-2732x2732.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── capacitor.config.json │ └── config.xml │ ├── Podfile │ ├── Podfile.lock │ ├── Pods │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Capacitor │ │ ├── Capacitor-dummy.m │ │ ├── Capacitor-prefix.pch │ │ ├── Capacitor-umbrella.h │ │ └── Capacitor.modulemap │ │ ├── CapacitorCordova │ │ ├── CapacitorCordova-dummy.m │ │ ├── CapacitorCordova-prefix.pch │ │ ├── CapacitorCordova-umbrella.h │ │ └── CapacitorCordova.modulemap │ │ └── Pods-App │ │ ├── Pods-App-acknowledgements.markdown │ │ ├── Pods-App-acknowledgements.plist │ │ ├── Pods-App-dummy.m │ │ ├── Pods-App-frameworks.sh │ │ ├── Pods-App-resources.sh │ │ ├── Pods-App-umbrella.h │ │ ├── Pods-App.debug.xcconfig │ │ ├── Pods-App.modulemap │ │ └── Pods-App.release.xcconfig │ └── public │ ├── cordova.js │ ├── cordova_plugins.js │ ├── index.html │ └── native-bridge.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets └── logo.png ├── components ├── CameraPage.vue └── GeolocationPage.vue ├── main.js └── router └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /.gradle/4.10.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/4.10.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/.gradle/4.10.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/4.10.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/.gradle/4.10.1/gc.properties -------------------------------------------------------------------------------- /.gradle/4.10.1/taskHistory/taskHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/.gradle/4.10.1/taskHistory/taskHistory.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Sun Sep 01 00:18:28 EDT 2019 2 | gradle.version=4.10.1 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VueJS Ionic Capacitor Sample Application 2 | ### Last Updated 9/5/2020 3 | --- 4 | 5 | Youtube VueJS Playlist - https://youtube.com/playlist?list=PL2PY2-9rsgl2bgNTX9omlDisiWh1NYInz 6 | 7 | --- 8 | # New UPDATED VueJS Ionic Capacitor Sample - Vue3 Ionic BETA - https://github.com/aaronksaunders/capacitor-vue3-ionicv5-app 9 | -- 10 | -------------------------------------------------------------------------------- /Screen Shot 2019-05-25 at 4.49.02 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/Screen Shot 2019-05-25 at 4.49.02 PM.png -------------------------------------------------------------------------------- /Screen Shot 2019-05-25 at 4.57.18 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/Screen Shot 2019-05-25 at 4.57.18 PM.png -------------------------------------------------------------------------------- /Screen Shot 2020-04-23 at 9.33.16 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/Screen Shot 2020-04-23 at 9.33.16 PM.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.aks.vuehw", 3 | "appName": "vuehw", 4 | "bundledWebRuntime": false, 5 | "webDir": "dist", 6 | "server": { 7 | "allowNavigation": [ 8 | "example.org", 9 | "*.example.org", 10 | "192.0.2.1", 11 | "mapbox.com" 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuehw", 3 | "integrations": { 4 | "capacitor": {} 5 | }, 6 | "type": "vue" 7 | } 8 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | # NPM renames .gitignore to .npmignore 2 | # In order to prevent that, we remove the initial "." 3 | # And the CLI then renames it 4 | 5 | App/build 6 | App/Pods 7 | App/public 8 | App/Podfile.lock 9 | xcuserdata 10 | 11 | # Cordova plugins for Capacitor 12 | capacitor-cordova-ios-plugins 13 | 14 | -------------------------------------------------------------------------------- /ios/App/App.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; }; 11 | 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; }; 12 | 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; }; 13 | 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; }; 14 | 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; }; 15 | 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; }; 16 | 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; }; 17 | A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = ""; }; 22 | 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = ""; }; 23 | 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 26 | 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 28 | 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = SOURCE_ROOT; }; 30 | AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = ""; }; 32 | FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 504EC3011FED79650016851F /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = { 48 | isa = PBXGroup; 49 | children = ( 50 | AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */, 51 | ); 52 | name = Frameworks; 53 | sourceTree = ""; 54 | }; 55 | 504EC2FB1FED79650016851F = { 56 | isa = PBXGroup; 57 | children = ( 58 | 504EC3061FED79650016851F /* App */, 59 | 504EC3051FED79650016851F /* Products */, 60 | 7F8756D8B27F46E3366F6CEA /* Pods */, 61 | 27E2DDA53C4D2A4D1A88CE4A /* Frameworks */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 504EC3051FED79650016851F /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 504EC3041FED79650016851F /* App.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 504EC3061FED79650016851F /* App */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 50379B222058CBB4000EE86E /* capacitor.config.json */, 77 | 504EC3071FED79650016851F /* AppDelegate.swift */, 78 | 504EC30B1FED79650016851F /* Main.storyboard */, 79 | 504EC30E1FED79650016851F /* Assets.xcassets */, 80 | 504EC3101FED79650016851F /* LaunchScreen.storyboard */, 81 | 504EC3131FED79650016851F /* Info.plist */, 82 | 2FAD9762203C412B000D30F8 /* config.xml */, 83 | 50B271D01FEDC1A000F3C39B /* public */, 84 | ); 85 | path = App; 86 | sourceTree = ""; 87 | }; 88 | 7F8756D8B27F46E3366F6CEA /* Pods */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */, 92 | AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */, 93 | ); 94 | name = Pods; 95 | sourceTree = ""; 96 | }; 97 | /* End PBXGroup section */ 98 | 99 | /* Begin PBXNativeTarget section */ 100 | 504EC3031FED79650016851F /* App */ = { 101 | isa = PBXNativeTarget; 102 | buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */; 103 | buildPhases = ( 104 | 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */, 105 | 504EC3001FED79650016851F /* Sources */, 106 | 504EC3011FED79650016851F /* Frameworks */, 107 | 504EC3021FED79650016851F /* Resources */, 108 | 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */, 109 | D147970D440B386C5AFC515D /* [CP] Copy Pods Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = App; 116 | productName = App; 117 | productReference = 504EC3041FED79650016851F /* App.app */; 118 | productType = "com.apple.product-type.application"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 504EC2FC1FED79650016851F /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastSwiftUpdateCheck = 0920; 127 | LastUpgradeCheck = 0920; 128 | TargetAttributes = { 129 | 504EC3031FED79650016851F = { 130 | CreatedOnToolsVersion = 9.2; 131 | LastSwiftMigration = 1100; 132 | ProvisioningStyle = Automatic; 133 | }; 134 | }; 135 | }; 136 | buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */; 137 | compatibilityVersion = "Xcode 8.0"; 138 | developmentRegion = en; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | Base, 143 | ); 144 | mainGroup = 504EC2FB1FED79650016851F; 145 | productRefGroup = 504EC3051FED79650016851F /* Products */; 146 | projectDirPath = ""; 147 | projectRoot = ""; 148 | targets = ( 149 | 504EC3031FED79650016851F /* App */, 150 | ); 151 | }; 152 | /* End PBXProject section */ 153 | 154 | /* Begin PBXResourcesBuildPhase section */ 155 | 504EC3021FED79650016851F /* Resources */ = { 156 | isa = PBXResourcesBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */, 160 | 50B271D11FEDC1A000F3C39B /* public in Resources */, 161 | 504EC30F1FED79650016851F /* Assets.xcassets in Resources */, 162 | 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */, 163 | 504EC30D1FED79650016851F /* Main.storyboard in Resources */, 164 | 2FAD9763203C412B000D30F8 /* config.xml in Resources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXResourcesBuildPhase section */ 169 | 170 | /* Begin PBXShellScriptBuildPhase section */ 171 | 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = { 172 | isa = PBXShellScriptBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | ); 176 | inputPaths = ( 177 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 178 | "${PODS_ROOT}/Manifest.lock", 179 | ); 180 | name = "[CP] Check Pods Manifest.lock"; 181 | outputPaths = ( 182 | "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt", 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | shellPath = /bin/sh; 186 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 187 | showEnvVarsInLog = 0; 188 | }; 189 | 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = { 190 | isa = PBXShellScriptBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | ); 194 | inputPaths = ( 195 | ); 196 | name = "[CP] Embed Pods Frameworks"; 197 | outputPaths = ( 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | shellPath = /bin/sh; 201 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n"; 202 | showEnvVarsInLog = 0; 203 | }; 204 | D147970D440B386C5AFC515D /* [CP] Copy Pods Resources */ = { 205 | isa = PBXShellScriptBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | inputPaths = ( 210 | ); 211 | name = "[CP] Copy Pods Resources"; 212 | outputPaths = ( 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | shellPath = /bin/sh; 216 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-resources.sh\"\n"; 217 | showEnvVarsInLog = 0; 218 | }; 219 | /* End PBXShellScriptBuildPhase section */ 220 | 221 | /* Begin PBXSourcesBuildPhase section */ 222 | 504EC3001FED79650016851F /* Sources */ = { 223 | isa = PBXSourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | 504EC3081FED79650016851F /* AppDelegate.swift in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | /* End PBXSourcesBuildPhase section */ 231 | 232 | /* Begin PBXVariantGroup section */ 233 | 504EC30B1FED79650016851F /* Main.storyboard */ = { 234 | isa = PBXVariantGroup; 235 | children = ( 236 | 504EC30C1FED79650016851F /* Base */, 237 | ); 238 | name = Main.storyboard; 239 | sourceTree = ""; 240 | }; 241 | 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = { 242 | isa = PBXVariantGroup; 243 | children = ( 244 | 504EC3111FED79650016851F /* Base */, 245 | ); 246 | name = LaunchScreen.storyboard; 247 | sourceTree = ""; 248 | }; 249 | /* End PBXVariantGroup section */ 250 | 251 | /* Begin XCBuildConfiguration section */ 252 | 504EC3141FED79650016851F /* Debug */ = { 253 | isa = XCBuildConfiguration; 254 | buildSettings = { 255 | ALWAYS_SEARCH_USER_PATHS = NO; 256 | CLANG_ANALYZER_NONNULL = YES; 257 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 258 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 259 | CLANG_CXX_LIBRARY = "libc++"; 260 | CLANG_ENABLE_MODULES = YES; 261 | CLANG_ENABLE_OBJC_ARC = YES; 262 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 263 | CLANG_WARN_BOOL_CONVERSION = YES; 264 | CLANG_WARN_COMMA = YES; 265 | CLANG_WARN_CONSTANT_CONVERSION = YES; 266 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 267 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 268 | CLANG_WARN_EMPTY_BODY = YES; 269 | CLANG_WARN_ENUM_CONVERSION = YES; 270 | CLANG_WARN_INFINITE_RECURSION = YES; 271 | CLANG_WARN_INT_CONVERSION = YES; 272 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 273 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 275 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 276 | CLANG_WARN_STRICT_PROTOTYPES = YES; 277 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 278 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 279 | CLANG_WARN_UNREACHABLE_CODE = YES; 280 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 281 | CODE_SIGN_IDENTITY = "iPhone Developer"; 282 | COPY_PHASE_STRIP = NO; 283 | DEBUG_INFORMATION_FORMAT = dwarf; 284 | ENABLE_STRICT_OBJC_MSGSEND = YES; 285 | ENABLE_TESTABILITY = YES; 286 | GCC_C_LANGUAGE_STANDARD = gnu11; 287 | GCC_DYNAMIC_NO_PIC = NO; 288 | GCC_NO_COMMON_BLOCKS = YES; 289 | GCC_OPTIMIZATION_LEVEL = 0; 290 | GCC_PREPROCESSOR_DEFINITIONS = ( 291 | "DEBUG=1", 292 | "$(inherited)", 293 | ); 294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 296 | GCC_WARN_UNDECLARED_SELECTOR = YES; 297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 298 | GCC_WARN_UNUSED_FUNCTION = YES; 299 | GCC_WARN_UNUSED_VARIABLE = YES; 300 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 301 | MTL_ENABLE_DEBUG_INFO = YES; 302 | ONLY_ACTIVE_ARCH = YES; 303 | SDKROOT = iphoneos; 304 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 305 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 306 | }; 307 | name = Debug; 308 | }; 309 | 504EC3151FED79650016851F /* Release */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | ALWAYS_SEARCH_USER_PATHS = NO; 313 | CLANG_ANALYZER_NONNULL = YES; 314 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_COMMA = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 324 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INFINITE_RECURSION = YES; 328 | CLANG_WARN_INT_CONVERSION = YES; 329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 330 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 332 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 333 | CLANG_WARN_STRICT_PROTOTYPES = YES; 334 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 335 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | CODE_SIGN_IDENTITY = "iPhone Developer"; 339 | COPY_PHASE_STRIP = NO; 340 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 341 | ENABLE_NS_ASSERTIONS = NO; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu11; 344 | GCC_NO_COMMON_BLOCKS = YES; 345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 346 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 347 | GCC_WARN_UNDECLARED_SELECTOR = YES; 348 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 349 | GCC_WARN_UNUSED_FUNCTION = YES; 350 | GCC_WARN_UNUSED_VARIABLE = YES; 351 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 352 | MTL_ENABLE_DEBUG_INFO = NO; 353 | SDKROOT = iphoneos; 354 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 355 | VALIDATE_PRODUCT = YES; 356 | }; 357 | name = Release; 358 | }; 359 | 504EC3171FED79650016851F /* Debug */ = { 360 | isa = XCBuildConfiguration; 361 | baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */; 362 | buildSettings = { 363 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 364 | CODE_SIGN_STYLE = Automatic; 365 | DEVELOPMENT_TEAM = 5574HK487X; 366 | INFOPLIST_FILE = App/Info.plist; 367 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; 370 | PRODUCT_BUNDLE_IDENTIFIER = com.aks.vuehw; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG USE_PUSH"; 373 | SWIFT_VERSION = 5.0; 374 | TARGETED_DEVICE_FAMILY = "1,2"; 375 | }; 376 | name = Debug; 377 | }; 378 | 504EC3181FED79650016851F /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */; 381 | buildSettings = { 382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 383 | CODE_SIGN_STYLE = Automatic; 384 | DEVELOPMENT_TEAM = 5574HK487X; 385 | INFOPLIST_FILE = App/Info.plist; 386 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 388 | PRODUCT_BUNDLE_IDENTIFIER = com.aks.vuehw; 389 | PRODUCT_NAME = "$(TARGET_NAME)"; 390 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = USE_PUSH; 391 | SWIFT_VERSION = 5.0; 392 | TARGETED_DEVICE_FAMILY = "1,2"; 393 | }; 394 | name = Release; 395 | }; 396 | /* End XCBuildConfiguration section */ 397 | 398 | /* Begin XCConfigurationList section */ 399 | 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = { 400 | isa = XCConfigurationList; 401 | buildConfigurations = ( 402 | 504EC3141FED79650016851F /* Debug */, 403 | 504EC3151FED79650016851F /* Release */, 404 | ); 405 | defaultConfigurationIsVisible = 0; 406 | defaultConfigurationName = Release; 407 | }; 408 | 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | 504EC3171FED79650016851F /* Debug */, 412 | 504EC3181FED79650016851F /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | defaultConfigurationName = Release; 416 | }; 417 | /* End XCConfigurationList section */ 418 | }; 419 | rootObject = 504EC2FC1FED79650016851F /* Project object */; 420 | } 421 | -------------------------------------------------------------------------------- /ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/App/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Capacitor 3 | 4 | @UIApplicationMain 5 | class AppDelegate: UIResponder, UIApplicationDelegate { 6 | 7 | var window: UIWindow? 8 | 9 | 10 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 11 | // Override point for customization after application launch. 12 | return true 13 | } 14 | 15 | func applicationWillResignActive(_ application: UIApplication) { 16 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 17 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 18 | } 19 | 20 | func applicationDidEnterBackground(_ application: UIApplication) { 21 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 22 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 23 | } 24 | 25 | func applicationWillEnterForeground(_ application: UIApplication) { 26 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 27 | } 28 | 29 | func applicationDidBecomeActive(_ application: UIApplication) { 30 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 31 | } 32 | 33 | func applicationWillTerminate(_ application: UIApplication) { 34 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 35 | } 36 | 37 | func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { 38 | // Called when the app was launched with a url. Feel free to add additional processing here, 39 | // but if you want the App API to support tracking app url opens, make sure to keep this call 40 | return CAPBridge.handleOpenUrl(url, options) 41 | } 42 | 43 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { 44 | // Called when the app was launched with an activity, including Universal Links. 45 | // Feel free to add additional processing here, but if you want the App API to support 46 | // tracking app url opens, make sure to keep this call 47 | return CAPBridge.handleContinueActivity(userActivity, restorationHandler) 48 | } 49 | 50 | override func touchesBegan(_ touches: Set, with event: UIEvent?) { 51 | super.touchesBegan(touches, with: event) 52 | 53 | let statusBarRect = UIApplication.shared.statusBarFrame 54 | guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return } 55 | 56 | if statusBarRect.contains(touchPoint) { 57 | NotificationCenter.default.post(CAPBridge.statusBarTappedNotification) 58 | } 59 | } 60 | 61 | #if USE_PUSH 62 | 63 | func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { 64 | NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: deviceToken) 65 | } 66 | 67 | func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { 68 | NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidFailToRegisterForRemoteNotificationsWithError.name()), object: error) 69 | } 70 | 71 | #endif 72 | 73 | } 74 | 75 | -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "AppIcon-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "AppIcon-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon-29x29@2x-1.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon-29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon-40x40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon-40x40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon-60x60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon-60x60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "AppIcon-20x20@1x.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "AppIcon-20x20@2x-1.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "AppIcon-29x29@1x.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "AppIcon-29x29@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "AppIcon-40x40@1x.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "AppIcon-40x40@2x-1.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "AppIcon-76x76@1x.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "AppIcon-76x76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "AppIcon-83.5x83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "AppIcon-512@2x.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "splash-2732x2732-2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "splash-2732x2732-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "splash-2732x2732.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png -------------------------------------------------------------------------------- /ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png -------------------------------------------------------------------------------- /ios/App/App/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /ios/App/App/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ios/App/App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | vuehw 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.0 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleURLName 25 | com.getcapacitor.capacitor 26 | CFBundleURLSchemes 27 | 28 | capacitor 29 | 30 | 31 | 32 | CFBundleVersion 33 | 1 34 | LSRequiresIPhoneOS 35 | 36 | NSAppTransportSecurity 37 | 38 | NSAllowsArbitraryLoads 39 | 40 | 41 | NSCameraUsageDescription 42 | To Take Photos and Video 43 | NSLocationAlwaysUsageDescription 44 | Always allow Geolocation? 45 | NSLocationWhenInUseUsageDescription 46 | Allow Geolocation? 47 | NSMicrophoneUsageDescription 48 | To Record Audio With Video 49 | NSPhotoLibraryAddUsageDescription 50 | Store camera photos to camera 51 | NSPhotoLibraryUsageDescription 52 | To Pick Photos from Library 53 | UILaunchStoryboardName 54 | LaunchScreen 55 | UIMainStoryboardFile 56 | Main 57 | UIRequiredDeviceCapabilities 58 | 59 | armv7 60 | 61 | UISupportedInterfaceOrientations 62 | 63 | UIInterfaceOrientationPortrait 64 | UIInterfaceOrientationLandscapeLeft 65 | UIInterfaceOrientationLandscapeRight 66 | 67 | UISupportedInterfaceOrientations~ipad 68 | 69 | UIInterfaceOrientationPortrait 70 | UIInterfaceOrientationPortraitUpsideDown 71 | UIInterfaceOrientationLandscapeLeft 72 | UIInterfaceOrientationLandscapeRight 73 | 74 | UIViewControllerBasedStatusBarAppearance 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /ios/App/App/capacitor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appId": "com.aks.vuehw", 3 | "appName": "vuehw", 4 | "bundledWebRuntime": false, 5 | "webDir": "dist", 6 | "server": { 7 | "allowNavigation": [ 8 | "example.org", 9 | "*.example.org", 10 | "192.0.2.1", 11 | "mapbox.com" 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /ios/App/App/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ios/App/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '11.0' 2 | use_frameworks! 3 | 4 | # workaround to avoid Xcode caching of Pods that requires 5 | # Product -> Clean Build Folder after new Cordova plugins installed 6 | # Requires CocoaPods 1.6 or newer 7 | install! 'cocoapods', :disable_input_output_paths => true 8 | 9 | def capacitor_pods 10 | # Automatic Capacitor Pod dependencies, do not delete 11 | pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' 12 | pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' 13 | pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' 14 | pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins' 15 | # Do not delete 16 | end 17 | 18 | target 'App' do 19 | capacitor_pods 20 | # Add your Pods here 21 | end 22 | -------------------------------------------------------------------------------- /ios/App/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Capacitor (2.0.2): 3 | - CapacitorCordova (= 2.0.2) 4 | - CapacitorCordova (2.0.2) 5 | - CordovaPlugins (2.0.2): 6 | - CapacitorCordova 7 | - CordovaPluginsResources (0.0.105) 8 | 9 | DEPENDENCIES: 10 | - "Capacitor (from `../../node_modules/@capacitor/ios`)" 11 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" 12 | - CordovaPlugins (from `../capacitor-cordova-ios-plugins`) 13 | - CordovaPluginsResources (from `../capacitor-cordova-ios-plugins`) 14 | 15 | EXTERNAL SOURCES: 16 | Capacitor: 17 | :path: "../../node_modules/@capacitor/ios" 18 | CapacitorCordova: 19 | :path: "../../node_modules/@capacitor/ios" 20 | CordovaPlugins: 21 | :path: "../capacitor-cordova-ios-plugins" 22 | CordovaPluginsResources: 23 | :path: "../capacitor-cordova-ios-plugins" 24 | 25 | SPEC CHECKSUMS: 26 | Capacitor: 8197af225080b4135ad39d76ae44cd0b8dc87519 27 | CapacitorCordova: e45e617a0b5fe6a27f7b822b2014f9c12e8a8198 28 | CordovaPlugins: dc0d38bcdf636004cfe66124a6bf39111664395f 29 | CordovaPluginsResources: 323f609dca3c233ad6c425093aa717b87ddc2aa7 30 | 31 | PODFILE CHECKSUM: a14b8acaa0a1f931a599c5d446bd759f9ea51cc3 32 | 33 | COCOAPODS: 1.9.0.beta.3 34 | -------------------------------------------------------------------------------- /ios/App/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Capacitor (2.0.2): 3 | - CapacitorCordova (= 2.0.2) 4 | - CapacitorCordova (2.0.2) 5 | - CordovaPlugins (2.0.2): 6 | - CapacitorCordova 7 | - CordovaPluginsResources (0.0.105) 8 | 9 | DEPENDENCIES: 10 | - "Capacitor (from `../../node_modules/@capacitor/ios`)" 11 | - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" 12 | - CordovaPlugins (from `../capacitor-cordova-ios-plugins`) 13 | - CordovaPluginsResources (from `../capacitor-cordova-ios-plugins`) 14 | 15 | EXTERNAL SOURCES: 16 | Capacitor: 17 | :path: "../../node_modules/@capacitor/ios" 18 | CapacitorCordova: 19 | :path: "../../node_modules/@capacitor/ios" 20 | CordovaPlugins: 21 | :path: "../capacitor-cordova-ios-plugins" 22 | CordovaPluginsResources: 23 | :path: "../capacitor-cordova-ios-plugins" 24 | 25 | SPEC CHECKSUMS: 26 | Capacitor: 8197af225080b4135ad39d76ae44cd0b8dc87519 27 | CapacitorCordova: e45e617a0b5fe6a27f7b822b2014f9c12e8a8198 28 | CordovaPlugins: dc0d38bcdf636004cfe66124a6bf39111664395f 29 | CordovaPluginsResources: 323f609dca3c233ad6c425093aa717b87ddc2aa7 30 | 31 | PODFILE CHECKSUM: a14b8acaa0a1f931a599c5d446bd759f9ea51cc3 32 | 33 | COCOAPODS: 1.9.0.beta.3 34 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Capacitor/Capacitor-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Capacitor : NSObject 3 | @end 4 | @implementation PodsDummy_Capacitor 5 | @end 6 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Capacitor/Capacitor-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Capacitor/Capacitor-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "Capacitor.h" 14 | #import "CAPBridgedPlugin.h" 15 | #import "CAPPlugin.h" 16 | #import "CAPPluginCall.h" 17 | #import "CAPPluginMethod.h" 18 | #import "DefaultPlugins.h" 19 | #import "Keyboard.h" 20 | 21 | FOUNDATION_EXPORT double CapacitorVersionNumber; 22 | FOUNDATION_EXPORT const unsigned char CapacitorVersionString[]; 23 | 24 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Capacitor/Capacitor.modulemap: -------------------------------------------------------------------------------- 1 | framework module Capacitor { 2 | umbrella header "Capacitor-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CapacitorCordova : NSObject 3 | @end 4 | @implementation PodsDummy_CapacitorCordova 5 | @end 6 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "AppDelegate.h" 14 | #import "CDV.h" 15 | #import "CDVAvailability.h" 16 | #import "CDVCommandDelegate.h" 17 | #import "CDVCommandDelegateImpl.h" 18 | #import "CDVConfigParser.h" 19 | #import "CDVInvokedUrlCommand.h" 20 | #import "CDVPlugin.h" 21 | #import "CDVPluginManager.h" 22 | #import "CDVPluginResult.h" 23 | #import "CDVScreenOrientationDelegate.h" 24 | #import "CDVUIWebViewDelegate.h" 25 | #import "CDVURLProtocol.h" 26 | #import "CDVUserAgentUtil.h" 27 | #import "CDVViewController.h" 28 | #import "NSDictionary+CordovaPreferences.h" 29 | 30 | FOUNDATION_EXPORT double CordovaVersionNumber; 31 | FOUNDATION_EXPORT const unsigned char CordovaVersionString[]; 32 | 33 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.modulemap: -------------------------------------------------------------------------------- 1 | framework module Cordova { 2 | umbrella header "CapacitorCordova-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_App : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_App 5 | @end 6 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | 23 | # Used as a return value for each invocation of `strip_invalid_archs` function. 24 | STRIP_BINARY_RETVAL=0 25 | 26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 29 | 30 | # Copies and strips a vendored framework 31 | install_framework() 32 | { 33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 34 | local source="${BUILT_PRODUCTS_DIR}/$1" 35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 37 | elif [ -r "$1" ]; then 38 | local source="$1" 39 | fi 40 | 41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 42 | 43 | if [ -L "${source}" ]; then 44 | echo "Symlinked..." 45 | source="$(readlink "${source}")" 46 | fi 47 | 48 | # Use filter instead of exclude so missing patterns don't throw errors. 49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 51 | 52 | local basename 53 | basename="$(basename -s .framework "$1")" 54 | binary="${destination}/${basename}.framework/${basename}" 55 | 56 | if ! [ -r "$binary" ]; then 57 | binary="${destination}/${basename}" 58 | elif [ -L "${binary}" ]; then 59 | echo "Destination binary is symlinked..." 60 | dirname="$(dirname "${binary}")" 61 | binary="${dirname}/$(readlink "${binary}")" 62 | fi 63 | 64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 66 | strip_invalid_archs "$binary" 67 | fi 68 | 69 | # Resign the code if required by the build settings to avoid unstable apps 70 | code_sign_if_enabled "${destination}/$(basename "$1")" 71 | 72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 74 | local swift_runtime_libs 75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 76 | for lib in $swift_runtime_libs; do 77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 79 | code_sign_if_enabled "${destination}/${lib}" 80 | done 81 | fi 82 | } 83 | 84 | # Copies and strips a vendored dSYM 85 | install_dsym() { 86 | local source="$1" 87 | if [ -r "$source" ]; then 88 | # Copy the dSYM into a the targets temp dir. 89 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 90 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 91 | 92 | local basename 93 | basename="$(basename -s .framework.dSYM "$source")" 94 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 95 | 96 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 97 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 98 | strip_invalid_archs "$binary" 99 | fi 100 | 101 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 102 | # Move the stripped file into its final destination. 103 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 104 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 105 | else 106 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 107 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 108 | fi 109 | fi 110 | } 111 | 112 | # Copies the bcsymbolmap files of a vendored framework 113 | install_bcsymbolmap() { 114 | local bcsymbolmap_path="$1" 115 | local destination="${BUILT_PRODUCTS_DIR}" 116 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 117 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 118 | } 119 | 120 | # Signs a framework with the provided identity 121 | code_sign_if_enabled() { 122 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 123 | # Use the current code_sign_identity 124 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 125 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 126 | 127 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 128 | code_sign_cmd="$code_sign_cmd &" 129 | fi 130 | echo "$code_sign_cmd" 131 | eval "$code_sign_cmd" 132 | fi 133 | } 134 | 135 | # Strip invalid architectures 136 | strip_invalid_archs() { 137 | binary="$1" 138 | # Get architectures for current target binary 139 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 140 | # Intersect them with the architectures we are building for 141 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 142 | # If there are no archs supported by this binary then warn the user 143 | if [[ -z "$intersected_archs" ]]; then 144 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 145 | STRIP_BINARY_RETVAL=0 146 | return 147 | fi 148 | stripped="" 149 | for arch in $binary_archs; do 150 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 151 | # Strip non-valid architectures in-place 152 | lipo -remove "$arch" -output "$binary" "$binary" 153 | stripped="$stripped $arch" 154 | fi 155 | done 156 | if [[ "$stripped" ]]; then 157 | echo "Stripped $binary of architectures:$stripped" 158 | fi 159 | STRIP_BINARY_RETVAL=1 160 | } 161 | 162 | install_artifact() { 163 | artifact="$1" 164 | base="$(basename "$artifact")" 165 | case $base in 166 | *.framework) 167 | install_framework "$artifact" 168 | ;; 169 | *.dSYM) 170 | install_dsym "$artifact" 171 | ;; 172 | *.bcsymbolmap) 173 | install_bcsymbolmap "$artifact" 174 | ;; 175 | *) 176 | echo "error: Unrecognized artifact "$artifact"" 177 | ;; 178 | esac 179 | } 180 | 181 | copy_artifacts() { 182 | file_list="$1" 183 | while read artifact; do 184 | install_artifact "$artifact" 185 | done <$file_list 186 | } 187 | 188 | ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" 189 | if [ -r "${ARTIFACT_LIST_FILE}" ]; then 190 | copy_artifacts "${ARTIFACT_LIST_FILE}" 191 | fi 192 | 193 | if [[ "$CONFIGURATION" == "Debug" ]]; then 194 | install_framework "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework" 195 | install_framework "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework" 196 | install_framework "${BUILT_PRODUCTS_DIR}/CordovaPlugins/CordovaPlugins.framework" 197 | fi 198 | if [[ "$CONFIGURATION" == "Release" ]]; then 199 | install_framework "${BUILT_PRODUCTS_DIR}/Capacitor/Capacitor.framework" 200 | install_framework "${BUILT_PRODUCTS_DIR}/CapacitorCordova/Cordova.framework" 201 | install_framework "${BUILT_PRODUCTS_DIR}/CordovaPlugins/CordovaPlugins.framework" 202 | fi 203 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 204 | wait 205 | fi 206 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 12 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # resources to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 18 | 19 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 20 | > "$RESOURCES_TO_COPY" 21 | 22 | XCASSET_FILES=() 23 | 24 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 25 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 26 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 27 | 28 | case "${TARGETED_DEVICE_FAMILY:-}" in 29 | 1,2) 30 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 31 | ;; 32 | 1) 33 | TARGET_DEVICE_ARGS="--target-device iphone" 34 | ;; 35 | 2) 36 | TARGET_DEVICE_ARGS="--target-device ipad" 37 | ;; 38 | 3) 39 | TARGET_DEVICE_ARGS="--target-device tv" 40 | ;; 41 | 4) 42 | TARGET_DEVICE_ARGS="--target-device watch" 43 | ;; 44 | *) 45 | TARGET_DEVICE_ARGS="--target-device mac" 46 | ;; 47 | esac 48 | 49 | install_resource() 50 | { 51 | if [[ "$1" = /* ]] ; then 52 | RESOURCE_PATH="$1" 53 | else 54 | RESOURCE_PATH="${PODS_ROOT}/$1" 55 | fi 56 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 57 | cat << EOM 58 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 59 | EOM 60 | exit 1 61 | fi 62 | case $RESOURCE_PATH in 63 | *.storyboard) 64 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 65 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 66 | ;; 67 | *.xib) 68 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 69 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 70 | ;; 71 | *.framework) 72 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 73 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 74 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 75 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 76 | ;; 77 | *.xcdatamodel) 78 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 79 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 80 | ;; 81 | *.xcdatamodeld) 82 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 83 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 84 | ;; 85 | *.xcmappingmodel) 86 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 87 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 88 | ;; 89 | *.xcassets) 90 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 91 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 92 | ;; 93 | *) 94 | echo "$RESOURCE_PATH" || true 95 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 96 | ;; 97 | esac 98 | } 99 | if [[ "$CONFIGURATION" == "Debug" ]]; then 100 | install_resource "${PODS_ROOT}/../../capacitor-cordova-ios-plugins/resources/scannerOverlay.xib" 101 | install_resource "${PODS_ROOT}/../../capacitor-cordova-ios-plugins/resources/CDVBarcodeScanner.bundle" 102 | fi 103 | if [[ "$CONFIGURATION" == "Release" ]]; then 104 | install_resource "${PODS_ROOT}/../../capacitor-cordova-ios-plugins/resources/scannerOverlay.xib" 105 | install_resource "${PODS_ROOT}/../../capacitor-cordova-ios-plugins/resources/CDVBarcodeScanner.bundle" 106 | fi 107 | 108 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 109 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 110 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 111 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 112 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 113 | fi 114 | rm -f "$RESOURCES_TO_COPY" 115 | 116 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 117 | then 118 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 119 | OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d) 120 | while read line; do 121 | if [[ $line != "${PODS_ROOT}*" ]]; then 122 | XCASSET_FILES+=("$line") 123 | fi 124 | done <<<"$OTHER_XCASSETS" 125 | 126 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 127 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 128 | else 129 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 130 | fi 131 | fi 132 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AppVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AppVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Capacitor" "${PODS_CONFIGURATION_BUILD_DIR}/CapacitorCordova" "${PODS_CONFIGURATION_BUILD_DIR}/CordovaPlugins" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Capacitor/Capacitor.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CapacitorCordova/Cordova.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CordovaPlugins/CordovaPlugins.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "AudioToolbox" -framework "Capacitor" -framework "Cordova" -framework "CordovaPlugins" -framework "WebKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_App { 2 | umbrella header "Pods-App-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Capacitor" "${PODS_CONFIGURATION_BUILD_DIR}/CapacitorCordova" "${PODS_CONFIGURATION_BUILD_DIR}/CordovaPlugins" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Capacitor/Capacitor.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CapacitorCordova/Cordova.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CordovaPlugins/CordovaPlugins.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "AVFoundation" -framework "AudioToolbox" -framework "Capacitor" -framework "Cordova" -framework "CordovaPlugins" -framework "WebKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /ios/App/public/cordova.js: -------------------------------------------------------------------------------- 1 | // Platform: Capacitor 2 | /* 3 | Licensed to the Apache Software Foundation (ASF) under one 4 | or more contributor license agreements. See the NOTICE file 5 | distributed with this work for additional information 6 | regarding copyright ownership. The ASF licenses this file 7 | to you under the Apache License, Version 2.0 (the 8 | "License"); you may not use this file except in compliance 9 | with the License. You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, 14 | software distributed under the License is distributed on an 15 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | KIND, either express or implied. See the License for the 17 | specific language governing permissions and limitations 18 | under the License. 19 | */ 20 | ; (function () { 21 | var PLATFORM_VERSION_BUILD_LABEL = '1.0.0'; 22 | // file: src/scripts/require.js 23 | 24 | /* jshint -W079 */ 25 | /* jshint -W020 */ 26 | 27 | var require; 28 | var define; 29 | 30 | (function () { 31 | var modules = {}; 32 | // Stack of moduleIds currently being built. 33 | var requireStack = []; 34 | // Map of module ID -> index into requireStack of modules currently being built. 35 | var inProgressModules = {}; 36 | var SEPARATOR = '.'; 37 | 38 | function build(module) { 39 | var factory = module.factory; 40 | var localRequire = function (id) { 41 | var resultantId = id; 42 | // Its a relative path, so lop off the last portion and add the id (minus "./") 43 | if (id.charAt(0) === '.') { 44 | resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2); 45 | } 46 | return require(resultantId); 47 | }; 48 | module.exports = {}; 49 | delete module.factory; 50 | factory(localRequire, module.exports, module); 51 | return module.exports; 52 | } 53 | 54 | require = function (id) { 55 | if (!modules[id]) { 56 | throw 'module ' + id + ' not found'; 57 | } else if (id in inProgressModules) { 58 | var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; 59 | throw 'Cycle in require graph: ' + cycle; 60 | } 61 | if (modules[id].factory) { 62 | try { 63 | inProgressModules[id] = requireStack.length; 64 | requireStack.push(id); 65 | return build(modules[id]); 66 | } finally { 67 | delete inProgressModules[id]; 68 | requireStack.pop(); 69 | } 70 | } 71 | return modules[id].exports; 72 | }; 73 | 74 | define = function (id, factory) { 75 | if (modules[id]) { 76 | throw 'module ' + id + ' already defined'; 77 | } 78 | 79 | modules[id] = { 80 | id: id, 81 | factory: factory 82 | }; 83 | }; 84 | 85 | define.remove = function (id) { 86 | delete modules[id]; 87 | }; 88 | 89 | define.moduleMap = modules; 90 | })(); 91 | 92 | // Export for use in node 93 | if (typeof module === 'object' && typeof require === 'function') { 94 | module.exports.require = require; 95 | module.exports.define = define; 96 | } 97 | 98 | // file: src/cordova.js 99 | define("cordova", function (require, exports, module) { 100 | 101 | var channel = require('cordova/channel'); 102 | var platform = require('cordova/platform'); 103 | 104 | /** 105 | * Intercept calls to addEventListener + removeEventListener and handle deviceready, 106 | * resume, and pause events. 107 | */ 108 | var m_document_addEventListener = document.addEventListener; 109 | var m_document_removeEventListener = document.removeEventListener; 110 | var m_window_addEventListener = window.addEventListener; 111 | var m_window_removeEventListener = window.removeEventListener; 112 | 113 | /** 114 | * Houses custom event handlers to intercept on document + window event listeners. 115 | */ 116 | var documentEventHandlers = {}; 117 | var windowEventHandlers = {}; 118 | 119 | document.addEventListener = function (evt, handler, capture) { 120 | var e = evt.toLowerCase(); 121 | if (typeof documentEventHandlers[e] !== 'undefined') { 122 | documentEventHandlers[e].subscribe(handler); 123 | } else { 124 | m_document_addEventListener.call(document, evt, handler, capture); 125 | } 126 | }; 127 | 128 | window.addEventListener = function (evt, handler, capture) { 129 | var e = evt.toLowerCase(); 130 | if (typeof windowEventHandlers[e] !== 'undefined') { 131 | windowEventHandlers[e].subscribe(handler); 132 | } else { 133 | m_window_addEventListener.call(window, evt, handler, capture); 134 | } 135 | }; 136 | 137 | document.removeEventListener = function (evt, handler, capture) { 138 | var e = evt.toLowerCase(); 139 | // If unsubscribing from an event that is handled by a plugin 140 | if (typeof documentEventHandlers[e] !== 'undefined') { 141 | documentEventHandlers[e].unsubscribe(handler); 142 | } else { 143 | m_document_removeEventListener.call(document, evt, handler, capture); 144 | } 145 | }; 146 | 147 | window.removeEventListener = function (evt, handler, capture) { 148 | var e = evt.toLowerCase(); 149 | // If unsubscribing from an event that is handled by a plugin 150 | if (typeof windowEventHandlers[e] !== 'undefined') { 151 | windowEventHandlers[e].unsubscribe(handler); 152 | } else { 153 | m_window_removeEventListener.call(window, evt, handler, capture); 154 | } 155 | }; 156 | 157 | /* eslint-disable no-undef */ 158 | var cordova = { 159 | define: define, 160 | require: require, 161 | version: PLATFORM_VERSION_BUILD_LABEL, 162 | platformVersion: PLATFORM_VERSION_BUILD_LABEL, 163 | platformId: platform.id, 164 | 165 | /* eslint-enable no-undef */ 166 | 167 | /** 168 | * Methods to add/remove your own addEventListener hijacking on document + window. 169 | */ 170 | addWindowEventHandler: function (event) { 171 | return (windowEventHandlers[event] = channel.create(event)); 172 | }, 173 | addStickyDocumentEventHandler: function (event) { 174 | return (documentEventHandlers[event] = channel.createSticky(event)); 175 | }, 176 | addDocumentEventHandler: function (event) { 177 | return (documentEventHandlers[event] = channel.create(event)); 178 | }, 179 | removeWindowEventHandler: function (event) { 180 | delete windowEventHandlers[event]; 181 | }, 182 | removeDocumentEventHandler: function (event) { 183 | delete documentEventHandlers[event]; 184 | }, 185 | /** 186 | * Retrieve original event handlers that were replaced by Cordova 187 | * 188 | * @return object 189 | */ 190 | getOriginalHandlers: function () { 191 | return { 192 | 'document': { 'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener }, 193 | 'window': { 'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener } 194 | }; 195 | }, 196 | /** 197 | * Method to fire event from native code 198 | * bNoDetach is required for events which cause an exception which needs to be caught in native code 199 | */ 200 | fireDocumentEvent: function (type, data, bNoDetach) { 201 | var evt = Capacitor.createEvent(type, data); 202 | if (typeof documentEventHandlers[type] !== 'undefined') { 203 | if (bNoDetach) { 204 | documentEventHandlers[type].fire(evt); 205 | } else { 206 | setTimeout(function () { 207 | // Fire deviceready on listeners that were registered before cordova.js was loaded. 208 | if (type === 'deviceready') { 209 | document.dispatchEvent(evt); 210 | } 211 | documentEventHandlers[type].fire(evt); 212 | }, 0); 213 | } 214 | } else { 215 | document.dispatchEvent(evt); 216 | } 217 | }, 218 | fireWindowEvent: function (type, data) { 219 | var evt = Capacitor.createEvent(type, data); 220 | if (typeof windowEventHandlers[type] !== 'undefined') { 221 | setTimeout(function () { 222 | windowEventHandlers[type].fire(evt); 223 | }, 0); 224 | } else { 225 | window.dispatchEvent(evt); 226 | } 227 | }, 228 | 229 | /** 230 | * Plugin callback mechanism. 231 | */ 232 | // Randomize the starting callbackId to avoid collisions after refreshing or navigating. 233 | // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. 234 | callbackId: Math.floor(Math.random() * 2000000000), 235 | callbacks: {}, 236 | callbackStatus: { 237 | NO_RESULT: 0, 238 | OK: 1, 239 | CLASS_NOT_FOUND_EXCEPTION: 2, 240 | ILLEGAL_ACCESS_EXCEPTION: 3, 241 | INSTANTIATION_EXCEPTION: 4, 242 | MALFORMED_URL_EXCEPTION: 5, 243 | IO_EXCEPTION: 6, 244 | INVALID_ACTION: 7, 245 | JSON_EXCEPTION: 8, 246 | ERROR: 9 247 | }, 248 | 249 | /** 250 | * Called by native code when returning successful result from an action. 251 | */ 252 | callbackSuccess: function (callbackId, args) { 253 | cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); 254 | }, 255 | 256 | /** 257 | * Called by native code when returning error result from an action. 258 | */ 259 | callbackError: function (callbackId, args) { 260 | // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. 261 | // Derive success from status. 262 | cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); 263 | }, 264 | 265 | /** 266 | * Called by native code when returning the result from an action. 267 | */ 268 | callbackFromNative: function (callbackId, isSuccess, status, args, keepCallback) { 269 | try { 270 | var callback = cordova.callbacks[callbackId]; 271 | if (callback) { 272 | if (isSuccess && status === cordova.callbackStatus.OK) { 273 | callback.success && callback.success.apply(null, args); 274 | } else if (!isSuccess) { 275 | callback.fail && callback.fail.apply(null, args); 276 | } 277 | /* 278 | else 279 | Note, this case is intentionally not caught. 280 | this can happen if isSuccess is true, but callbackStatus is NO_RESULT 281 | which is used to remove a callback from the list without calling the callbacks 282 | typically keepCallback is false in this case 283 | */ 284 | // Clear callback if not expecting any more results 285 | if (!keepCallback) { 286 | delete cordova.callbacks[callbackId]; 287 | } 288 | } 289 | } catch (err) { 290 | var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err; 291 | console && console.log && console.log(msg); 292 | cordova.fireWindowEvent('cordovacallbackerror', { 'message': msg }); 293 | throw err; 294 | } 295 | }, 296 | addConstructor: function (func) { 297 | channel.onCordovaReady.subscribe(function () { 298 | try { 299 | func(); 300 | } catch (e) { 301 | console.log('Failed to run constructor: ' + e); 302 | } 303 | }); 304 | } 305 | }; 306 | 307 | module.exports = cordova; 308 | 309 | }); 310 | 311 | // file: src/common/argscheck.js 312 | define("cordova/argscheck", function (require, exports, module) { 313 | 314 | var utils = require('cordova/utils'); 315 | 316 | var moduleExports = module.exports; 317 | 318 | var typeMap = { 319 | 'A': 'Array', 320 | 'D': 'Date', 321 | 'N': 'Number', 322 | 'S': 'String', 323 | 'F': 'Function', 324 | 'O': 'Object' 325 | }; 326 | 327 | function extractParamName(callee, argIndex) { 328 | return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex]; 329 | } 330 | 331 | function checkArgs(spec, functionName, args, opt_callee) { 332 | if (!moduleExports.enableChecks) { 333 | return; 334 | } 335 | var errMsg = null; 336 | var typeName; 337 | for (var i = 0; i < spec.length; ++i) { 338 | var c = spec.charAt(i); 339 | var cUpper = c.toUpperCase(); 340 | var arg = args[i]; 341 | // Asterix means allow anything. 342 | if (c === '*') { 343 | continue; 344 | } 345 | typeName = utils.typeName(arg); 346 | if ((arg === null || arg === undefined) && c === cUpper) { 347 | continue; 348 | } 349 | if (typeName !== typeMap[cUpper]) { 350 | errMsg = 'Expected ' + typeMap[cUpper]; 351 | break; 352 | } 353 | } 354 | if (errMsg) { 355 | errMsg += ', but got ' + typeName + '.'; 356 | errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; 357 | // Don't log when running unit tests. 358 | if (typeof jasmine === 'undefined') { 359 | console.error(errMsg); 360 | } 361 | throw TypeError(errMsg); 362 | } 363 | } 364 | 365 | function getValue(value, defaultValue) { 366 | return value === undefined ? defaultValue : value; 367 | } 368 | 369 | moduleExports.checkArgs = checkArgs; 370 | moduleExports.getValue = getValue; 371 | moduleExports.enableChecks = true; 372 | 373 | }); 374 | 375 | // file: src/common/base64.js 376 | define("cordova/base64", function (require, exports, module) { 377 | 378 | var base64 = exports; 379 | 380 | base64.fromArrayBuffer = function (arrayBuffer) { 381 | var array = new Uint8Array(arrayBuffer); 382 | return uint8ToBase64(array); 383 | }; 384 | 385 | base64.toArrayBuffer = function (str) { 386 | var decodedStr = typeof atob !== 'undefined' ? atob(str) : Buffer.from(str, 'base64').toString('binary'); // eslint-disable-line no-undef 387 | var arrayBuffer = new ArrayBuffer(decodedStr.length); 388 | var array = new Uint8Array(arrayBuffer); 389 | for (var i = 0, len = decodedStr.length; i < len; i++) { 390 | array[i] = decodedStr.charCodeAt(i); 391 | } 392 | return arrayBuffer; 393 | }; 394 | 395 | // ------------------------------------------------------------------------------ 396 | 397 | /* This code is based on the performance tests at http://jsperf.com/b64tests 398 | * This 12-bit-at-a-time algorithm was the best performing version on all 399 | * platforms tested. 400 | */ 401 | 402 | var b64_6bit = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 403 | var b64_12bit; 404 | 405 | var b64_12bitTable = function () { 406 | b64_12bit = []; 407 | for (var i = 0; i < 64; i++) { 408 | for (var j = 0; j < 64; j++) { 409 | b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j]; 410 | } 411 | } 412 | b64_12bitTable = function () { return b64_12bit; }; 413 | return b64_12bit; 414 | }; 415 | 416 | function uint8ToBase64(rawData) { 417 | var numBytes = rawData.byteLength; 418 | var output = ''; 419 | var segment; 420 | var table = b64_12bitTable(); 421 | for (var i = 0; i < numBytes - 2; i += 3) { 422 | segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2]; 423 | output += table[segment >> 12]; 424 | output += table[segment & 0xfff]; 425 | } 426 | if (numBytes - i === 2) { 427 | segment = (rawData[i] << 16) + (rawData[i + 1] << 8); 428 | output += table[segment >> 12]; 429 | output += b64_6bit[(segment & 0xfff) >> 6]; 430 | output += '='; 431 | } else if (numBytes - i === 1) { 432 | segment = (rawData[i] << 16); 433 | output += table[segment >> 12]; 434 | output += '=='; 435 | } 436 | return output; 437 | } 438 | 439 | }); 440 | 441 | // file: src/common/builder.js 442 | define("cordova/builder", function (require, exports, module) { 443 | 444 | var utils = require('cordova/utils'); 445 | 446 | function each(objects, func, context) { 447 | for (var prop in objects) { 448 | if (objects.hasOwnProperty(prop)) { 449 | func.apply(context, [objects[prop], prop]); 450 | } 451 | } 452 | } 453 | 454 | function clobber(obj, key, value) { 455 | exports.replaceHookForTesting(obj, key); 456 | var needsProperty = false; 457 | try { 458 | obj[key] = value; 459 | } catch (e) { 460 | needsProperty = true; 461 | } 462 | // Getters can only be overridden by getters. 463 | if (needsProperty || obj[key] !== value) { 464 | utils.defineGetter(obj, key, function () { 465 | return value; 466 | }); 467 | } 468 | } 469 | 470 | function assignOrWrapInDeprecateGetter(obj, key, value, message) { 471 | if (message) { 472 | utils.defineGetter(obj, key, function () { 473 | console.log(message); 474 | delete obj[key]; 475 | clobber(obj, key, value); 476 | return value; 477 | }); 478 | } else { 479 | clobber(obj, key, value); 480 | } 481 | } 482 | 483 | function include(parent, objects, clobber, merge) { 484 | each(objects, function (obj, key) { 485 | try { 486 | var result = obj.path ? require(obj.path) : {}; 487 | 488 | if (clobber) { 489 | // Clobber if it doesn't exist. 490 | if (typeof parent[key] === 'undefined') { 491 | assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); 492 | } else if (typeof obj.path !== 'undefined') { 493 | // If merging, merge properties onto parent, otherwise, clobber. 494 | if (merge) { 495 | recursiveMerge(parent[key], result); 496 | } else { 497 | assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); 498 | } 499 | } 500 | result = parent[key]; 501 | } else { 502 | // Overwrite if not currently defined. 503 | if (typeof parent[key] === 'undefined') { 504 | assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); 505 | } else { 506 | // Set result to what already exists, so we can build children into it if they exist. 507 | result = parent[key]; 508 | } 509 | } 510 | 511 | if (obj.children) { 512 | include(result, obj.children, clobber, merge); 513 | } 514 | } catch (e) { 515 | utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); 516 | } 517 | }); 518 | } 519 | 520 | /** 521 | * Merge properties from one object onto another recursively. Properties from 522 | * the src object will overwrite existing target property. 523 | * 524 | * @param target Object to merge properties into. 525 | * @param src Object to merge properties from. 526 | */ 527 | function recursiveMerge(target, src) { 528 | for (var prop in src) { 529 | if (src.hasOwnProperty(prop)) { 530 | if (target.prototype && target.prototype.constructor === target) { 531 | // If the target object is a constructor override off prototype. 532 | clobber(target.prototype, prop, src[prop]); 533 | } else { 534 | if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { 535 | recursiveMerge(target[prop], src[prop]); 536 | } else { 537 | clobber(target, prop, src[prop]); 538 | } 539 | } 540 | } 541 | } 542 | } 543 | 544 | exports.buildIntoButDoNotClobber = function (objects, target) { 545 | include(target, objects, false, false); 546 | }; 547 | exports.buildIntoAndClobber = function (objects, target) { 548 | include(target, objects, true, false); 549 | }; 550 | exports.buildIntoAndMerge = function (objects, target) { 551 | include(target, objects, true, true); 552 | }; 553 | exports.recursiveMerge = recursiveMerge; 554 | exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; 555 | exports.replaceHookForTesting = function () { }; 556 | 557 | }); 558 | 559 | // file: src/common/channel.js 560 | define("cordova/channel", function (require, exports, module) { 561 | 562 | var utils = require('cordova/utils'); 563 | var nextGuid = 1; 564 | 565 | /** 566 | * Custom pub-sub "channel" that can have functions subscribed to it 567 | * This object is used to define and control firing of events for 568 | * cordova initialization, as well as for custom events thereafter. 569 | * 570 | * The order of events during page load and Cordova startup is as follows: 571 | * 572 | * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. 573 | * onNativeReady* Internal event that indicates the Cordova native side is ready. 574 | * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. 575 | * onDeviceReady* User event fired to indicate that Cordova is ready 576 | * onResume User event fired to indicate a start/resume lifecycle event 577 | * onPause User event fired to indicate a pause lifecycle event 578 | * 579 | * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. 580 | * All listeners that subscribe after the event is fired will be executed right away. 581 | * 582 | * The only Cordova events that user code should register for are: 583 | * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript 584 | * pause App has moved to background 585 | * resume App has returned to foreground 586 | * 587 | * Listeners can be registered as: 588 | * document.addEventListener("deviceready", myDeviceReadyListener, false); 589 | * document.addEventListener("resume", myResumeListener, false); 590 | * document.addEventListener("pause", myPauseListener, false); 591 | * 592 | * The DOM lifecycle events should be used for saving and restoring state 593 | * window.onload 594 | * window.onunload 595 | * 596 | */ 597 | 598 | /** 599 | * Channel 600 | * @constructor 601 | * @param type String the channel name 602 | */ 603 | var Channel = function (type, sticky) { 604 | this.type = type; 605 | // Map of guid -> function. 606 | this.handlers = {}; 607 | // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. 608 | this.state = sticky ? 1 : 0; 609 | // Used in sticky mode to remember args passed to fire(). 610 | this.fireArgs = null; 611 | // Used by onHasSubscribersChange to know if there are any listeners. 612 | this.numHandlers = 0; 613 | // Function that is called when the first listener is subscribed, or when 614 | // the last listener is unsubscribed. 615 | this.onHasSubscribersChange = null; 616 | }; 617 | var channel = { 618 | /** 619 | * Calls the provided function only after all of the channels specified 620 | * have been fired. All channels must be sticky channels. 621 | */ 622 | join: function (h, c) { 623 | var len = c.length; 624 | var i = len; 625 | var f = function () { 626 | if (!(--i)) h(); 627 | }; 628 | for (var j = 0; j < len; j++) { 629 | if (c[j].state === 0) { 630 | throw Error('Can only use join with sticky channels.'); 631 | } 632 | c[j].subscribe(f); 633 | } 634 | if (!len) h(); 635 | }, 636 | /* eslint-disable no-return-assign */ 637 | create: function (type) { 638 | return channel[type] = new Channel(type, false); 639 | }, 640 | createSticky: function (type) { 641 | return channel[type] = new Channel(type, true); 642 | }, 643 | /* eslint-enable no-return-assign */ 644 | /** 645 | * cordova Channels that must fire before "deviceready" is fired. 646 | */ 647 | deviceReadyChannelsArray: [], 648 | deviceReadyChannelsMap: {}, 649 | 650 | /** 651 | * Indicate that a feature needs to be initialized before it is ready to be used. 652 | * This holds up Cordova's "deviceready" event until the feature has been initialized 653 | * and Cordova.initComplete(feature) is called. 654 | * 655 | * @param feature {String} The unique feature name 656 | */ 657 | waitForInitialization: function (feature) { 658 | if (feature) { 659 | var c = channel[feature] || this.createSticky(feature); 660 | this.deviceReadyChannelsMap[feature] = c; 661 | this.deviceReadyChannelsArray.push(c); 662 | } 663 | }, 664 | 665 | /** 666 | * Indicate that initialization code has completed and the feature is ready to be used. 667 | * 668 | * @param feature {String} The unique feature name 669 | */ 670 | initializationComplete: function (feature) { 671 | var c = this.deviceReadyChannelsMap[feature]; 672 | if (c) { 673 | c.fire(); 674 | } 675 | } 676 | }; 677 | 678 | function checkSubscriptionArgument(argument) { 679 | if (typeof argument !== 'function' && typeof argument.handleEvent !== 'function') { 680 | throw new Error( 681 | 'Must provide a function or an EventListener object ' + 682 | 'implementing the handleEvent interface.' 683 | ); 684 | } 685 | } 686 | 687 | /** 688 | * Subscribes the given function to the channel. Any time that 689 | * Channel.fire is called so too will the function. 690 | * Optionally specify an execution context for the function 691 | * and a guid that can be used to stop subscribing to the channel. 692 | * Returns the guid. 693 | */ 694 | Channel.prototype.subscribe = function (eventListenerOrFunction, eventListener) { 695 | checkSubscriptionArgument(eventListenerOrFunction); 696 | var handleEvent, guid; 697 | 698 | if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') { 699 | // Received an EventListener object implementing the handleEvent interface 700 | handleEvent = eventListenerOrFunction.handleEvent; 701 | eventListener = eventListenerOrFunction; 702 | } else { 703 | // Received a function to handle event 704 | handleEvent = eventListenerOrFunction; 705 | } 706 | 707 | if (this.state === 2) { 708 | handleEvent.apply(eventListener || this, this.fireArgs); 709 | return; 710 | } 711 | 712 | guid = eventListenerOrFunction.observer_guid; 713 | if (typeof eventListener === 'object') { 714 | handleEvent = utils.close(eventListener, handleEvent); 715 | } 716 | 717 | if (!guid) { 718 | // First time any channel has seen this subscriber 719 | guid = '' + nextGuid++; 720 | } 721 | handleEvent.observer_guid = guid; 722 | eventListenerOrFunction.observer_guid = guid; 723 | 724 | // Don't add the same handler more than once. 725 | if (!this.handlers[guid]) { 726 | this.handlers[guid] = handleEvent; 727 | this.numHandlers++; 728 | if (this.numHandlers === 1) { 729 | this.onHasSubscribersChange && this.onHasSubscribersChange(); 730 | } 731 | } 732 | }; 733 | 734 | /** 735 | * Unsubscribes the function with the given guid from the channel. 736 | */ 737 | Channel.prototype.unsubscribe = function (eventListenerOrFunction) { 738 | checkSubscriptionArgument(eventListenerOrFunction); 739 | var handleEvent, guid, handler; 740 | 741 | if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') { 742 | // Received an EventListener object implementing the handleEvent interface 743 | handleEvent = eventListenerOrFunction.handleEvent; 744 | } else { 745 | // Received a function to handle event 746 | handleEvent = eventListenerOrFunction; 747 | } 748 | 749 | guid = handleEvent.observer_guid; 750 | handler = this.handlers[guid]; 751 | if (handler) { 752 | delete this.handlers[guid]; 753 | this.numHandlers--; 754 | if (this.numHandlers === 0) { 755 | this.onHasSubscribersChange && this.onHasSubscribersChange(); 756 | } 757 | } 758 | }; 759 | 760 | /** 761 | * Calls all functions subscribed to this channel. 762 | */ 763 | Channel.prototype.fire = function (e) { 764 | var fail = false; // eslint-disable-line no-unused-vars 765 | var fireArgs = Array.prototype.slice.call(arguments); 766 | // Apply stickiness. 767 | if (this.state === 1) { 768 | this.state = 2; 769 | this.fireArgs = fireArgs; 770 | } 771 | if (this.numHandlers) { 772 | // Copy the values first so that it is safe to modify it from within 773 | // callbacks. 774 | var toCall = []; 775 | for (var item in this.handlers) { 776 | toCall.push(this.handlers[item]); 777 | } 778 | for (var i = 0; i < toCall.length; ++i) { 779 | toCall[i].apply(this, fireArgs); 780 | } 781 | if (this.state === 2 && this.numHandlers) { 782 | this.numHandlers = 0; 783 | this.handlers = {}; 784 | this.onHasSubscribersChange && this.onHasSubscribersChange(); 785 | } 786 | } 787 | }; 788 | 789 | // defining them here so they are ready super fast! 790 | // DOM event that is received when the web page is loaded and parsed. 791 | channel.createSticky('onDOMContentLoaded'); 792 | 793 | // Event to indicate the Cordova native side is ready. 794 | channel.createSticky('onNativeReady'); 795 | 796 | // Event to indicate that all Cordova JavaScript objects have been created 797 | // and it's time to run plugin constructors. 798 | channel.createSticky('onCordovaReady'); 799 | 800 | // Event to indicate that all automatically loaded JS plugins are loaded and ready. 801 | // FIXME remove this 802 | channel.createSticky('onPluginsReady'); 803 | 804 | // Event to indicate that Cordova is ready 805 | channel.createSticky('onDeviceReady'); 806 | 807 | // Event to indicate a resume lifecycle event 808 | channel.create('onResume'); 809 | 810 | // Event to indicate a pause lifecycle event 811 | channel.create('onPause'); 812 | 813 | // Channels that must fire before "deviceready" is fired. 814 | channel.waitForInitialization('onCordovaReady'); 815 | channel.waitForInitialization('onDOMContentLoaded'); 816 | 817 | module.exports = channel; 818 | 819 | }); 820 | 821 | define("cordova/exec", function (require, exports, module) { 822 | 823 | /*global require, module, atob, document */ 824 | 825 | /** 826 | * Creates a gap bridge iframe used to notify the native code about queued 827 | * commands. 828 | */ 829 | var cordova = require('cordova'), 830 | utils = require('cordova/utils'), 831 | base64 = require('cordova/base64'), 832 | execIframe, 833 | commandQueue = [], // Contains pending JS->Native messages. 834 | isInContextOfEvalJs = 0, 835 | failSafeTimerId = 0; 836 | 837 | function massageArgsJsToNative(args) { 838 | if (window.androidBridge) { 839 | for (var i = 0; i < args.length; i++) { 840 | if (utils.typeName(args[i]) == 'ArrayBuffer') { 841 | args[i] = base64.fromArrayBuffer(args[i]); 842 | } 843 | } 844 | return args; 845 | } else { 846 | if (!args || utils.typeName(args) !== 'Array') { 847 | return args; 848 | } 849 | var ret = []; 850 | args.forEach(function (arg, i) { 851 | if (utils.typeName(arg) === 'ArrayBuffer') { 852 | ret.push({ 853 | 'CDVType': 'ArrayBuffer', 854 | 'data': base64.fromArrayBuffer(arg) 855 | }); 856 | } else { 857 | ret.push(arg); 858 | } 859 | }); 860 | return ret; 861 | } 862 | } 863 | 864 | function massageMessageNativeToJs(message) { 865 | if (message.CDVType === 'ArrayBuffer') { 866 | var stringToArrayBuffer = function (str) { 867 | var ret = new Uint8Array(str.length); 868 | for (var i = 0; i < str.length; i++) { 869 | ret[i] = str.charCodeAt(i); 870 | } 871 | return ret.buffer; 872 | }; 873 | var base64ToArrayBuffer = function (b64) { 874 | return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef 875 | }; 876 | message = base64ToArrayBuffer(message.data); 877 | } 878 | return message; 879 | } 880 | 881 | function convertMessageToArgsNativeToJs(message) { 882 | var args = []; 883 | if (!message || !message.hasOwnProperty('CDVType')) { 884 | args.push(message); 885 | } else if (message.CDVType === 'MultiPart') { 886 | message.messages.forEach(function (e) { 887 | args.push(massageMessageNativeToJs(e)); 888 | }); 889 | } else { 890 | args.push(massageMessageNativeToJs(message)); 891 | } 892 | return args; 893 | } 894 | 895 | var capacitorExec = function () { 896 | // detect change in bridge, if there is a change, we forward to new bridge 897 | 898 | var successCallback, failCallback, service, action, actionArgs; 899 | var callbackId = null; 900 | if (typeof arguments[0] !== 'string') { 901 | // FORMAT ONE 902 | successCallback = arguments[0]; 903 | failCallback = arguments[1]; 904 | service = arguments[2]; 905 | action = arguments[3]; 906 | actionArgs = arguments[4]; 907 | 908 | // Since we need to maintain backwards compatibility, we have to pass 909 | // an invalid callbackId even if no callback was provided since plugins 910 | // will be expecting it. The Cordova.exec() implementation allocates 911 | // an invalid callbackId and passes it even if no callbacks were given. 912 | callbackId = 'INVALID'; 913 | } else { 914 | throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line 915 | 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'); 916 | } 917 | 918 | // If actionArgs is not provided, default to an empty array 919 | actionArgs = actionArgs || []; 920 | 921 | // Register the callbacks and add the callbackId to the positional 922 | // arguments if given. 923 | if (successCallback || failCallback) { 924 | callbackId = service + cordova.callbackId++; 925 | cordova.callbacks[callbackId] = 926 | { success: successCallback, fail: failCallback }; 927 | } 928 | 929 | // Properly encode ArrayBuffer action arguments 930 | actionArgs = massageArgsJsToNative(actionArgs); 931 | actionArgs = JSON.parse(JSON.stringify(actionArgs)); 932 | var command = { 933 | type: 'cordova', 934 | callbackId: callbackId, 935 | service: service, 936 | action: action, 937 | actionArgs: actionArgs 938 | }; 939 | if (window.androidBridge) { 940 | window.androidBridge.postMessage(JSON.stringify(command)); 941 | } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.bridge) { 942 | window.webkit.messageHandlers.bridge.postMessage(command); 943 | } 944 | 945 | }; 946 | 947 | // CB-10530 948 | function proxyChanged() { 949 | var cexec = cordovaExec(); 950 | 951 | return (execProxy !== cexec && // proxy objects are different 952 | capacitorExec !== cexec // proxy object is not the current capacitorExec 953 | ); 954 | } 955 | 956 | // CB-10106 957 | function handleBridgeChange() { 958 | if (proxyChanged()) { 959 | var commandString = commandQueue.shift(); 960 | while (commandString) { 961 | var command = JSON.parse(commandString); 962 | var callbackId = command[0]; 963 | var service = command[1]; 964 | var action = command[2]; 965 | var actionArgs = command[3]; 966 | var callbacks = cordova.callbacks[callbackId] || {}; 967 | 968 | execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); 969 | 970 | commandString = commandQueue.shift(); 971 | }; 972 | return true; 973 | } 974 | 975 | return false; 976 | } 977 | 978 | function pokeNative() { 979 | // CB-5488 - Don't attempt to create iframe before document.body is available. 980 | if (!document.body) { 981 | setTimeout(pokeNative); 982 | return; 983 | } 984 | 985 | // Check if they've removed it from the DOM, and put it back if so. 986 | if (execIframe && execIframe.contentWindow) { 987 | execIframe.contentWindow.location = 'gap://ready'; 988 | } else { 989 | execIframe = document.createElement('iframe'); 990 | execIframe.style.display = 'none'; 991 | execIframe.src = 'gap://ready'; 992 | document.body.appendChild(execIframe); 993 | } 994 | // Use a timer to protect against iframe being unloaded during the poke (CB-7735). 995 | // This makes the bridge ~ 7% slower, but works around the poke getting lost 996 | // when the iframe is removed from the DOM. 997 | // An onunload listener could be used in the case where the iframe has just been 998 | // created, but since unload events fire only once, it doesn't work in the normal 999 | // case of iframe reuse (where unload will have already fired due to the attempted 1000 | // navigation of the page). 1001 | failSafeTimerId = setTimeout(function () { 1002 | if (commandQueue.length) { 1003 | // CB-10106 - flush the queue on bridge change 1004 | if (!handleBridgeChange()) { 1005 | pokeNative(); 1006 | } 1007 | } 1008 | }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). 1009 | } 1010 | 1011 | capacitorExec.nativeFetchMessages = function () { 1012 | // Stop listing for window detatch once native side confirms poke. 1013 | if (failSafeTimerId) { 1014 | clearTimeout(failSafeTimerId); 1015 | failSafeTimerId = 0; 1016 | } 1017 | // Each entry in commandQueue is a JSON string already. 1018 | if (!commandQueue.length) { 1019 | return ''; 1020 | } 1021 | var json = '[' + commandQueue.join(',') + ']'; 1022 | commandQueue.length = 0; 1023 | return json; 1024 | }; 1025 | 1026 | capacitorExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) { 1027 | var success = status === 0 || status === 1; 1028 | var args = convertMessageToArgsNativeToJs(message); 1029 | setTimeout(function () { 1030 | cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line 1031 | }, 0); 1032 | }; 1033 | 1034 | // for backwards compatibility 1035 | capacitorExec.nativeEvalAndFetch = function (func) { 1036 | try { 1037 | func(); 1038 | } catch (e) { 1039 | console.log(e); 1040 | } 1041 | }; 1042 | 1043 | // Proxy the exec for bridge changes. See CB-10106 1044 | function cordovaExec() { 1045 | var cexec = require('cordova/exec'); 1046 | var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); 1047 | return (cexec_valid && execProxy !== cexec) ? cexec : capacitorExec; 1048 | } 1049 | function execProxy() { 1050 | cordovaExec().apply(null, arguments); 1051 | } 1052 | 1053 | execProxy.nativeFetchMessages = function () { 1054 | return cordovaExec().nativeFetchMessages.apply(null, arguments); 1055 | }; 1056 | 1057 | execProxy.nativeEvalAndFetch = function () { 1058 | return cordovaExec().nativeEvalAndFetch.apply(null, arguments); 1059 | }; 1060 | 1061 | execProxy.nativeCallback = function () { 1062 | return cordovaExec().nativeCallback.apply(null, arguments); 1063 | }; 1064 | 1065 | module.exports = execProxy; 1066 | 1067 | 1068 | 1069 | }); 1070 | 1071 | // file: src/common/exec/proxy.js 1072 | define("cordova/exec/proxy", function (require, exports, module) { 1073 | 1074 | // internal map of proxy function 1075 | var CommandProxyMap = {}; 1076 | 1077 | module.exports = { 1078 | 1079 | // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); 1080 | add: function (id, proxyObj) { 1081 | console.log('adding proxy for ' + id); 1082 | CommandProxyMap[id] = proxyObj; 1083 | return proxyObj; 1084 | }, 1085 | 1086 | // cordova.commandProxy.remove("Accelerometer"); 1087 | remove: function (id) { 1088 | var proxy = CommandProxyMap[id]; 1089 | delete CommandProxyMap[id]; 1090 | CommandProxyMap[id] = null; 1091 | return proxy; 1092 | }, 1093 | 1094 | get: function (service, action) { 1095 | return (CommandProxyMap[service] ? CommandProxyMap[service][action] : null); 1096 | } 1097 | }; 1098 | 1099 | }); 1100 | 1101 | // file: src/common/init.js 1102 | define("cordova/init", function (require, exports, module) { 1103 | 1104 | var channel = require('cordova/channel'); 1105 | var cordova = require('cordova'); 1106 | var modulemapper = require('cordova/modulemapper'); 1107 | var platform = require('cordova/platform'); 1108 | var pluginloader = require('cordova/pluginloader'); 1109 | var utils = require('cordova/utils'); 1110 | 1111 | var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; 1112 | 1113 | function logUnfiredChannels(arr) { 1114 | for (var i = 0; i < arr.length; ++i) { 1115 | if (arr[i].state !== 2) { 1116 | console.log('Channel not fired: ' + arr[i].type); 1117 | } 1118 | } 1119 | } 1120 | 1121 | window.setTimeout(function () { 1122 | if (channel.onDeviceReady.state !== 2) { 1123 | console.log('deviceready has not fired after 5 seconds.'); 1124 | logUnfiredChannels(platformInitChannelsArray); 1125 | logUnfiredChannels(channel.deviceReadyChannelsArray); 1126 | } 1127 | }, 5000); 1128 | 1129 | // Replace navigator before any modules are required(), to ensure it happens as soon as possible. 1130 | // We replace it so that properties that can't be clobbered can instead be overridden. 1131 | function replaceNavigator(origNavigator) { 1132 | var CordovaNavigator = function () { }; 1133 | CordovaNavigator.prototype = origNavigator; 1134 | var newNavigator = new CordovaNavigator(); 1135 | // This work-around really only applies to new APIs that are newer than Function.bind. 1136 | // Without it, APIs such as getGamepads() break. 1137 | if (CordovaNavigator.bind) { 1138 | for (var key in origNavigator) { 1139 | if (typeof origNavigator[key] === 'function') { 1140 | newNavigator[key] = origNavigator[key].bind(origNavigator); 1141 | } else { 1142 | (function (k) { 1143 | utils.defineGetterSetter(newNavigator, key, function () { 1144 | return origNavigator[k]; 1145 | }); 1146 | })(key); 1147 | } 1148 | } 1149 | } 1150 | return newNavigator; 1151 | } 1152 | 1153 | if (window.navigator) { 1154 | window.navigator = replaceNavigator(window.navigator); 1155 | } 1156 | 1157 | // Register pause, resume and deviceready channels as events on document. 1158 | channel.onPause = cordova.addDocumentEventHandler('pause'); 1159 | channel.onResume = cordova.addDocumentEventHandler('resume'); 1160 | channel.onActivated = cordova.addDocumentEventHandler('activated'); 1161 | channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); 1162 | 1163 | // Listen for DOMContentLoaded and notify our channel subscribers. 1164 | if (document.readyState === 'complete' || document.readyState === 'interactive') { 1165 | channel.onDOMContentLoaded.fire(); 1166 | } else { 1167 | document.addEventListener('DOMContentLoaded', function () { 1168 | channel.onDOMContentLoaded.fire(); 1169 | }, false); 1170 | } 1171 | 1172 | // _nativeReady is global variable that the native side can set 1173 | // to signify that the native code is ready. It is a global since 1174 | // it may be called before any cordova JS is ready. 1175 | if (window._nativeReady) { 1176 | channel.onNativeReady.fire(); 1177 | } 1178 | 1179 | modulemapper.clobbers('cordova', 'cordova'); 1180 | modulemapper.clobbers('cordova/exec', 'cordova.exec'); 1181 | modulemapper.clobbers('cordova/exec', 'Cordova.exec'); 1182 | 1183 | // Call the platform-specific initialization. 1184 | platform.bootstrap && platform.bootstrap(); 1185 | 1186 | // Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. 1187 | // The delay allows the attached modules to be defined before the plugin loader looks for them. 1188 | setTimeout(function () { 1189 | pluginloader.load(function () { 1190 | channel.onPluginsReady.fire(); 1191 | }); 1192 | }, 0); 1193 | 1194 | /** 1195 | * Create all cordova objects once native side is ready. 1196 | */ 1197 | channel.join(function () { 1198 | modulemapper.mapModules(window); 1199 | 1200 | platform.initialize && platform.initialize(); 1201 | 1202 | // Fire event to notify that all objects are created 1203 | channel.onCordovaReady.fire(); 1204 | 1205 | // Fire onDeviceReady event once page has fully loaded, all 1206 | // constructors have run and cordova info has been received from native 1207 | // side. 1208 | channel.join(function () { 1209 | require('cordova').fireDocumentEvent('deviceready'); 1210 | }, channel.deviceReadyChannelsArray); 1211 | 1212 | }, platformInitChannelsArray); 1213 | 1214 | }); 1215 | 1216 | // file: src/common/modulemapper.js 1217 | define("cordova/modulemapper", function (require, exports, module) { 1218 | 1219 | var builder = require('cordova/builder'); 1220 | var moduleMap = define.moduleMap; // eslint-disable-line no-undef 1221 | var symbolList; 1222 | var deprecationMap; 1223 | 1224 | exports.reset = function () { 1225 | symbolList = []; 1226 | deprecationMap = {}; 1227 | }; 1228 | 1229 | function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { 1230 | if (!(moduleName in moduleMap)) { 1231 | throw new Error('Module ' + moduleName + ' does not exist.'); 1232 | } 1233 | symbolList.push(strategy, moduleName, symbolPath); 1234 | if (opt_deprecationMessage) { 1235 | deprecationMap[symbolPath] = opt_deprecationMessage; 1236 | } 1237 | } 1238 | 1239 | // Note: Android 2.3 does have Function.bind(). 1240 | exports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) { 1241 | addEntry('c', moduleName, symbolPath, opt_deprecationMessage); 1242 | }; 1243 | 1244 | exports.merges = function (moduleName, symbolPath, opt_deprecationMessage) { 1245 | addEntry('m', moduleName, symbolPath, opt_deprecationMessage); 1246 | }; 1247 | 1248 | exports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) { 1249 | addEntry('d', moduleName, symbolPath, opt_deprecationMessage); 1250 | }; 1251 | 1252 | exports.runs = function (moduleName) { 1253 | addEntry('r', moduleName, null); 1254 | }; 1255 | 1256 | function prepareNamespace(symbolPath, context) { 1257 | if (!symbolPath) { 1258 | return context; 1259 | } 1260 | var parts = symbolPath.split('.'); 1261 | var cur = context; 1262 | for (var i = 0, part; part = parts[i]; ++i) { // eslint-disable-line no-cond-assign 1263 | cur = cur[part] = cur[part] || {}; 1264 | } 1265 | return cur; 1266 | } 1267 | 1268 | exports.mapModules = function (context) { 1269 | var origSymbols = {}; 1270 | context.CDV_origSymbols = origSymbols; 1271 | for (var i = 0, len = symbolList.length; i < len; i += 3) { 1272 | var strategy = symbolList[i]; 1273 | var moduleName = symbolList[i + 1]; 1274 | var module = require(moduleName); 1275 | // 1276 | if (strategy === 'r') { 1277 | continue; 1278 | } 1279 | var symbolPath = symbolList[i + 2]; 1280 | var lastDot = symbolPath.lastIndexOf('.'); 1281 | var namespace = symbolPath.substr(0, lastDot); 1282 | var lastName = symbolPath.substr(lastDot + 1); 1283 | 1284 | var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; 1285 | var parentObj = prepareNamespace(namespace, context); 1286 | var target = parentObj[lastName]; 1287 | 1288 | if (strategy === 'm' && target) { 1289 | builder.recursiveMerge(target, module); 1290 | } else if ((strategy === 'd' && !target) || (strategy !== 'd')) { 1291 | if (!(symbolPath in origSymbols)) { 1292 | origSymbols[symbolPath] = target; 1293 | } 1294 | builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); 1295 | } 1296 | } 1297 | }; 1298 | 1299 | exports.getOriginalSymbol = function (context, symbolPath) { 1300 | var origSymbols = context.CDV_origSymbols; 1301 | if (origSymbols && (symbolPath in origSymbols)) { 1302 | return origSymbols[symbolPath]; 1303 | } 1304 | var parts = symbolPath.split('.'); 1305 | var obj = context; 1306 | for (var i = 0; i < parts.length; ++i) { 1307 | obj = obj && obj[parts[i]]; 1308 | } 1309 | return obj; 1310 | }; 1311 | 1312 | exports.reset(); 1313 | 1314 | }); 1315 | 1316 | define("cordova/platform", function (require, exports, module) { 1317 | module.exports = { 1318 | id: Capacitor.platform, 1319 | bootstrap: function () { 1320 | require('cordova/channel').onNativeReady.fire(); 1321 | } 1322 | }; 1323 | 1324 | }); 1325 | 1326 | // file: src/common/pluginloader.js 1327 | define("cordova/pluginloader", function (require, exports, module) { 1328 | 1329 | var modulemapper = require('cordova/modulemapper'); 1330 | 1331 | 1332 | function onScriptLoadingComplete(moduleList, finishPluginLoading) { 1333 | console.log('onscript loading complete') 1334 | // Loop through all the plugins and then through their clobbers and merges. 1335 | for (var i = 0, module; module = moduleList[i]; i++) { // eslint-disable-line no-cond-assign 1336 | if (module.clobbers && module.clobbers.length) { 1337 | for (var j = 0; j < module.clobbers.length; j++) { 1338 | modulemapper.clobbers(module.id, module.clobbers[j]); 1339 | } 1340 | } 1341 | 1342 | if (module.merges && module.merges.length) { 1343 | for (var k = 0; k < module.merges.length; k++) { 1344 | modulemapper.merges(module.id, module.merges[k]); 1345 | } 1346 | } 1347 | 1348 | // Finally, if runs is truthy we want to simply require() the module. 1349 | if (module.runs) { 1350 | modulemapper.runs(module.id); 1351 | } 1352 | } 1353 | 1354 | finishPluginLoading(); 1355 | } 1356 | 1357 | // Tries to load all plugins' js-modules. 1358 | // This is an async process, but onDeviceReady is blocked on onPluginsReady. 1359 | // onPluginsReady is fired when there are no plugins to load, or they are all done. 1360 | exports.load = function (callback) { 1361 | var moduleList = require('cordova/plugin_list'); 1362 | onScriptLoadingComplete(moduleList, callback); 1363 | }; 1364 | 1365 | }); 1366 | 1367 | // file: src/common/urlutil.js 1368 | define("cordova/urlutil", function (require, exports, module) { 1369 | 1370 | /** 1371 | * For already absolute URLs, returns what is passed in. 1372 | * For relative URLs, converts them to absolute ones. 1373 | */ 1374 | exports.makeAbsolute = function makeAbsolute(url) { 1375 | var anchorEl = document.createElement('a'); 1376 | anchorEl.href = url; 1377 | return anchorEl.href; 1378 | }; 1379 | 1380 | }); 1381 | 1382 | // file: src/common/utils.js 1383 | define("cordova/utils", function (require, exports, module) { 1384 | 1385 | var utils = exports; 1386 | 1387 | /** 1388 | * Defines a property getter / setter for obj[key]. 1389 | */ 1390 | utils.defineGetterSetter = function (obj, key, getFunc, opt_setFunc) { 1391 | if (Object.defineProperty) { 1392 | var desc = { 1393 | get: getFunc, 1394 | configurable: true 1395 | }; 1396 | if (opt_setFunc) { 1397 | desc.set = opt_setFunc; 1398 | } 1399 | Object.defineProperty(obj, key, desc); 1400 | } else { 1401 | obj.__defineGetter__(key, getFunc); 1402 | if (opt_setFunc) { 1403 | obj.__defineSetter__(key, opt_setFunc); 1404 | } 1405 | } 1406 | }; 1407 | 1408 | /** 1409 | * Defines a property getter for obj[key]. 1410 | */ 1411 | utils.defineGetter = utils.defineGetterSetter; 1412 | 1413 | utils.arrayIndexOf = function (a, item) { 1414 | if (a.indexOf) { 1415 | return a.indexOf(item); 1416 | } 1417 | var len = a.length; 1418 | for (var i = 0; i < len; ++i) { 1419 | if (a[i] === item) { 1420 | return i; 1421 | } 1422 | } 1423 | return -1; 1424 | }; 1425 | 1426 | /** 1427 | * Returns whether the item was found in the array. 1428 | */ 1429 | utils.arrayRemove = function (a, item) { 1430 | var index = utils.arrayIndexOf(a, item); 1431 | if (index !== -1) { 1432 | a.splice(index, 1); 1433 | } 1434 | return index !== -1; 1435 | }; 1436 | 1437 | utils.typeName = function (val) { 1438 | return Object.prototype.toString.call(val).slice(8, -1); 1439 | }; 1440 | 1441 | /** 1442 | * Returns an indication of whether the argument is an array or not 1443 | */ 1444 | utils.isArray = Array.isArray || 1445 | function (a) { return utils.typeName(a) === 'Array'; }; 1446 | 1447 | /** 1448 | * Returns an indication of whether the argument is a Date or not 1449 | */ 1450 | utils.isDate = function (d) { 1451 | return (d instanceof Date); 1452 | }; 1453 | 1454 | /** 1455 | * Does a deep clone of the object. 1456 | */ 1457 | utils.clone = function (obj) { 1458 | if (!obj || typeof obj === 'function' || utils.isDate(obj) || typeof obj !== 'object') { 1459 | return obj; 1460 | } 1461 | 1462 | var retVal, i; 1463 | 1464 | if (utils.isArray(obj)) { 1465 | retVal = []; 1466 | for (i = 0; i < obj.length; ++i) { 1467 | retVal.push(utils.clone(obj[i])); 1468 | } 1469 | return retVal; 1470 | } 1471 | 1472 | retVal = {}; 1473 | for (i in obj) { 1474 | // https://issues.apache.org/jira/browse/CB-11522 'unknown' type may be returned in 1475 | // custom protocol activation case on Windows Phone 8.1 causing "No such interface supported" exception 1476 | // on cloning. 1477 | if ((!(i in retVal) || retVal[i] !== obj[i]) && typeof obj[i] !== 'undefined' && typeof obj[i] !== 'unknown') { // eslint-disable-line valid-typeof 1478 | retVal[i] = utils.clone(obj[i]); 1479 | } 1480 | } 1481 | return retVal; 1482 | }; 1483 | 1484 | /** 1485 | * Returns a wrapped version of the function 1486 | */ 1487 | utils.close = function (context, func, params) { 1488 | return function () { 1489 | var args = params || arguments; 1490 | return func.apply(context, args); 1491 | }; 1492 | }; 1493 | 1494 | // ------------------------------------------------------------------------------ 1495 | function UUIDcreatePart(length) { 1496 | var uuidpart = ''; 1497 | for (var i = 0; i < length; i++) { 1498 | var uuidchar = parseInt((Math.random() * 256), 10).toString(16); 1499 | if (uuidchar.length === 1) { 1500 | uuidchar = '0' + uuidchar; 1501 | } 1502 | uuidpart += uuidchar; 1503 | } 1504 | return uuidpart; 1505 | } 1506 | 1507 | /** 1508 | * Create a UUID 1509 | */ 1510 | utils.createUUID = function () { 1511 | return UUIDcreatePart(4) + '-' + 1512 | UUIDcreatePart(2) + '-' + 1513 | UUIDcreatePart(2) + '-' + 1514 | UUIDcreatePart(2) + '-' + 1515 | UUIDcreatePart(6); 1516 | }; 1517 | 1518 | /** 1519 | * Extends a child object from a parent object using classical inheritance 1520 | * pattern. 1521 | */ 1522 | utils.extend = (function () { 1523 | // proxy used to establish prototype chain 1524 | var F = function () { }; 1525 | // extend Child from Parent 1526 | return function (Child, Parent) { 1527 | 1528 | F.prototype = Parent.prototype; 1529 | Child.prototype = new F(); 1530 | Child.__super__ = Parent.prototype; 1531 | Child.prototype.constructor = Child; 1532 | }; 1533 | }()); 1534 | 1535 | /** 1536 | * Alerts a message in any available way: alert or console.log. 1537 | */ 1538 | utils.alert = function (msg) { 1539 | if (window.alert) { 1540 | window.alert(msg); 1541 | } else if (console && console.log) { 1542 | console.log(msg); 1543 | } 1544 | }; 1545 | 1546 | }); 1547 | 1548 | window.cordova = require('cordova'); 1549 | // file: src/scripts/bootstrap.js 1550 | 1551 | require('cordova/init'); 1552 | 1553 | })(); 1554 | -------------------------------------------------------------------------------- /ios/App/public/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | 2 | cordova.define('cordova/plugin_list', function(require, exports, module) { 3 | module.exports = [ 4 | { 5 | "id": "mx.ferreyra.callnumber.CallNumber", 6 | "file": "plugins/mx.ferreyra.callnumber/www/CallNumber.js", 7 | "pluginId": "mx.ferreyra.callnumber", 8 | "clobbers": [ 9 | "call" 10 | ] 11 | }, 12 | { 13 | "id": "phonegap-plugin-barcodescanner.BarcodeScanner", 14 | "file": "plugins/phonegap-plugin-barcodescanner/www/barcodescanner.js", 15 | "pluginId": "phonegap-plugin-barcodescanner", 16 | "clobbers": [ 17 | "cordova.plugins.barcodeScanner" 18 | ] 19 | } 20 | ]; 21 | module.exports.metadata = 22 | // TOP OF METADATA 23 | { 24 | "mx.ferreyra.callnumber": "0.0.2", 25 | "phonegap-plugin-barcodescanner": "8.1.0" 26 | }; 27 | // BOTTOM OF METADATA 28 | }); 29 | -------------------------------------------------------------------------------- /ios/App/public/index.html: -------------------------------------------------------------------------------- 1 | my-vue-app
-------------------------------------------------------------------------------- /ios/App/public/native-bridge.js: -------------------------------------------------------------------------------- 1 | //# sourceURL=capacitor-runtime.js 2 | 3 | (function(win) { 4 | win.Capacitor = win.Capacitor || { 5 | Plugins: {} 6 | }; 7 | 8 | var capacitor = Capacitor; 9 | 10 | // Export Cordova if not defined 11 | win.cordova = win.cordova || {}; 12 | 13 | // Add any legacy handlers to keep Cordova compat 100% good 14 | addLegacyHandlers(win); 15 | 16 | capacitor.Plugins = capacitor.Plugins || {}; 17 | 18 | capacitor.DEBUG = typeof capacitor.DEBUG === 'undefined' ? true : capacitor.DEBUG; 19 | 20 | // keep a collection of callbacks for native response data 21 | var calls = {}; 22 | 23 | // Counter of callback ids, randomized to avoid 24 | // any issues during reloads if a call comes back with 25 | // an existing callback id from an old session 26 | var callbackIdCount = Math.floor(Math.random() * 134217728); 27 | 28 | var lastError = null; 29 | var errorModal = null; 30 | 31 | // create the postToNative() fn if needed 32 | if (win.androidBridge) { 33 | // android platform 34 | postToNative = function androidBridge(data) { 35 | win.androidBridge.postMessage(JSON.stringify(data)); 36 | }; 37 | capacitor.isNative = true; 38 | capacitor.isAndroid = true; 39 | capacitor.platform = 'android'; 40 | 41 | } else if (win.webkit && win.webkit.messageHandlers && win.webkit.messageHandlers.bridge) { 42 | // ios platform 43 | postToNative = function iosBridge(data) { 44 | data.type = 'message'; 45 | win.webkit.messageHandlers.bridge.postMessage(data); 46 | }; 47 | capacitor.isNative = true; 48 | capacitor.isIOS = true; 49 | capacitor.platform = 'ios'; 50 | } 51 | 52 | var useFallbackLogging = Object.keys(win.console).length === 0; 53 | if(useFallbackLogging) { 54 | win.console.warn('Advance console logging disabled.') 55 | } 56 | 57 | // patch window.console on iOS and store original console fns 58 | var orgConsole = capacitor.isIOS ? {} : win.console; 59 | 60 | // list log functions bridged to native log 61 | var bridgedLevels = { 62 | debug: true, 63 | error: true, 64 | info: true, 65 | log: true, 66 | trace: true, 67 | warn: true, 68 | }; 69 | if (capacitor.isIOS) { 70 | Object.keys(win.console).forEach(function (level) { 71 | if (typeof win.console[level] === 'function') { 72 | // loop through all the console functions and keep references to the original 73 | orgConsole[level] = win.console[level]; 74 | win.console[level] = function capacitorConsole() { 75 | var msgs = Array.prototype.slice.call(arguments); 76 | 77 | // console log to browser 78 | orgConsole[level].apply(win.console, msgs); 79 | 80 | if (capacitor.isNative && bridgedLevels[level]) { 81 | // send log to native to print 82 | try { 83 | // convert all args to strings 84 | msgs = msgs.map(function (arg) { 85 | if (typeof arg === 'object') { 86 | try { 87 | arg = JSON.stringify(arg); 88 | } catch (e) {} 89 | } 90 | // convert to string 91 | return arg + ''; 92 | }); 93 | capacitor.toNative('Console', 'log', { 94 | level: level, 95 | message: msgs.join(' ') 96 | }); 97 | } catch (e) { 98 | // error converting/posting console messages 99 | orgConsole.error.apply(win.console, e); 100 | } 101 | } 102 | }; 103 | } 104 | }); 105 | } 106 | 107 | function addLegacyHandlers(win) { 108 | win.navigator.app = { 109 | exitApp: function() { 110 | capacitor.toNative("App", "exitApp", {}, null); 111 | } 112 | } 113 | var documentAddEventListener = document.addEventListener; 114 | document.addEventListener = function() { 115 | var name = arguments[0]; 116 | var handler = arguments[1]; 117 | if (name === 'deviceready') { 118 | setTimeout(function() { 119 | handler && handler(); 120 | }); 121 | } else if (name === 'backbutton') { 122 | // Add a dummy listener so Capacitor doesn't do the default 123 | // back button action 124 | Capacitor.Plugins.App && Capacitor.Plugins.App.addListener('backButton', function() {}); 125 | } 126 | return documentAddEventListener.apply(document, arguments); 127 | } 128 | } 129 | 130 | /* 131 | * Check if a Plugin is available 132 | */ 133 | capacitor.isPluginAvailable = function isPluginAvailable(name) { 134 | return this.Plugins.hasOwnProperty(name); 135 | } 136 | 137 | capacitor.convertFileSrc = function convertFileSrc(url) { 138 | if (!url) { 139 | return url; 140 | } 141 | if (url.startsWith('/')) { 142 | return window.WEBVIEW_SERVER_URL + '/_capacitor_file_' + url; 143 | } 144 | if (url.startsWith('file://')) { 145 | return window.WEBVIEW_SERVER_URL + url.replace('file://', '/_capacitor_file_'); 146 | } 147 | if (url.startsWith('content://')) { 148 | return window.WEBVIEW_SERVER_URL + url.replace('content:/', '/_capacitor_content_'); 149 | } 150 | return url; 151 | } 152 | 153 | /* 154 | * Check running platform 155 | */ 156 | capacitor.getPlatform = function getPlatform() { 157 | return this.platform; 158 | } 159 | 160 | /** 161 | * Send a plugin method call to the native layer 162 | */ 163 | capacitor.toNative = function toNative(pluginId, methodName, options, storedCallback) { 164 | try { 165 | if (capacitor.isNative) { 166 | var callbackId = '-1'; 167 | 168 | if (storedCallback && (typeof storedCallback.callback === 'function' || typeof storedCallback.resolve === 'function')) { 169 | // store the call for later lookup 170 | callbackId = ++callbackIdCount + ''; 171 | calls[callbackId] = storedCallback; 172 | } 173 | 174 | var call = { 175 | callbackId: callbackId, 176 | pluginId: pluginId, 177 | methodName: methodName, 178 | options: options || {} 179 | }; 180 | 181 | if (capacitor.DEBUG) { 182 | if (pluginId !== 'Console') { 183 | capacitor.logToNative(call); 184 | } 185 | } 186 | 187 | // post the call data to native 188 | postToNative(call); 189 | 190 | return callbackId; 191 | 192 | } else { 193 | orgConsole.warn.call(win.console, 'browser implementation unavailable for: ' + pluginId); 194 | } 195 | 196 | } catch (e) { 197 | orgConsole.error.call(win.console, e); 198 | } 199 | 200 | return null; 201 | }; 202 | 203 | /** 204 | * Process a response from the native layer. 205 | */ 206 | capacitor.fromNative = function fromNative(result) { 207 | if (capacitor.DEBUG) { 208 | if (result.pluginId !== 'Console') { 209 | capacitor.logFromNative(result); 210 | } 211 | } 212 | // get the stored call, if it exists 213 | try { 214 | var storedCall = calls[result.callbackId]; 215 | 216 | if (storedCall) { 217 | // looks like we've got a stored call 218 | 219 | if (result.error && typeof result.error === 'object') { 220 | // ensure stacktraces by copying error properties to an Error 221 | result.error = Object.keys(result.error).reduce(function(err, key) { 222 | err[key] = result.error[key]; 223 | return err; 224 | }, new Error()); 225 | } 226 | 227 | if (typeof storedCall.callback === 'function') { 228 | // callback 229 | if (result.success) { 230 | storedCall.callback(result.data); 231 | } else { 232 | storedCall.callback(null, result.error); 233 | } 234 | 235 | } else if (typeof storedCall.resolve === 'function') { 236 | // promise 237 | if (result.success) { 238 | storedCall.resolve(result.data); 239 | } else { 240 | storedCall.reject(result.error); 241 | } 242 | 243 | // no need to keep this stored callback 244 | // around for a one time resolve promise 245 | delete calls[result.callbackId]; 246 | } 247 | 248 | } else if (!result.success && result.error) { 249 | // no stored callback, but if there was an error let's log it 250 | orgConsole.warn.call(win.console, result.error); 251 | } 252 | 253 | if (result.save === false) { 254 | delete calls[result.callbackId]; 255 | } 256 | 257 | } catch (e) { 258 | orgConsole.error.call(win.console, e); 259 | } 260 | 261 | // always delete to prevent memory leaks 262 | // overkill but we're not sure what apps will do with this data 263 | delete result.data; 264 | delete result.error; 265 | }; 266 | 267 | capacitor.logJs = function(message, level) { 268 | switch (level) { 269 | case 'error': 270 | console.error(message); 271 | break; 272 | case 'warn': 273 | console.warn(message); 274 | break; 275 | case 'info': 276 | console.info(message); 277 | break; 278 | default: 279 | console.log(message); 280 | } 281 | } 282 | 283 | capacitor.withPlugin = function withPlugin(_pluginId, _fn) { 284 | }; 285 | 286 | capacitor.nativeCallback = function (pluginId, methodName, options, callback) { 287 | if(typeof options === 'function') { 288 | callback = options; 289 | options = null; 290 | } 291 | return capacitor.toNative(pluginId, methodName, options, { 292 | callback: callback 293 | }); 294 | }; 295 | 296 | capacitor.nativePromise = function (pluginId, methodName, options) { 297 | return new Promise(function (resolve, reject) { 298 | capacitor.toNative(pluginId, methodName, options, { 299 | resolve: resolve, 300 | reject: reject 301 | }); 302 | }); 303 | }; 304 | 305 | 306 | capacitor.addListener = function(pluginId, eventName, callback) { 307 | var callbackId = capacitor.nativeCallback(pluginId, 'addListener', { 308 | eventName: eventName 309 | }, callback); 310 | return { 311 | remove: function() { 312 | console.log('Removing listener', pluginId, eventName); 313 | capacitor.removeListener(pluginId, callbackId, eventName, callback); 314 | } 315 | } 316 | }; 317 | 318 | capacitor.removeListener = function(pluginId, callbackId, eventName, callback) { 319 | capacitor.nativeCallback(pluginId, 'removeListener', { 320 | callbackId: callbackId, 321 | eventName: eventName 322 | }, callback); 323 | } 324 | 325 | capacitor.createEvent = function(type, data) { 326 | var event = document.createEvent('Events'); 327 | event.initEvent(type, false, false); 328 | if (data) { 329 | for (var i in data) { 330 | if (data.hasOwnProperty(i)) { 331 | event[i] = data[i]; 332 | } 333 | } 334 | } 335 | return event; 336 | } 337 | 338 | capacitor.triggerEvent = function(eventName, target, data) { 339 | var eventData = data || {}; 340 | var event = this.createEvent(eventName, eventData); 341 | if (target === "document") { 342 | if (cordova.fireDocumentEvent) { 343 | cordova.fireDocumentEvent(eventName, eventData); 344 | } else { 345 | document.dispatchEvent(event); 346 | } 347 | } else if (target === "window") { 348 | window.dispatchEvent(event); 349 | } else { 350 | var targetEl = document.querySelector(target); 351 | targetEl && targetEl.dispatchEvent(event); 352 | } 353 | } 354 | 355 | capacitor.handleError = function(error) { 356 | console.error(error); 357 | } 358 | 359 | capacitor.handleWindowError = function (msg, url, lineNo, columnNo, error) { 360 | var string = msg.toLowerCase(); 361 | var substring = "script error"; 362 | if (string.indexOf(substring) > -1) { 363 | // Some IE issue? 364 | } else { 365 | var errObj = { 366 | type: 'js.error', 367 | error: { 368 | message: msg, 369 | url: url, 370 | line: lineNo, 371 | col: columnNo, 372 | errorObject: JSON.stringify(error) 373 | } 374 | }; 375 | if (error !== null) { 376 | win.Capacitor.handleError(error); 377 | } 378 | if(capacitor.isAndroid) { 379 | win.androidBridge.postMessage(JSON.stringify(errObj)); 380 | } else if(capacitor.isIOS) { 381 | win.webkit.messageHandlers.bridge.postMessage(errObj); 382 | } 383 | } 384 | 385 | return false; 386 | }; 387 | 388 | capacitor.logToNative = function(call) { 389 | if(!useFallbackLogging) { 390 | var c = orgConsole; 391 | c.groupCollapsed('%cnative %c' + call.pluginId + '.' + call.methodName + ' (#' + call.callbackId + ')', 'font-weight: lighter; color: gray', 'font-weight: bold; color: #000'); 392 | c.dir(call); 393 | c.groupEnd(); 394 | } else { 395 | win.console.log('LOG TO NATIVE: ', call); 396 | if (capacitor.isIOS) { 397 | try { 398 | capacitor.toNative('Console', 'log', {message: JSON.stringify(call)}); 399 | } catch (e) { 400 | win.console.log('Error converting/posting console messages'); 401 | } 402 | } 403 | } 404 | } 405 | 406 | capacitor.logFromNative = function(result) { 407 | if(!useFallbackLogging) { 408 | var c = orgConsole; 409 | 410 | var success = result.success === true; 411 | 412 | var tagStyles = success ? 'font-style: italic; font-weight: lighter; color: gray' : 413 | 'font-style: italic; font-weight: lighter; color: red'; 414 | 415 | c.groupCollapsed('%cresult %c' + result.pluginId + '.' + result.methodName + ' (#' + result.callbackId + ')', 416 | tagStyles, 417 | 'font-style: italic; font-weight: bold; color: #444'); 418 | if (result.success === false) { 419 | c.error(result.error); 420 | } else { 421 | c.dir(result.data); 422 | } 423 | c.groupEnd(); 424 | } else { 425 | if (result.success === false) { 426 | win.console.error(result.error); 427 | } else { 428 | win.console.log(result.data); 429 | } 430 | } 431 | } 432 | 433 | capacitor.uuidv4 = function() { 434 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { 435 | var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); 436 | return v.toString(16); 437 | }); 438 | } 439 | 440 | if (Capacitor.DEBUG) { 441 | window.onerror = capacitor.handleWindowError; 442 | } 443 | 444 | win.Ionic = win.Ionic || {}; 445 | win.Ionic.WebView = win.Ionic.WebView || {}; 446 | 447 | win.Ionic.WebView.getServerBasePath = function(callback) { 448 | Capacitor.Plugins.WebView.getServerBasePath().then(function(result) { 449 | callback(result.path); 450 | }); 451 | } 452 | 453 | win.Ionic.WebView.setServerBasePath = function (path) { 454 | Capacitor.Plugins.WebView.setServerBasePath({"path": path}); 455 | } 456 | 457 | win.Ionic.WebView.persistServerBasePath = function () { 458 | Capacitor.Plugins.WebView.persistServerBasePath(); 459 | } 460 | 461 | win.Ionic.WebView.convertFileSrc = function(url) { 462 | return Capacitor.convertFileSrc(url); 463 | } 464 | 465 | })(window); 466 | 467 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-vue-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "ionic:build": "vue-cli-service build", 7 | "ionic:serve": "vue-cli-service serve", 8 | "serve": "vue-cli-service serve", 9 | "build": "vue-cli-service build", 10 | "lint": "vue-cli-service lint" 11 | }, 12 | "dependencies": { 13 | "@capacitor/android": "2.0.2", 14 | "@capacitor/cli": "2.0.2", 15 | "@capacitor/core": "2.0.2", 16 | "@capacitor/ios": "2.0.2", 17 | "@ionic-native/call-number": "^5.27.0", 18 | "@ionic-native/core": "^5.27.0", 19 | "@ionic/core": "5.0.7", 20 | "@ionic/pwa-elements": "1.5.2", 21 | "@ionic/vue": "0.0.9", 22 | "call-number": "^1.0.1", 23 | "core-js": "3.6.5", 24 | "moment": "2.24.0", 25 | "phonegap-plugin-barcodescanner": "^8.1.0", 26 | "vee-validate": "3.3.0", 27 | "vue": "2.6.11", 28 | "vue-router": "3.1.6", 29 | "vuex": "3.3.0" 30 | }, 31 | "devDependencies": { 32 | "@vue/cli-plugin-babel": "4.3.1", 33 | "@vue/cli-plugin-eslint": "4.3.1", 34 | "@vue/cli-service": "4.3.1", 35 | "babel-eslint": "10.1.0", 36 | "eslint": "6.8.0", 37 | "eslint-plugin-vue": "6.2.2", 38 | "ionicons": "5.0.1", 39 | "vue-template-compiler": "2.6.11" 40 | }, 41 | "eslintConfig": { 42 | "root": true, 43 | "env": { 44 | "node": true 45 | }, 46 | "extends": [ 47 | "plugin:vue/essential", 48 | "eslint:recommended" 49 | ], 50 | "rules": {}, 51 | "parserOptions": { 52 | "parser": "babel-eslint" 53 | } 54 | }, 55 | "postcss": { 56 | "plugins": { 57 | "autoprefixer": {} 58 | } 59 | }, 60 | "browserslist": [ 61 | "> 1%", 62 | "last 2 versions", 63 | "not ie <= 8" 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | my-vue-app 20 | 21 | 22 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronksaunders/capacitor-vue-ionicv4-app/a987d1bb3ed10de4f1b08a318b16acc644b7454e/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/CameraPage.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 98 | 99 | 100 | 117 | -------------------------------------------------------------------------------- /src/components/GeolocationPage.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 67 | 68 | 69 | 86 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Ionic from "@ionic/vue"; 3 | 4 | import App from "./App.vue"; 5 | import router from "./router"; 6 | 7 | import { defineCustomElements } from '@ionic/pwa-elements/loader'; 8 | 9 | 10 | Vue.config.productionTip = false; 11 | 12 | Vue.use(Ionic); 13 | 14 | new Vue({ 15 | router, 16 | render: h => h(App) 17 | }).$mount("#app"); 18 | 19 | defineCustomElements(window); 20 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import {IonicVueRouter} from '@ionic/vue' 3 | import CameraPage from '@/components/CameraPage' 4 | import GeolocationPage from '@/components/GeolocationPage' 5 | 6 | Vue.use(IonicVueRouter) 7 | 8 | export default new IonicVueRouter({ 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'CameraPage', 13 | component: CameraPage 14 | }, 15 | { 16 | path: '/geo-location-page', 17 | name: 'GeolocationPage', 18 | component: GeolocationPage 19 | } 20 | ] 21 | }) 22 | --------------------------------------------------------------------------------