Skip to content

Commit

Permalink
replaced plugin with custom implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
RemcoSimonides committed Nov 29, 2023
1 parent 3b566a0 commit a03212d
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 61 deletions.
12 changes: 8 additions & 4 deletions apps/journal/ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
09A702BD2912681C00649103 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 09A702BC2912681C00649103 /* GoogleService-Info.plist */; };
2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
4098AE3F2B17C91500BBE238 /* MyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4098AE3E2B17C91500BBE238 /* MyViewController.swift */; };
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
Expand All @@ -23,6 +24,7 @@
09A702BC2912681C00649103 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
193DB9B0620F2A3F400828A1 /* 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 = "<group>"; };
2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
4098AE3E2B17C91500BBE238 /* MyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyViewController.swift; sourceTree = "<group>"; };
50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -86,6 +88,7 @@
504EC3131FED79650016851F /* Info.plist */,
2FAD9762203C412B000D30F8 /* config.xml */,
50B271D01FEDC1A000F3C39B /* public */,
4098AE3E2B17C91500BBE238 /* MyViewController.swift */,
);
path = App;
sourceTree = "<group>";
Expand Down Expand Up @@ -213,6 +216,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4098AE3F2B17C91500BBE238 /* MyViewController.swift in Sources */,
504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -353,13 +357,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 51;
CURRENT_PROJECT_VERSION = 55;
DEVELOPMENT_TEAM = 2Z8SN3C4MM;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Strive Journal";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.12.0;
MARKETING_VERSION = 1.13.1;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.strive.journal;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -376,13 +380,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 51;
CURRENT_PROJECT_VERSION = 55;
DEVELOPMENT_TEAM = 2Z8SN3C4MM;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Strive Journal";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.12.0;
MARKETING_VERSION = 1.13.1;
PRODUCT_BUNDLE_IDENTIFIER = com.strive.journal;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
Expand Down
13 changes: 6 additions & 7 deletions apps/journal/ios/App/App/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
</dependencies>
<scenes>
<!--Bridge View Controller-->
<!--My View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
<viewController id="BYZ-38-t0r" customClass="MyViewController" customModule="App" customModuleProvider="target" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="138" y="-2"/>
</scene>
</scenes>
</document>
29 changes: 29 additions & 0 deletions apps/journal/ios/App/App/MyViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// MyViewController.swift
// App
//
// Created by Remco on 29/11/2023.
//

import UIKit
import Capacitor

class MyViewController: CAPBridgeViewController {

override func viewDidLoad() {
super.viewDidLoad()
webView!.allowsBackForwardNavigationGestures = true
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
1 change: 0 additions & 1 deletion apps/journal/ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def capacitor_pods
pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapawesomeCapacitorAppUpdate', :path => '../../node_modules/@capawesome/capacitor-app-update'
pod 'CapacitorPluginIosWebviewConfigurator', :path => '../../node_modules/capacitor-plugin-ios-webview-configurator'
end

target 'App' do
Expand Down
10 changes: 10 additions & 0 deletions apps/journal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions apps/journal/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import { PWAService } from '@strive/utils/services/pwa.service'
import * as Sentry from '@sentry/capacitor'
import * as SentryAngular from '@sentry/angular'

import { setBackForwardNavigationGestures, setWebviewBounce } from 'capacitor-plugin-ios-webview-configurator'

Sentry.init(
{
dsn: 'https://[email protected]/6638131',
Expand Down Expand Up @@ -75,9 +73,5 @@ Sentry.init(
export class AppModule {
constructor(pwa: PWAService) {
pwa.addEventListeners()

// console.log('registering webview config')
setWebviewBounce(true)
setBackForwardNavigationGestures(true)
}
}
44 changes: 2 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@sentry/capacitor": "^0.15.0",
"@sentry/node": "^7.81.1",
"algoliasearch": "^4.17.2",
"capacitor-plugin-ios-webview-configurator": "^0.4.0",
"chart.js": "^4.3.0",
"chartjs-adapter-date-fns": "^3.0.0",
"clsx": "^1.2.1",
Expand Down

0 comments on commit a03212d

Please sign in to comment.