Skip to content

Commit

Permalink
chore: update example app for new plugin version
Browse files Browse the repository at this point in the history
This also fixes a crash with the iOS app when opening the barcode scanner, as the 'NSCameraUsageDescription' permission is missing.

References: https://outsystemsrd.atlassian.net/browse/RMET-3755
  • Loading branch information
OS-ricardomoreirasilva committed Oct 24, 2024
1 parent 68460d1 commit 999bcb1
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 55 deletions.
2 changes: 1 addition & 1 deletion example-app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.7.1'
classpath 'com.google.gms:google-services:4.4.0'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
10 changes: 5 additions & 5 deletions example-app/android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../node_modules/.pnpm/@capacitor+android@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../../node_modules/.pnpm/@capacitor+android@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/android/capacitor')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/app/android')
project(':capacitor-app').projectDir = new File('../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/app/android')

include ':capacitor-barcode-scanner'
project(':capacitor-barcode-scanner').projectDir = new File('../../plugin/android')

include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/haptics/android')
project(':capacitor-haptics').projectDir = new File('../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/haptics/android')

include ':capacitor-keyboard'
project(':capacitor-keyboard').projectDir = new File('../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/keyboard/android')
project(':capacitor-keyboard').projectDir = new File('../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/keyboard/android')

include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/status-bar/android')
project(':capacitor-status-bar').projectDir = new File('../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/status-bar/android')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 4 additions & 4 deletions example-app/ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 9YN2HU59K8;
DEVELOPMENT_TEAM = S25XN959HW;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
Expand All @@ -370,9 +370,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 9YN2HU59K8;
DEVELOPMENT_TEAM = S25XN959HW;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter;
Expand Down
4 changes: 3 additions & 1 deletion example-app/ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>example-app</string>
<string>example-app</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down Expand Up @@ -45,5 +45,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Uses the camera to scan barcodes.</string>
</dict>
</plist>
16 changes: 8 additions & 8 deletions example-app/ios/App/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative '../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios/scripts/pods_helpers'
require_relative '../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios/scripts/pods_helpers'

platform :ios, '13.0'
platform :ios, '14.0'
use_frameworks!

# workaround to avoid Xcode caching of Pods that requires
Expand All @@ -9,13 +9,13 @@ use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
pod 'Capacitor', :path => '../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/app'
pod 'Capacitor', :path => '../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/app'
pod 'CapacitorBarcodeScanner', :path => '../../../plugin'
pod 'CapacitorHaptics', :path => '../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/keyboard'
pod 'CapacitorStatusBar', :path => '../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/status-bar'
pod 'CapacitorHaptics', :path => '../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/keyboard'
pod 'CapacitorStatusBar', :path => '../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/status-bar'
end

target 'App' do
Expand Down
54 changes: 27 additions & 27 deletions example-app/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
PODS:
- Capacitor (6.0.0):
- Capacitor (7.0.0-alpha.1):
- CapacitorCordova
- CapacitorApp (6.0.0):
- CapacitorApp (6.0.0-rc.1):
- Capacitor
- CapacitorBarcodeScanner (1.0.0):
- CapacitorBarcodeScanner (1.0.1):
- Capacitor
- OSBarcodeLib (~> 1.1.0)
- CapacitorCordova (6.0.0)
- CapacitorHaptics (6.0.0):
- CapacitorCordova (7.0.0-alpha.1)
- CapacitorHaptics (6.0.0-rc.1):
- Capacitor
- CapacitorKeyboard (6.0.0):
- CapacitorKeyboard (6.0.0-rc.1):
- Capacitor
- CapacitorStatusBar (6.0.0):
- CapacitorStatusBar (6.0.0-rc.1):
- Capacitor
- OSBarcodeLib (1.1.0)

DEPENDENCIES:
- "Capacitor (from `../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/app`)"
- "Capacitor (from `../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/app`)"
- CapacitorBarcodeScanner (from `../../../plugin`)
- "CapacitorCordova (from `../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios`)"
- "CapacitorHaptics (from `../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/haptics`)"
- "CapacitorKeyboard (from `../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/keyboard`)"
- "CapacitorStatusBar (from `../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/status-bar`)"
- "CapacitorCordova (from `../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios`)"
- "CapacitorHaptics (from `../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/haptics`)"
- "CapacitorKeyboard (from `../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/keyboard`)"
- "CapacitorStatusBar (from `../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/status-bar`)"

SPEC REPOS:
trunk:
- OSBarcodeLib

EXTERNAL SOURCES:
Capacitor:
:path: "../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios"
:path: "../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios"
CapacitorApp:
:path: "../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/app"
:path: "../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/app"
CapacitorBarcodeScanner:
:path: "../../../plugin"
CapacitorCordova:
:path: "../../../node_modules/.pnpm/@capacitor+ios@6.0.0_@capacitor+core@6.0.0/node_modules/@capacitor/ios"
:path: "../../../node_modules/.pnpm/@capacitor+ios@7.0.0-alpha.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/ios"
CapacitorHaptics:
:path: "../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/haptics"
:path: "../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/haptics"
CapacitorKeyboard:
:path: "../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/keyboard"
:path: "../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/keyboard"
CapacitorStatusBar:
:path: "../../../node_modules/.pnpm/@[email protected].0_@capacitor+core@6.0.0/node_modules/@capacitor/status-bar"
:path: "../../../node_modules/.pnpm/@[email protected].0-rc.1_@capacitor+core@7.0.0-alpha.1/node_modules/@capacitor/status-bar"

SPEC CHECKSUMS:
Capacitor: 559d073c4ca6c27f8e7002c807eea94c3ba435a9
CapacitorApp: 9d53aec7101f7b030a950c5bdc4df8612576b279
CapacitorBarcodeScanner: 3780aa09a86e526b2903d3b804bd867100f4c924
CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af
CapacitorHaptics: 9ebc9363f0e9b8eb4295088a0b474530acf1859b
CapacitorKeyboard: deacbd09d8d1029c3681197fb05d206b721d5f73
CapacitorStatusBar: 2e4369f99166125435641b1908d05f561eaba6f6
Capacitor: bba49f57640a895581dee494f20489e97a6a4fe2
CapacitorApp: 649eca1980ddb28d43177bc78b252123e243b848
CapacitorBarcodeScanner: c2c1dfda29d805c99ac4531b6f87c94ea64735ce
CapacitorCordova: f3378f035160ac7b234ee39d10098c1ecbb6f078
CapacitorHaptics: b004f0eb5b1cbef124889ccf745679f3aa9568ef
CapacitorKeyboard: 683563ad6b13c1a46bfc710d49b4621570feef48
CapacitorStatusBar: 31febfff4331f2e800847abdac79d64f04eb4206
OSBarcodeLib: ced133bc1ec073636e18c6a0553d0a5c4b90cf17

PODFILE CHECKSUM: 1d6169ce9a8e5c5a436844292f343842268f688b
PODFILE CHECKSUM: 66a45479d1024a7f650ee9589958afd9cb575718

COCOAPODS: 1.15.2
16 changes: 8 additions & 8 deletions example-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"lint": "eslint"
},
"dependencies": {
"@capacitor/android": "^6.0.0",
"@capacitor/app": "^6.0.0",
"@capacitor/android": "next",
"@capacitor/app": "next",
"@capacitor/barcode-scanner": "workspace:*",
"@capacitor/core": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/keyboard": "^6.0.0",
"@capacitor/status-bar": "^6.0.0",
"@capacitor/core": "next",
"@capacitor/haptics": "next",
"@capacitor/ios": "next",
"@capacitor/keyboard": "next",
"@capacitor/status-bar": "next",
"@ionic/react": "^7.0.0",
"@ionic/react-router": "^7.0.0",
"@types/react-router": "^5.1.20",
Expand All @@ -31,7 +31,7 @@
"react-router-dom": "^5.3.4"
},
"devDependencies": {
"@capacitor/cli": "^6.0.0",
"@capacitor/cli": "next",
"@testing-library/dom": ">=7.21.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
Expand Down

0 comments on commit 999bcb1

Please sign in to comment.