Skip to content

Commit

Permalink
Merge pull request #97 from itsalb3rt/feature/ios
Browse files Browse the repository at this point in the history
Feature/ios
  • Loading branch information
itsalb3rt authored Aug 23, 2023
2 parents 64112f2 + b5d0dae commit 8f606fc
Show file tree
Hide file tree
Showing 150 changed files with 1,169 additions and 2,057 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
/src-capacitor/www

# local env files
.env
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Sheiley Shop
# SavyCart
<div>
<img src="https://user-images.githubusercontent.com/3104648/28351989-7f68389e-6c4b-11e7-9bf2-e9fcd4977e7a.png" width="30" style="display: inline"/>
| Android | IOS
</div>
<br />

**Sheiley Shop** is a **PWA** and **Android** APP to track personal purchases, No more paper and pencil to go to the supermarket :department_store:
**SavyCart** is a **PWA** and **Android** APP to track personal purchases, No more paper and pencil to go to the supermarket :department_store:

Start now [Using the web version](https://sheiley-shop.netlify.app/) to track your purchases and save money :moneybag:

Expand Down
1 change: 1 addition & 0 deletions capacitor.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"appId":"com.savycart.app","appName":"savycart","webDir":"dist","server":{"androidScheme":"https","url":"http://192.168.0.135:8081"}}
6 changes: 5 additions & 1 deletion src-capacitor/ios/.gitignore → ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
App/build
App/Pods
App/Podfile.lock
App/output
App/App/public
DerivedData
xcuserdata

# Cordova plugins for Capacitor
capacitor-cordova-ios-plugins

# Generated Config files
App/App/capacitor.config.json
App/App/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -332,7 +332,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -346,11 +346,16 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8T4CYHJ6HN;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
INFOPLIST_KEY_CFBundleDisplayName = SavyCart;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.sheileyshop;
PRODUCT_BUNDLE_IDENTIFIER = com.savycart.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
Expand All @@ -364,10 +369,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8T4CYHJ6HN;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
INFOPLIST_KEY_CFBundleDisplayName = SavyCart;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sheileyshop;
MARKETING_VERSION = 1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.savycart.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
}

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)

let statusBarRect = UIApplication.shared.statusBarFrame
guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }

if statusBarRect.contains(touchPoint) {
NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
}
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"images": [
{
"filename": "AppIcon-512@2x.png",
"idiom": "universal",
"platform": "ios",
"size": "1024x1024"
},
{
"idiom": "ipad",
"size": "20x20",
"scale": "1x",
"filename": "AppIcon-20x20@1x.png"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "2x",
"filename": "AppIcon-20x20@2x.png"
},
{
"idiom": "ipad",
"size": "20x20",
"scale": "2x",
"filename": "AppIcon-20x20@2x-1.png"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "3x",
"filename": "AppIcon-20x20@3x.png"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "1x",
"filename": "AppIcon-29x29@1x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "2x",
"filename": "AppIcon-29x29@2x.png"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "2x",
"filename": "AppIcon-29x29@2x-1.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x",
"filename": "AppIcon-29x29@3x.png"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "1x",
"filename": "AppIcon-40x40@1x.png"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "2x",
"filename": "AppIcon-40x40@2x.png"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "2x",
"filename": "AppIcon-40x40@2x-1.png"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x",
"filename": "AppIcon-40x40@3x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "2x",
"filename": "AppIcon-60x60@2x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x",
"filename": "AppIcon-60x60@3x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "1x",
"filename": "AppIcon-76x76@1x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "2x",
"filename": "AppIcon-76x76@2x.png"
},
{
"idiom": "ipad",
"size": "83.5x83.5",
"scale": "2x",
"filename": "AppIcon-83.5x83.5@2x.png"
},
{
"idiom": "ios-marketing",
"size": "1024x1024",
"scale": "1x",
"filename": "AppIcon-512@2x.png"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
File renamed without changes.
56 changes: 56 additions & 0 deletions ios/App/App/Assets.xcassets/Splash.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"images": [
{
"idiom": "universal",
"filename": "Default@1x~universal~anyany.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "Default@2x~universal~anyany.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "Default@3x~universal~anyany.png",
"scale": "3x"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "1x",
"filename": "Default@1x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "2x",
"filename": "Default@2x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "3x",
"filename": "Default@3x~universal~anyany-dark.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
11 changes: 3 additions & 8 deletions src-capacitor/ios/App/App/Info.plist → 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>Sheiley Shop</string>
<string>savycart</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand All @@ -17,16 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
8 changes: 7 additions & 1 deletion src-capacitor/ios/App/Podfile → ios/App/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
platform :ios, '12.0'
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'

platform :ios, '13.0'
use_frameworks!

# workaround to avoid Xcode caching of Pods that requires
Expand All @@ -16,3 +18,7 @@ target 'App' do
capacitor_pods
# Add your Pods here
end

post_install do |installer|
assertDeploymentTarget(installer)
end
22 changes: 22 additions & 0 deletions ios/App/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PODS:
- Capacitor (5.2.2):
- CapacitorCordova
- CapacitorCordova (5.2.2)

DEPENDENCIES:
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"

EXTERNAL SOURCES:
Capacitor:
:path: "../../node_modules/@capacitor/ios"
CapacitorCordova:
:path: "../../node_modules/@capacitor/ios"

SPEC CHECKSUMS:
Capacitor: 070b18988e0f566728ae9a5eb3a7a974595f1626
CapacitorCordova: 3773395d5331add072300ff6041ca2cf7b93cb0b

PODFILE CHECKSUM: 8ab55909c5de2b217f9841e5e5b329f5ec901553

COCOAPODS: 1.12.1
13 changes: 13 additions & 0 deletions mobile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is use to change the server url in capacitor.config.json to the local ip address
// to allow the app to connect to the server running on the local simulator
const fs = require('fs');
const fileName = './capacitor.config.json';
const file = require(fileName);

var ip = require("ip");

file.server.url = `http://${ip.address()}:8081`

fs.writeFile(fileName, JSON.stringify(file), function writeJSON(err) {
if (err) return console.log(err);
});
5 changes: 2 additions & 3 deletions src-capacitor/mobile.js → mobileBuild.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// This file only remove the url from the server object into the capacitor config file
const fs = require('fs');
const fileName = './capacitor.config.json';
const file = require(fileName);

var ip = require("ip");

file.server.url = `http://${ip.address()}:8081`
delete file.server.url

fs.writeFile(fileName, JSON.stringify(file), function writeJSON(err) {
if (err) return console.log(err);
Expand Down
Loading

0 comments on commit 8f606fc

Please sign in to comment.