Skip to content

Commit d2c1f9d

Browse files
authored
Merge pull request #3 from capacitor-community/capacitor-v3
Capacitor v3
2 parents bad5649 + 9af0bb4 commit d2c1f9d

30 files changed

+5548
-1532
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ node_modules/
1010
Pods
1111
Build
1212
xcuserdata
13+
DerivedData
1314

1415
# macOS files
1516
.DS_Store

CapacitorCommunityAppIcon.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.author = package['author']
1212
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
1313
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14-
s.ios.deployment_target = '11.0'
14+
s.ios.deployment_target = '12.0'
1515
s.dependency 'Capacitor'
1616
s.swift_version = '5.1'
1717
end

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
</p>
77

88
<p align="center">
9-
<img src="https://img.shields.io/maintenance/yes/2020?style=flat-square" />
10-
<a href="https://github.com/capacitor-community/app-icon/actions?query=workflow%3A%22CI%22"><img src="https://img.shields.io/github/workflow/status/capacitor-community/app-icon/CI?style=flat-square" /></a>
9+
<img src="https://img.shields.io/maintenance/yes/2021?style=flat-square" />
1110
<a href="https://www.npmjs.com/package/@capacitor-community/app-icon"><img src="https://img.shields.io/npm/l/@capacitor-community/app-icon?style=flat-square" /></a>
1211
<br>
1312
<a href="https://www.npmjs.com/package/@capacitor-community/app-icon"><img src="https://img.shields.io/npm/dw/@capacitor-community/app-icon?style=flat-square" /></a>
@@ -92,9 +91,7 @@ For iPad specific version of an icon, there is an additional key to add in Info.
9291
## Usage
9392

9493
```javascript
95-
import { Plugins } from '@capacitor/core';
96-
97-
const { AppIcon } = Plugins;
94+
import { AppIcon } from '@capacitor-community/app-icon';
9895

9996
const changeIcon = async (iconName) => {
10097

example/ios/App/App.xcodeproj/project.pbxproj

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
1414
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
1515
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
16-
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
17-
6C8EB34A25AD156A00D8D0B3 /* stencil-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C8EB34725AD156A00D8D0B3 /* stencil-icon.png */; };
18-
6C8EB34B25AD156A00D8D0B3 /* ionic-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C8EB34825AD156A00D8D0B3 /* ionic-icon.png */; };
19-
6C8EB34C25AD156A00D8D0B3 /* ionitron-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C8EB34925AD156A00D8D0B3 /* ionitron-icon.png */; };
16+
6C75BC5D260956A4001D6D8C /* stencil-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C75BC5C260956A4001D6D8C /* stencil-icon.png */; };
17+
6C75BC60260956AB001D6D8C /* ionitron-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C75BC5F260956AB001D6D8C /* ionitron-icon.png */; };
18+
6C75BC6426095757001D6D8C /* ionic-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C75BC6326095757001D6D8C /* ionic-icon.png */; };
19+
6CA96339260938650052EF08 /* public in Resources */ = {isa = PBXBuildFile; fileRef = 6CA96338260938650052EF08 /* public */; };
2020
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
2121
/* End PBXBuildFile section */
2222

@@ -29,10 +29,10 @@
2929
504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3030
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3131
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32-
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = SOURCE_ROOT; };
33-
6C8EB34725AD156A00D8D0B3 /* stencil-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "stencil-icon.png"; path = "../../../../src/assets/icon/stencil-icon.png"; sourceTree = "<group>"; };
34-
6C8EB34825AD156A00D8D0B3 /* ionic-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ionic-icon.png"; path = "../../../../src/assets/icon/ionic-icon.png"; sourceTree = "<group>"; };
35-
6C8EB34925AD156A00D8D0B3 /* ionitron-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ionitron-icon.png"; path = "../../../../src/assets/icon/ionitron-icon.png"; sourceTree = "<group>"; };
32+
6C75BC5C260956A4001D6D8C /* stencil-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "stencil-icon.png"; path = "../../../../src/assets/icon/stencil-icon.png"; sourceTree = "<group>"; };
33+
6C75BC5F260956AB001D6D8C /* ionitron-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ionitron-icon.png"; path = "../../../../src/assets/icon/ionitron-icon.png"; sourceTree = "<group>"; };
34+
6C75BC6326095757001D6D8C /* ionic-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ionic-icon.png"; path = "../../../../src/assets/icon/ionic-icon.png"; sourceTree = "<group>"; };
35+
6CA96338260938650052EF08 /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
3636
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3737
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 = "<group>"; };
3838
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 = "<group>"; };
@@ -79,25 +79,25 @@
7979
504EC3061FED79650016851F /* App */ = {
8080
isa = PBXGroup;
8181
children = (
82-
6C8EB34525AD154D00D8D0B3 /* AlternateIcons */,
82+
6C75BC5826095672001D6D8C /* AlternateIcons */,
83+
6CA96338260938650052EF08 /* public */,
8384
50379B222058CBB4000EE86E /* capacitor.config.json */,
8485
504EC3071FED79650016851F /* AppDelegate.swift */,
8586
504EC30B1FED79650016851F /* Main.storyboard */,
8687
504EC30E1FED79650016851F /* Assets.xcassets */,
8788
504EC3101FED79650016851F /* LaunchScreen.storyboard */,
8889
504EC3131FED79650016851F /* Info.plist */,
8990
2FAD9762203C412B000D30F8 /* config.xml */,
90-
50B271D01FEDC1A000F3C39B /* public */,
9191
);
9292
path = App;
9393
sourceTree = "<group>";
9494
};
95-
6C8EB34525AD154D00D8D0B3 /* AlternateIcons */ = {
95+
6C75BC5826095672001D6D8C /* AlternateIcons */ = {
9696
isa = PBXGroup;
9797
children = (
98-
6C8EB34825AD156A00D8D0B3 /* ionic-icon.png */,
99-
6C8EB34925AD156A00D8D0B3 /* ionitron-icon.png */,
100-
6C8EB34725AD156A00D8D0B3 /* stencil-icon.png */,
98+
6C75BC5C260956A4001D6D8C /* stencil-icon.png */,
99+
6C75BC6326095757001D6D8C /* ionic-icon.png */,
100+
6C75BC5F260956AB001D6D8C /* ionitron-icon.png */,
101101
);
102102
path = AlternateIcons;
103103
sourceTree = "<group>";
@@ -173,13 +173,13 @@
173173
buildActionMask = 2147483647;
174174
files = (
175175
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
176-
6C8EB34B25AD156A00D8D0B3 /* ionic-icon.png in Resources */,
177-
50B271D11FEDC1A000F3C39B /* public in Resources */,
178176
504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
179177
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
178+
6C75BC6426095757001D6D8C /* ionic-icon.png in Resources */,
179+
6C75BC5D260956A4001D6D8C /* stencil-icon.png in Resources */,
180180
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
181-
6C8EB34C25AD156A00D8D0B3 /* ionitron-icon.png in Resources */,
182-
6C8EB34A25AD156A00D8D0B3 /* stencil-icon.png in Resources */,
181+
6CA96339260938650052EF08 /* public in Resources */,
182+
6C75BC60260956AB001D6D8C /* ionitron-icon.png in Resources */,
183183
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
184184
);
185185
runOnlyForDeploymentPostprocessing = 0;
@@ -367,7 +367,7 @@
367367
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
368368
CODE_SIGN_STYLE = Automatic;
369369
INFOPLIST_FILE = App/Info.plist;
370-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
370+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
371371
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
372372
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
373373
PRODUCT_BUNDLE_IDENTIFIER = com.example.app;
@@ -385,7 +385,7 @@
385385
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
386386
CODE_SIGN_STYLE = Automatic;
387387
INFOPLIST_FILE = App/Info.plist;
388-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
388+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
389389
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
390390
PRODUCT_BUNDLE_IDENTIFIER = com.example.app;
391391
PRODUCT_NAME = "$(TARGET_NAME)";

example/ios/App/App/AppDelegate.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3737
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
3838
// Called when the app was launched with a url. Feel free to add additional processing here,
3939
// 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)
40+
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
4141
}
4242

4343
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
4444
// Called when the app was launched with an activity, including Universal Links.
4545
// Feel free to add additional processing here, but if you want the App API to support
4646
// tracking app url opens, make sure to keep this call
47-
return CAPBridge.handleContinueActivity(userActivity, restorationHandler)
47+
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
4848
}
4949

5050
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
@@ -54,18 +54,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
5454
guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }
5555

5656
if statusBarRect.contains(touchPoint) {
57-
NotificationCenter.default.post(CAPBridge.statusBarTappedNotification)
57+
NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
5858
}
5959
}
6060

6161
#if USE_PUSH
6262

6363
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
64-
NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: deviceToken)
64+
NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken)
6565
}
6666

6767
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
68-
NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidFailToRegisterForRemoteNotificationsWithError.name()), object: error)
68+
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
6969
}
7070

7171
#endif
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"appId": "com.example.app",
3-
"appName": "example",
4-
"bundledWebRuntime": false,
5-
"npmClient": "npm",
6-
"webDir": "www",
7-
"plugins": {
8-
"SplashScreen": {
9-
"launchShowDuration": 0
10-
}
11-
},
12-
"cordova": {}
2+
"appId": "com.example.app",
3+
"appName": "example",
4+
"bundledWebRuntime": false,
5+
"npmClient": "npm",
6+
"webDir": "www",
7+
"plugins": {
8+
"SplashScreen": {
9+
"launchShowDuration": 0
10+
}
11+
},
12+
"cordova": {}
1313
}
3.02 KB
Loading
549 Bytes
Binary file not shown.
3.24 KB
Loading
38.3 KB
Loading

0 commit comments

Comments
 (0)