-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7b9a9e
commit bb3c12b
Showing
36 changed files
with
489 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"platforms": ["apple"], | ||
"apple": { | ||
"modules": ["ExpoWidgetModule"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
declare global { | ||
namespace Native { | ||
interface ExpoWidget { | ||
set(key: string, value: string, suite?: string): void; | ||
} | ||
} | ||
|
||
interface NativeModules { | ||
ExpoWidget?: Native.ExpoWidget; | ||
} | ||
} | ||
|
||
// TODO: Can we drop this? | ||
const m = (expo?.modules?.ExpoWidget ?? { | ||
set() {}, | ||
}) as Native.ExpoWidget; | ||
|
||
export default m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'ExpoWidget' | ||
s.version = '1.0.0' | ||
s.summary = 'A sample project summary' | ||
s.description = 'A sample project description' | ||
s.author = '' | ||
s.homepage = 'https://docs.expo.dev/modules/' | ||
s.platforms = { | ||
:ios => '15.1', | ||
:tvos => '15.1' | ||
} | ||
s.source = { git: '' } | ||
s.static_framework = true | ||
|
||
s.dependency 'ExpoModulesCore' | ||
|
||
# Swift/Objective-C compatibility | ||
s.pod_target_xcconfig = { | ||
'DEFINES_MODULE' => 'YES', | ||
} | ||
|
||
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import ExpoModulesCore | ||
import WidgetKit | ||
|
||
public class ExpoWidgetModule: Module { | ||
public func definition() -> ModuleDefinition { | ||
Name("ExpoWidget") | ||
|
||
Function("set") { (key: String, value: String, group: String?) in | ||
let userDefaults = UserDefaults(suiteName: group) | ||
userDefaults?.set(value, forKey: key) | ||
|
||
WidgetCenter.shared.reloadAllTimelines() | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
targets/widgets/Assets.xcassets/$accent.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors": [ | ||
{ | ||
"color": { | ||
"color-space": "display-p3", | ||
"components": { | ||
"red": 0.27450980392156865, | ||
"green": 0.5098039215686274, | ||
"blue": 0.7058823529411765, | ||
"alpha": 1 | ||
} | ||
}, | ||
"idiom": "universal" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "expo" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
targets/widgets/Assets.xcassets/$widgetBackground.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors": [ | ||
{ | ||
"color": { | ||
"color-space": "display-p3", | ||
"components": { | ||
"red": 0.11764705882352941, | ||
"green": 0.5647058823529412, | ||
"blue": 1, | ||
"alpha": 1 | ||
} | ||
}, | ||
"idiom": "universal" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "expo" | ||
} | ||
} |
Binary file added
BIN
+857 Bytes
targets/widgets/Assets.xcassets/AppIcon.appiconset/[email protected]
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
122
targets/widgets/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"idiom": "iphone", | ||
"size": "20x20", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "20x20", | ||
"scale": "3x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "29x29", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "29x29", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "29x29", | ||
"scale": "3x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "40x40", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "40x40", | ||
"scale": "3x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "60x60", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "iphone", | ||
"size": "60x60", | ||
"scale": "3x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "20x20", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "20x20", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "29x29", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "29x29", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "40x40", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "40x40", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "76x76", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "76x76", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ipad", | ||
"size": "83.5x83.5", | ||
"scale": "2x", | ||
"filename": "[email protected]" | ||
}, | ||
{ | ||
"idiom": "ios-marketing", | ||
"size": "1024x1024", | ||
"scale": "1x", | ||
"filename": "[email protected]" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "expo" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
targets/widgets/Assets.xcassets/Color1.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x73", | ||
"green" : "0x1D", | ||
"red" : "0xB9" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
targets/widgets/Assets.xcassets/Color2.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0xC6", | ||
"green" : "0x53", | ||
"red" : "0xF9" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>NSExtension</key> | ||
<dict> | ||
<key>NSExtensionPointIdentifier</key> | ||
<string>com.apple.widgetkit-extension</string> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>NSPrivacyAccessedAPITypes</key> | ||
<array> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>CA92.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>0A2A.1</string> | ||
<string>3B52.1</string> | ||
<string>C617.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>E174.1</string> | ||
<string>85F4.1</string> | ||
</array> | ||
</dict> | ||
<dict> | ||
<key>NSPrivacyAccessedAPIType</key> | ||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string> | ||
<key>NSPrivacyAccessedAPITypeReasons</key> | ||
<array> | ||
<string>35F9.1</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>NSPrivacyCollectedDataTypes</key> | ||
<array/> | ||
<key>NSPrivacyTracking</key> | ||
<false/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** @type {import('@bacons/apple-targets').Config} */ | ||
module.exports = { | ||
type: "widget", | ||
icon: "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/FullMoon2010.jpg/1200px-FullMoon2010.jpg", | ||
colors: { | ||
$accent: "steelblue", | ||
$widgetBackground: "dodgerblue", | ||
}, | ||
entitlements: { | ||
"com.apple.security.application-groups": ["group.bacon.data"], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.application-groups</key> | ||
<array> | ||
<string>group.bacon.data</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import WidgetKit | ||
import SwiftUI | ||
|
||
@main | ||
struct exportWidgets: WidgetBundle { | ||
var body: some Widget { | ||
// Export widgets here | ||
widgets() | ||
} | ||
} |
Oops, something went wrong.