├── .nvmrc ├── src ├── __tests__ │ └── index.test.tsx └── index.tsx ├── ios ├── Widgetkit-Bridging-Header.h ├── Widgetkit.m ├── Widgetkit.swift └── Widgetkit.xcodeproj │ └── project.pbxproj ├── .gitattributes ├── example ├── app.json ├── ios │ ├── File.swift │ ├── WidgetkitExample │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── WidgetkitExample.entitlements │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── Info.plist │ │ ├── AppDelegate.m │ │ └── Base.lproj │ │ │ └── LaunchScreen.xib │ ├── WidgetkitExample-Bridging-Header.h │ ├── WidgetkitExample.xcworkspace │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── contents.xcworkspacedata │ ├── Podfile │ ├── WidgetkitExample.xcodeproj │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── WidgetkitExample.xcscheme │ │ └── project.pbxproj │ └── Podfile.lock ├── android │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── debug.keystore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── reactnativewidgetkit │ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ │ └── MainApplication.java │ │ │ │ └── AndroidManifest.xml │ │ │ └── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── reactnativewidgetkit │ │ │ │ └── ReactNativeFlipper.java │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── .project │ ├── gradle.properties │ ├── build.gradle │ ├── gradlew.bat │ └── gradlew ├── index.tsx ├── babel.config.js ├── package.json ├── src │ └── App.tsx └── metro.config.js ├── babel.config.js ├── git_assets ├── widgetkit.png ├── notes_small.png ├── focused_small.png └── weather_medium.png ├── .editorconfig ├── react-native-widgetkit.podspec ├── tsconfig.json ├── .gitignore ├── LICENSE ├── .circleci └── config.yml ├── package.json ├── README.md └── CONTRIBUTING.md /.nvmrc: -------------------------------------------------------------------------------- 1 | 12 -------------------------------------------------------------------------------- /src/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | it.todo('write a test'); 2 | -------------------------------------------------------------------------------- /ios/Widgetkit-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WidgetkitExample", 3 | "displayName": "Widgetkit Example" 4 | } 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // WidgetkitExample 4 | // 5 | 6 | import Foundation 7 | -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /git_assets/widgetkit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/git_assets/widgetkit.png -------------------------------------------------------------------------------- /git_assets/notes_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/git_assets/notes_small.png -------------------------------------------------------------------------------- /git_assets/focused_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/git_assets/focused_small.png -------------------------------------------------------------------------------- /git_assets/weather_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/git_assets/weather_medium.png -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Widgetkit Example 3 | 4 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/index.tsx: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './src/App'; 3 | import { name as appName } from './app.json'; 4 | 5 | AppRegistry.registerComponent(appName, () => App); 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fasky-software/react-native-widgetkit/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'WidgetkitExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/WidgetkitExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.fasky 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:metro-react-native-babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | alias: { 11 | [pak.name]: path.join(__dirname, '..', pak.source), 12 | }, 13 | }, 14 | ], 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/reactnativewidgetkit/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.reactnativewidgetkit; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "WidgetkitExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /ios/Widgetkit.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RCT_EXTERN_MODULE(Widgetkit, NSObject) 4 | 5 | RCT_EXTERN_METHOD(reloadAllTimelines) 6 | RCT_EXTERN_METHOD(reloadTimelines:(NSString *)ofKind) 7 | RCT_EXTERN_METHOD(getItem:(NSString *)key withAppGroup:(NSString *)appGroup withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) 8 | RCT_EXTERN_METHOD(setItem:(NSString *)key withValue:(NSString *)value withAppGroup:(NSString *)appGroup withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-widgetkit-example", 3 | "description": "Example app for react-native-widgetkit", 4 | "version": "0.0.1", 5 | "private": true, 6 | "scripts": { 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start" 10 | }, 11 | "dependencies": { 12 | "react": "16.11.0", 13 | "react-native": "0.62.2" 14 | }, 15 | "devDependencies": { 16 | "@babel/core": "^7.9.6", 17 | "@babel/runtime": "^7.9.6", 18 | "babel-plugin-module-resolver": "^4.0.0", 19 | "metro-react-native-babel-preset": "^0.59.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /react-native-widgetkit.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "react-native-widgetkit" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.homepage = package["homepage"] 10 | s.license = package["license"] 11 | s.authors = package["author"] 12 | 13 | s.platforms = { :ios => "9.0" } 14 | s.source = { :git => "https://github.com/fasky-software/react-native-widgetkit.git", :tag => "#{s.version}" } 15 | 16 | 17 | s.source_files = "ios/**/*.{h,m,mm,swift}" 18 | 19 | 20 | s.dependency "React" 21 | end 22 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "react-native-widgetkit": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "importsNotUsedAsValues": "error", 11 | "forceConsistentCasingInFileNames": true, 12 | "jsx": "react", 13 | "lib": ["esnext"], 14 | "module": "esnext", 15 | "moduleResolution": "node", 16 | "noFallthroughCasesInSwitch": true, 17 | "noImplicitReturns": true, 18 | "noImplicitUseStrict": false, 19 | "noStrictGenericChecks": false, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "resolveJsonModule": true, 23 | "skipLibCheck": true, 24 | "strict": true, 25 | "target": "esnext" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .idea 35 | .gradle 36 | local.properties 37 | android.iml 38 | 39 | # Cocoapods 40 | # 41 | example/ios/Pods 42 | 43 | # node.js 44 | # 45 | node_modules/ 46 | npm-debug.log 47 | yarn-debug.log 48 | yarn-error.log 49 | 50 | # BUCK 51 | buck-out/ 52 | \.buckd/ 53 | android/app/libs 54 | android/keystores/debug.keystore 55 | 56 | # Expo 57 | .expo/* 58 | 59 | # generated by bob 60 | lib/ 61 | -------------------------------------------------------------------------------- /example/src/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { StyleSheet, View, Text, Alert } from 'react-native'; 3 | import { 4 | reloadAllTimelines, 5 | reloadTimelines, 6 | getItem, 7 | setItem, 8 | } from 'react-native-widgetkit'; 9 | 10 | export default function App() { 11 | React.useEffect(() => { 12 | setTimeout(async () => { 13 | reloadAllTimelines(); 14 | reloadTimelines('test2'); 15 | await setItem('test', 'Hello World', 'group.com.fasky'); 16 | const item = await getItem('test', 'group.com.fasky'); 17 | 18 | Alert.alert('checks passed: ' + item); 19 | }, 0); 20 | }, []); 21 | 22 | return ( 23 | 24 | Hello World 25 | 26 | ); 27 | } 28 | 29 | const styles = StyleSheet.create({ 30 | container: { 31 | flex: 1, 32 | alignItems: 'center', 33 | justifyContent: 'center', 34 | }, 35 | }); 36 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | FLIPPER_VERSION=0.33.1 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Thomas Leiter 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.2") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const blacklist = require('metro-config/src/defaults/blacklist'); 3 | const escape = require('escape-string-regexp'); 4 | const pak = require('../package.json'); 5 | 6 | const root = path.resolve(__dirname, '..'); 7 | 8 | const modules = Object.keys({ 9 | ...pak.peerDependencies, 10 | }); 11 | 12 | module.exports = { 13 | projectRoot: __dirname, 14 | watchFolders: [root], 15 | 16 | // We need to make sure that only one version is loaded for peerDependencies 17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules 18 | resolver: { 19 | blacklistRE: blacklist( 20 | modules.map( 21 | (m) => 22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) 23 | ) 24 | ), 25 | 26 | extraNodeModules: modules.reduce((acc, name) => { 27 | acc[name] = path.join(__dirname, 'node_modules', name); 28 | return acc; 29 | }, {}), 30 | }, 31 | 32 | transformer: { 33 | getTransformOptions: async () => ({ 34 | transform: { 35 | experimentalImportSupport: false, 36 | inlineRequires: true, 37 | }, 38 | }), 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import { NativeModules } from 'react-native'; 2 | 3 | const { Widgetkit } = NativeModules; 4 | const { 5 | reloadAllTimelines: reloadAllTimelinesNative, 6 | reloadTimelines: reloadTimelinesNative, 7 | getItem: getItemNative, 8 | setItem: setItemNative, 9 | } = Widgetkit || {}; 10 | 11 | /** 12 | * Reloads the timelines for all widgets of a particular kind. 13 | * 14 | */ 15 | export const reloadAllTimelines = (reloadAllTimelinesNative || 16 | (() => {})) as () => void; 17 | 18 | /** 19 | * Reloads the timelines for all configured widgets belonging to the containing app. 20 | * 21 | * @param ofKind - Widget Name 22 | * 23 | */ 24 | export const reloadTimelines = (reloadTimelinesNative || (() => {})) as ( 25 | ofKind: string 26 | ) => void; 27 | 28 | /** 29 | * Reads Value from UserDefaults database. 30 | * 31 | * @param key - Key 32 | * @param appGroup - App Group 33 | * 34 | */ 35 | export const getItem = (getItemNative || 36 | (() => { 37 | return Promise.resolve(); 38 | })) as (key: string, appGroup: string) => Promise; 39 | 40 | /** 41 | * Writes Key-Value to UserDefaults database. 42 | * 43 | * @param key - Key 44 | * @param value - Value 45 | * @param appGroup - App Group 46 | * 47 | */ 48 | export const setItem = (setItemNative || 49 | (() => { 50 | return Promise.resolve(); 51 | })) as (key: string, value: string, appGroup: string) => Promise; 52 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Widgetkit Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /ios/Widgetkit.swift: -------------------------------------------------------------------------------- 1 | import WidgetKit 2 | 3 | @objc(Widgetkit) 4 | class Widgetkit: NSObject { 5 | 6 | @objc(reloadAllTimelines) 7 | func reloadAllTimelines() -> Void { 8 | if #available(iOS 14.0, *) { 9 | #if arch(arm64) || arch(i386) || arch(x86_64) 10 | WidgetCenter.shared.reloadAllTimelines() 11 | #endif 12 | } 13 | } 14 | 15 | @objc(reloadTimelines:) 16 | func reloadTimelines(ofKind: String) -> Void { 17 | if #available(iOS 14.0, *) { 18 | #if arch(arm64) || arch(i386) || arch(x86_64) 19 | WidgetCenter.shared.reloadTimelines(ofKind: ofKind) 20 | #endif 21 | } 22 | } 23 | 24 | @objc(getItem:withAppGroup:withResolver:withRejecter:) 25 | func getItem(key: String, appGroup: String, resolve: RCTPromiseResolveBlock,reject: RCTPromiseRejectBlock) -> Void { 26 | var sharedDefaults: UserDefaults? = nil; 27 | 28 | if(appGroup != "") { 29 | sharedDefaults = UserDefaults.init(suiteName: appGroup) 30 | } 31 | 32 | if(sharedDefaults == nil) { 33 | resolve(nil) 34 | return 35 | } 36 | 37 | let value = sharedDefaults?.value(forKey: key) 38 | resolve(value); 39 | } 40 | 41 | @objc(setItem:withValue:withAppGroup:withResolver:withRejecter:) 42 | func setItem(key: String, value: String, appGroup: String, resolve: RCTPromiseResolveBlock,reject: RCTPromiseRejectBlock) -> Void { 43 | var sharedDefaults: UserDefaults? = nil; 44 | 45 | if(appGroup != "") { 46 | sharedDefaults = UserDefaults.init(suiteName: appGroup) 47 | } 48 | 49 | if(sharedDefaults == nil) { 50 | resolve(nil) 51 | return 52 | } 53 | 54 | sharedDefaults?.setValue(value, forKey: key) 55 | resolve(nil) 56 | } 57 | 58 | 59 | @objc 60 | static func requiresMainQueueSetup() -> Bool { 61 | return true 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | executors: 4 | default: 5 | docker: 6 | - image: circleci/node:10 7 | working_directory: ~/project 8 | 9 | commands: 10 | attach_project: 11 | steps: 12 | - attach_workspace: 13 | at: ~/project 14 | 15 | jobs: 16 | install-dependencies: 17 | executor: default 18 | steps: 19 | - checkout 20 | - attach_project 21 | - restore_cache: 22 | keys: 23 | - dependencies-{{ checksum "package.json" }} 24 | - dependencies- 25 | - restore_cache: 26 | keys: 27 | - dependencies-example-{{ checksum "example/package.json" }} 28 | - dependencies-example- 29 | - run: 30 | name: Install dependencies 31 | command: | 32 | yarn install --cwd example --frozen-lockfile 33 | yarn install --frozen-lockfile 34 | - save_cache: 35 | key: dependencies-{{ checksum "package.json" }} 36 | paths: node_modules 37 | - save_cache: 38 | key: dependencies-example-{{ checksum "example/package.json" }} 39 | paths: example/node_modules 40 | - persist_to_workspace: 41 | root: . 42 | paths: . 43 | 44 | lint: 45 | executor: default 46 | steps: 47 | - attach_project 48 | - run: 49 | name: Lint files 50 | command: | 51 | yarn lint 52 | 53 | typescript: 54 | executor: default 55 | steps: 56 | - attach_project 57 | - run: 58 | name: Typecheck files 59 | command: | 60 | yarn typescript 61 | 62 | unit-tests: 63 | executor: default 64 | steps: 65 | - attach_project 66 | - run: 67 | name: Run unit tests 68 | command: | 69 | yarn test --coverage 70 | - store_artifacts: 71 | path: coverage 72 | destination: coverage 73 | 74 | build-package: 75 | executor: default 76 | steps: 77 | - attach_project 78 | - run: 79 | name: Build package 80 | command: | 81 | yarn prepare 82 | 83 | workflows: 84 | build-and-test: 85 | jobs: 86 | - install-dependencies 87 | - lint: 88 | requires: 89 | - install-dependencies 90 | - typescript: 91 | requires: 92 | - install-dependencies 93 | - unit-tests: 94 | requires: 95 | - install-dependencies 96 | - build-package: 97 | requires: 98 | - install-dependencies 99 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | #if DEBUG 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | static void InitializeFlipper(UIApplication *application) { 22 | FlipperClient *client = [FlipperClient sharedClient]; 23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 26 | [client addPlugin:[FlipperKitReactPlugin new]]; 27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 28 | [client start]; 29 | } 30 | #endif 31 | 32 | @implementation AppDelegate 33 | 34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 35 | { 36 | #if DEBUG 37 | InitializeFlipper(application); 38 | #endif 39 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 40 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 41 | moduleName:@"WidgetkitExample" 42 | initialProperties:nil]; 43 | 44 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 45 | 46 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 47 | UIViewController *rootViewController = [UIViewController new]; 48 | rootViewController.view = rootView; 49 | self.window.rootViewController = rootViewController; 50 | [self.window makeKeyAndVisible]; 51 | return YES; 52 | } 53 | 54 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 55 | { 56 | #if DEBUG 57 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 58 | #else 59 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 60 | #endif 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/reactnativewidgetkit/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.reactnativewidgetkit; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.ReactInstanceManager; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for WidgetkitExample: 28 | // packages.add(new MyReactNativePackage()); 29 | 30 | return packages; 31 | } 32 | 33 | @Override 34 | protected String getJSMainModuleName() { 35 | return "index"; 36 | } 37 | }; 38 | 39 | @Override 40 | public ReactNativeHost getReactNativeHost() { 41 | return mReactNativeHost; 42 | } 43 | 44 | @Override 45 | public void onCreate() { 46 | super.onCreate(); 47 | SoLoader.init(this, /* native exopackage */ false); 48 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled 49 | } 50 | 51 | /** 52 | * Loads Flipper in React Native templates. 53 | * 54 | * @param context 55 | */ 56 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 57 | if (BuildConfig.DEBUG) { 58 | try { 59 | /* 60 | We use reflection here to pick up the class that initializes Flipper, 61 | since Flipper library is not available in release mode 62 | */ 63 | Class aClass = Class.forName("com.reactnativewidgetkitExample.ReactNativeFlipper"); 64 | aClass 65 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 66 | .invoke(null, context, reactInstanceManager); 67 | } catch (ClassNotFoundException e) { 68 | e.printStackTrace(); 69 | } catch (NoSuchMethodException e) { 70 | e.printStackTrace(); 71 | } catch (IllegalAccessException e) { 72 | e.printStackTrace(); 73 | } catch (InvocationTargetException e) { 74 | e.printStackTrace(); 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/example/reactnativewidgetkit/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.example.reactnativewidgetkit; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 32 | client.addPlugin(new ReactFlipperPlugin()); 33 | client.addPlugin(new DatabasesFlipperPlugin(context)); 34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 35 | client.addPlugin(CrashReporterPlugin.getInstance()); 36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 37 | NetworkingModule.setCustomClientBuilder( 38 | new NetworkingModule.CustomClientBuilder() { 39 | @Override 40 | public void apply(OkHttpClient.Builder builder) { 41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 42 | } 43 | }); 44 | client.addPlugin(networkFlipperPlugin); 45 | client.start(); 46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 47 | // Hence we run if after all native modules have been initialized 48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 49 | if (reactContext == null) { 50 | reactInstanceManager.addReactInstanceEventListener( 51 | new ReactInstanceManager.ReactInstanceEventListener() { 52 | @Override 53 | public void onReactContextInitialized(ReactContext reactContext) { 54 | reactInstanceManager.removeReactInstanceEventListener(this); 55 | reactContext.runOnNativeModulesQueueThread( 56 | new Runnable() { 57 | @Override 58 | public void run() { 59 | client.addPlugin(new FrescoFlipperPlugin()); 60 | } 61 | }); 62 | } 63 | }); 64 | } else { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | def add_flipper_pods! 5 | version = '~> 0.33.1' 6 | pod 'FlipperKit', version, :configuration => 'Debug' 7 | pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug' 8 | pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug' 9 | pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug' 10 | pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug' 11 | end 12 | # Post Install processing for Flipper 13 | def flipper_post_install(installer) 14 | installer.pods_project.targets.each do |target| 15 | if target.name == 'YogaKit' 16 | target.build_configurations.each do |config| 17 | config.build_settings['SWIFT_VERSION'] = '4.1' 18 | end 19 | end 20 | end 21 | end 22 | 23 | target 'WidgetkitExample' do 24 | # Pods for WidgetkitExample 25 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 26 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 27 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 28 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 29 | pod 'React', :path => '../node_modules/react-native/' 30 | pod 'React-Core', :path => '../node_modules/react-native/' 31 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 32 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 33 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 34 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 35 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 36 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 37 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 38 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 39 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 40 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 41 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 42 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 43 | 44 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 45 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 46 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 47 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 48 | pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon" 49 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 50 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true 51 | 52 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 53 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 54 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 55 | 56 | pod 'react-native-widgetkit', :path => '../..' 57 | 58 | use_native_modules! 59 | 60 | # Enables Flipper. 61 | # 62 | # Note that if you have use_frameworks! enabled, Flipper will not work and 63 | # you should disable these next few lines. 64 | add_flipper_pods! 65 | post_install do |installer| 66 | flipper_post_install(installer) 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-widgetkit", 3 | "version": "1.0.9", 4 | "description": "React-Native Library which exposes useful methods of iOS WidgetKit", 5 | "main": "lib/commonjs/index", 6 | "module": "lib/module/index", 7 | "types": "lib/typescript/src/index.d.ts", 8 | "react-native": "src/index", 9 | "source": "src/index", 10 | "files": [ 11 | "src", 12 | "lib", 13 | "android", 14 | "ios", 15 | "cpp", 16 | "react-native-widgetkit.podspec", 17 | "!lib/typescript/example", 18 | "!**/__tests__", 19 | "!**/__fixtures__", 20 | "!**/__mocks__" 21 | ], 22 | "scripts": { 23 | "test": "jest", 24 | "typescript": "tsc --noEmit", 25 | "lint": "eslint \"**/*.{js,ts,tsx}\"", 26 | "prepare": "bob build", 27 | "release": "release-it", 28 | "example": "yarn --cwd example", 29 | "pods": "cd example && pod-install --quiet", 30 | "bootstrap": "yarn example && yarn && yarn pods" 31 | }, 32 | "keywords": [ 33 | "react-native", 34 | "ios", 35 | "android" 36 | ], 37 | "repository": "https://github.com/fasky-software/react-native-widgetkit", 38 | "author": "Thomas Leiter (https://github.com/tomLadder)", 39 | "license": "MIT", 40 | "bugs": { 41 | "url": "https://github.com/fasky-software/react-native-widgetkit/issues" 42 | }, 43 | "homepage": "https://github.com/fasky-software/react-native-widgetkit#readme", 44 | "devDependencies": { 45 | "@commitlint/config-conventional": "^8.3.4", 46 | "@react-native-community/bob": "^0.16.2", 47 | "@react-native-community/eslint-config": "^2.0.0", 48 | "@release-it/conventional-changelog": "^1.1.4", 49 | "@types/jest": "^26.0.0", 50 | "@types/react": "^16.9.19", 51 | "@types/react-native": "0.62.13", 52 | "commitlint": "^8.3.5", 53 | "eslint": "^7.2.0", 54 | "eslint-config-prettier": "^6.11.0", 55 | "eslint-plugin-prettier": "^3.1.3", 56 | "husky": "^4.2.5", 57 | "jest": "^26.0.1", 58 | "pod-install": "^0.1.0", 59 | "prettier": "^2.0.5", 60 | "react": "16.11.0", 61 | "react-native": "0.62.2", 62 | "release-it": "^13.5.8", 63 | "typescript": "^3.8.3" 64 | }, 65 | "peerDependencies": { 66 | "react": "*", 67 | "react-native": "*" 68 | }, 69 | "jest": { 70 | "preset": "react-native", 71 | "modulePathIgnorePatterns": [ 72 | "/example/node_modules", 73 | "/lib/" 74 | ] 75 | }, 76 | "husky": { 77 | "hooks": { 78 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", 79 | "pre-commit": "yarn lint && yarn typescript" 80 | } 81 | }, 82 | "commitlint": { 83 | "extends": [ 84 | "@commitlint/config-conventional" 85 | ] 86 | }, 87 | "release-it": { 88 | "git": { 89 | "commitMessage": "chore: release ${version}", 90 | "tagName": "v${version}" 91 | }, 92 | "npm": { 93 | "publish": true 94 | }, 95 | "github": { 96 | "release": true 97 | }, 98 | "plugins": { 99 | "@release-it/conventional-changelog": { 100 | "preset": "angular" 101 | } 102 | } 103 | }, 104 | "eslintConfig": { 105 | "extends": [ 106 | "@react-native-community", 107 | "prettier" 108 | ], 109 | "rules": { 110 | "prettier/prettier": [ 111 | "error", 112 | { 113 | "quoteProps": "consistent", 114 | "singleQuote": true, 115 | "tabWidth": 2, 116 | "trailingComma": "es5", 117 | "useTabs": false 118 | } 119 | ] 120 | } 121 | }, 122 | "eslintIgnore": [ 123 | "node_modules/", 124 | "lib/" 125 | ], 126 | "prettier": { 127 | "quoteProps": "consistent", 128 | "singleQuote": true, 129 | "tabWidth": 2, 130 | "trailingComma": "es5", 131 | "useTabs": false 132 | }, 133 | "@react-native-community/bob": { 134 | "source": "src", 135 | "output": "lib", 136 | "targets": [ 137 | "commonjs", 138 | "module", 139 | "typescript" 140 | ] 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

react-native-widgetkit

2 | 3 |

4 | widgetkit 5 |

6 | 7 |
8 | React-Native Library for the iOS 🍏 WidgetKit framework 9 |
10 |
11 |
12 | widget_small 13 | widget_medium 14 | widget_small 15 |
16 |
17 | 18 | ## Table of Contents 📚 19 | 20 | - [Introduction 👨‍🏫](#introduction-) 21 | - [Installation 🖇‍](#installation-) 22 | - [Usage 👨🏻‍💻](#usage-) 23 | - [Methods 📖](#methods-) 24 | - [Contributors 🤓](#contributors-) 25 | - [License 🔖](#license-) 26 | 27 | ## Introduction 👨‍🏫 28 | 29 | This library allows you to call essential methods from the iOS "WidgetKit Framework", which are needed when developing a widget. For example updating the widget timelines 30 | 31 | 🚨 To be on the safe side: This library exposes API functionality of
WidgetKit. The widgets themselves must be developed natively in SwiftUI. 32 | 33 | ## Installation 🖇‍ 34 | 35 | ```sh 36 | npm install react-native-widgetkit 37 | ``` 38 | 39 | ## Usage 👨🏻‍💻 40 | 41 | ```js 42 | import { reloadAllTimelines } from 'react-native-widgetkit'; 43 | 44 | // ... 45 | 46 | reloadAllTimelines(); 47 | ``` 48 | 49 | ## Methods 📖‍ 50 | 51 | #### `reloadAllTimelines()` 52 | 53 | Reloads the timelines for all configured widgets belonging to the containing app. 54 | 55 | --- 56 | 57 | #### `reloadTimelines(ofKind: String)` 58 | 59 | Reloads the timelines for all widgets of a particular kind. 60 | 61 | --- 62 | 63 | #### `WidgetKit.setItem(String key, String value, String appGroup)` 64 | 65 | Writes Key-Value to UserDefaults database. 66 | 67 | --- 68 | 69 | #### `WidgetKit.getItem(String key, String appGroup)` 70 | 71 | Reads Value from UserDefaults database. 72 | 73 | --- 74 | 75 | ## [Contributors 🤓](#Contributors) 76 | 77 | | [Thomas Leiter](https://github.com/tomLadder) | | 78 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | 79 | |

[Thomas Leiter](https://github.com/tomLadder)

| 80 | 81 | ## License 🔖 82 | 83 | MIT License 84 | 85 | Copyright (c) 2020 Thomas Leiter, Fasky OG 86 | 87 | Permission is hereby granted, free of charge, to any person obtaining a copy 88 | of this software and associated documentation files (the "Software"), to deal 89 | in the Software without restriction, including without limitation the rights 90 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 91 | copies of the Software, and to permit persons to whom the Software is 92 | furnished to do so, subject to the following conditions: 93 | 94 | The above copyright notice and this permission notice shall be included in all 95 | copies or substantial portions of the Software. 96 | 97 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 98 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 100 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 101 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 102 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 103 | SOFTWARE. 104 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample.xcodeproj/xcshareddata/xcschemes/WidgetkitExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 81 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=$((i+1)) 158 | done 159 | case $i in 160 | (0) set -- ;; 161 | (1) set -- "$args0" ;; 162 | (2) set -- "$args0" "$args1" ;; 163 | (3) set -- "$args0" "$args1" "$args2" ;; 164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=$(save "$@") 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 185 | cd "$(dirname "$0")" 186 | fi 187 | 188 | exec "$JAVACMD" "$@" 189 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. 4 | 5 | ## Development workflow 6 | 7 | To get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies for each package: 8 | 9 | ```sh 10 | yarn bootstrap 11 | ``` 12 | 13 | While developing, you can run the [example app](/example/) to test your changes. 14 | 15 | To start the packager: 16 | 17 | ```sh 18 | yarn example start 19 | ``` 20 | 21 | To run the example app on Android: 22 | 23 | ```sh 24 | yarn example android 25 | ``` 26 | 27 | To run the example app on iOS: 28 | 29 | ```sh 30 | yarn example ios 31 | ``` 32 | 33 | Make sure your code passes TypeScript and ESLint. Run the following to verify: 34 | 35 | ```sh 36 | yarn typescript 37 | yarn lint 38 | ``` 39 | 40 | To fix formatting errors, run the following: 41 | 42 | ```sh 43 | yarn lint --fix 44 | ``` 45 | 46 | Remember to add tests for your change if possible. Run the unit tests by: 47 | 48 | ```sh 49 | yarn test 50 | ``` 51 | 52 | To edit the Objective-C files, open `example/ios/WidgetkitExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-widgetkit`. 53 | 54 | To edit the Kotlin files, open `example/android` in Android studio and find the source files at `reactnativewidgetkit` under `Android`. 55 | 56 | ### Commit message convention 57 | 58 | We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages: 59 | 60 | - `fix`: bug fixes, e.g. fix crash due to deprecated method. 61 | - `feat`: new features, e.g. add new method to the module. 62 | - `refactor`: code refactor, e.g. migrate from class components to hooks. 63 | - `docs`: changes into documentation, e.g. add usage example for the module.. 64 | - `test`: adding or updating tests, eg add integration tests using detox. 65 | - `chore`: tooling changes, e.g. change CI config. 66 | 67 | Our pre-commit hooks verify that your commit message matches this format when committing. 68 | 69 | ### Linting and tests 70 | 71 | [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) 72 | 73 | We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. 74 | 75 | Our pre-commit hooks verify that the linter and tests pass when committing. 76 | 77 | ### Scripts 78 | 79 | The `package.json` file contains various scripts for common tasks: 80 | 81 | - `yarn bootstrap`: setup project by installing all dependencies and pods. 82 | - `yarn typescript`: type-check files with TypeScript. 83 | - `yarn lint`: lint files with ESLint. 84 | - `yarn test`: run unit tests with Jest. 85 | - `yarn example start`: start the Metro server for the example app. 86 | - `yarn example android`: run the example app on Android. 87 | - `yarn example ios`: run the example app on iOS. 88 | 89 | ### Sending a pull request 90 | 91 | > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). 92 | 93 | When you're sending a pull request: 94 | 95 | - Prefer small pull requests focused on one change. 96 | - Verify that linters and tests are passing. 97 | - Review the documentation to make sure it looks good. 98 | - Follow the pull request template when opening a pull request. 99 | - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. 100 | 101 | ## Code of Conduct 102 | 103 | ### Our Pledge 104 | 105 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 106 | 107 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 108 | 109 | ### Our Standards 110 | 111 | Examples of behavior that contributes to a positive environment for our community include: 112 | 113 | - Demonstrating empathy and kindness toward other people 114 | - Being respectful of differing opinions, viewpoints, and experiences 115 | - Giving and gracefully accepting constructive feedback 116 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience 117 | - Focusing on what is best not just for us as individuals, but for the overall community 118 | 119 | Examples of unacceptable behavior include: 120 | 121 | - The use of sexualized language or imagery, and sexual attention or 122 | advances of any kind 123 | - Trolling, insulting or derogatory comments, and personal or political attacks 124 | - Public or private harassment 125 | - Publishing others' private information, such as a physical or email 126 | address, without their explicit permission 127 | - Other conduct which could reasonably be considered inappropriate in a 128 | professional setting 129 | 130 | ### Enforcement Responsibilities 131 | 132 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. 133 | 134 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 135 | 136 | ### Scope 137 | 138 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 139 | 140 | ### Enforcement 141 | 142 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. 143 | 144 | All community leaders are obligated to respect the privacy and security of the reporter of any incident. 145 | 146 | ### Enforcement Guidelines 147 | 148 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: 149 | 150 | #### 1. Correction 151 | 152 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. 153 | 154 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. 155 | 156 | #### 2. Warning 157 | 158 | **Community Impact**: A violation through a single incident or series of actions. 159 | 160 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. 161 | 162 | #### 3. Temporary Ban 163 | 164 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. 165 | 166 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. 167 | 168 | #### 4. Permanent Ban 169 | 170 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. 171 | 172 | **Consequence**: A permanent ban from any sort of public interaction within the community. 173 | 174 | ### Attribution 175 | 176 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, 177 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 178 | 179 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). 180 | 181 | [homepage]: https://www.contributor-covenant.org 182 | 183 | For answers to common questions about this code of conduct, see the FAQ at 184 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. 185 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format 22 | * bundleCommand: "ram-bundle", 23 | * 24 | * // whether to bundle JS and assets in debug mode 25 | * bundleInDebug: false, 26 | * 27 | * // whether to bundle JS and assets in release mode 28 | * bundleInRelease: true, 29 | * 30 | * // whether to bundle JS and assets in another build variant (if configured). 31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 32 | * // The configuration property can be in the following formats 33 | * // 'bundleIn${productFlavor}${buildType}' 34 | * // 'bundleIn${buildType}' 35 | * // bundleInFreeDebug: true, 36 | * // bundleInPaidRelease: true, 37 | * // bundleInBeta: true, 38 | * 39 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 40 | * // for WidgetkitExample: to disable dev mode in the staging build type (if configured) 41 | * devDisabledInStaging: true, 42 | * // The configuration property can be in the following formats 43 | * // 'devDisabledIn${productFlavor}${buildType}' 44 | * // 'devDisabledIn${buildType}' 45 | * 46 | * // the root of your project, i.e. where "package.json" lives 47 | * root: "../../", 48 | * 49 | * // where to put the JS bundle asset in debug mode 50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 51 | * 52 | * // where to put the JS bundle asset in release mode 53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 54 | * 55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 56 | * // require('./image.png')), in debug mode 57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 58 | * 59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 60 | * // require('./image.png')), in release mode 61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 62 | * 63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 67 | * // for WidgetkitExample, you might want to remove it from here. 68 | * inputExcludes: ["android/**", "ios/**"], 69 | * 70 | * // override which node gets called and with what additional arguments 71 | * nodeExecutableAndArgs: ["node"], 72 | * 73 | * // supply additional arguments to the packager 74 | * extraPackagerArgs: [] 75 | * ] 76 | */ 77 | 78 | project.ext.react = [ 79 | enableHermes: false, // clean and rebuild if changing 80 | ] 81 | 82 | apply from: "../../node_modules/react-native/react.gradle" 83 | 84 | /** 85 | * Set this to true to create two separate APKs instead of one: 86 | * - An APK that only works on ARM devices 87 | * - An APK that only works on x86 devices 88 | * The advantage is the size of the APK is reduced by about 4MB. 89 | * Upload all the APKs to the Play Store and people will download 90 | * the correct one based on the CPU architecture of their device. 91 | */ 92 | def enableSeparateBuildPerCPUArchitecture = false 93 | 94 | /** 95 | * Run Proguard to shrink the Java bytecode in release builds. 96 | */ 97 | def enableProguardInReleaseBuilds = false 98 | 99 | /** 100 | * The preferred build flavor of JavaScriptCore. 101 | * 102 | * For WidgetkitExample, to use the international variant, you can use: 103 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 104 | * 105 | * The international variant includes ICU i18n library and necessary data 106 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 107 | * give correct results when using with locales other than en-US. Note that 108 | * this variant is about 6MiB larger per architecture than default. 109 | */ 110 | def jscFlavor = 'org.webkit:android-jsc:+' 111 | 112 | /** 113 | * Whether to enable the Hermes VM. 114 | * 115 | * This should be set on project.ext.react and mirrored here. If it is not set 116 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 117 | * and the benefits of using Hermes will therefore be sharply reduced. 118 | */ 119 | def enableHermes = project.ext.react.get("enableHermes", false); 120 | 121 | android { 122 | compileSdkVersion rootProject.ext.compileSdkVersion 123 | 124 | compileOptions { 125 | sourceCompatibility JavaVersion.VERSION_1_8 126 | targetCompatibility JavaVersion.VERSION_1_8 127 | } 128 | 129 | defaultConfig { 130 | applicationId "com.example.reactnativewidgetkit" 131 | minSdkVersion rootProject.ext.minSdkVersion 132 | targetSdkVersion rootProject.ext.targetSdkVersion 133 | versionCode 1 134 | versionName "1.0" 135 | } 136 | splits { 137 | abi { 138 | reset() 139 | enable enableSeparateBuildPerCPUArchitecture 140 | universalApk false // If true, also generate a universal APK 141 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 142 | } 143 | } 144 | signingConfigs { 145 | debug { 146 | storeFile file('debug.keystore') 147 | storePassword 'android' 148 | keyAlias 'androiddebugkey' 149 | keyPassword 'android' 150 | } 151 | } 152 | buildTypes { 153 | debug { 154 | signingConfig signingConfigs.debug 155 | } 156 | release { 157 | // Caution! In production, you need to generate your own keystore file. 158 | // see https://facebook.github.io/react-native/docs/signed-apk-android. 159 | signingConfig signingConfigs.debug 160 | minifyEnabled enableProguardInReleaseBuilds 161 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 162 | } 163 | } 164 | // applicationVariants are e.g. debug, release 165 | applicationVariants.all { variant -> 166 | variant.outputs.each { output -> 167 | // For each separate APK per architecture, set a unique version code as described here: 168 | // https://developer.android.com/studio/build/configure-apk-splits.html 169 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 170 | def abi = output.getFilter(OutputFile.ABI) 171 | if (abi != null) { // null for the universal-debug, universal-release variants 172 | output.versionCodeOverride = 173 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 174 | } 175 | 176 | } 177 | } 178 | 179 | packagingOptions { 180 | pickFirst "lib/armeabi-v7a/libc++_shared.so" 181 | pickFirst "lib/arm64-v8a/libc++_shared.so" 182 | pickFirst "lib/x86/libc++_shared.so" 183 | pickFirst "lib/x86_64/libc++_shared.so" 184 | } 185 | } 186 | 187 | dependencies { 188 | implementation fileTree(dir: "libs", include: ["*.jar"]) 189 | //noinspection GradleDynamicVersion 190 | implementation "com.facebook.react:react-native:+" // From node_modules 191 | 192 | 193 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 194 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 195 | exclude group:'com.facebook.fbjni' 196 | } 197 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 198 | exclude group:'com.facebook.flipper' 199 | } 200 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 201 | exclude group:'com.facebook.flipper' 202 | } 203 | 204 | if (enableHermes) { 205 | def hermesPath = "../../node_modules/hermes-engine/android/"; 206 | debugImplementation files(hermesPath + "hermes-debug.aar") 207 | releaseImplementation files(hermesPath + "hermes-release.aar") 208 | } else { 209 | implementation jscFlavor 210 | } 211 | } 212 | 213 | // Run this once to be able to run the application with BUCK 214 | // puts all compile dependencies into folder libs for BUCK to use 215 | task copyDownloadableDepsToLibs(type: Copy) { 216 | from configurations.compile 217 | into 'libs' 218 | } 219 | 220 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 221 | -------------------------------------------------------------------------------- /ios/Widgetkit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 11 | 12 | F4FF95D7245B92E800C19C63 /* Widgetkit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* Widgetkit.swift */; }; 13 | 14 | 5E555C0D2413F4C50049A1A2 /* Widgetkit.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* Widgetkit.mm */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXCopyFilesBuildPhase section */ 18 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 19 | isa = PBXCopyFilesBuildPhase; 20 | buildActionMask = 2147483647; 21 | dstPath = "include/$(PRODUCT_NAME)"; 22 | dstSubfolderSpec = 16; 23 | files = ( 24 | ); 25 | runOnlyForDeploymentPostprocessing = 0; 26 | }; 27 | /* End PBXCopyFilesBuildPhase section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 134814201AA4EA6300B7C361 /* libWidgetkit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWidgetkit.a; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 32 | 33 | B3E7B5891CC2AC0600A0062D /* Widgetkit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Widgetkit.m; sourceTree = ""; }; 34 | F4FF95D5245B92E700C19C63 /* Widgetkit-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Widgetkit-Bridging-Header.h"; sourceTree = ""; }; 35 | F4FF95D6245B92E800C19C63 /* Widgetkit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Widgetkit.swift; sourceTree = ""; }; 36 | 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 134814211AA4EA7D00B7C361 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 134814201AA4EA6300B7C361 /* libWidgetkit.a */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 58B511D21A9E6C8500147676 = { 59 | isa = PBXGroup; 60 | children = ( 61 | 62 | 63 | F4FF95D6245B92E800C19C63 /* Widgetkit.swift */, 64 | B3E7B5891CC2AC0600A0062D /* Widgetkit.m */, 65 | F4FF95D5245B92E700C19C63 /* Widgetkit-Bridging-Header.h */, 66 | 67 | 134814211AA4EA7D00B7C361 /* Products */, 68 | ); 69 | sourceTree = ""; 70 | }; 71 | /* End PBXGroup section */ 72 | 73 | /* Begin PBXNativeTarget section */ 74 | 58B511DA1A9E6C8500147676 /* Widgetkit */ = { 75 | isa = PBXNativeTarget; 76 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Widgetkit" */; 77 | buildPhases = ( 78 | 58B511D71A9E6C8500147676 /* Sources */, 79 | 58B511D81A9E6C8500147676 /* Frameworks */, 80 | 58B511D91A9E6C8500147676 /* CopyFiles */, 81 | ); 82 | buildRules = ( 83 | ); 84 | dependencies = ( 85 | ); 86 | name = Widgetkit; 87 | productName = RCTDataManager; 88 | productReference = 134814201AA4EA6300B7C361 /* libWidgetkit.a */; 89 | productType = "com.apple.product-type.library.static"; 90 | }; 91 | /* End PBXNativeTarget section */ 92 | 93 | /* Begin PBXProject section */ 94 | 58B511D31A9E6C8500147676 /* Project object */ = { 95 | isa = PBXProject; 96 | attributes = { 97 | LastUpgradeCheck = 0920; 98 | ORGANIZATIONNAME = Facebook; 99 | TargetAttributes = { 100 | 58B511DA1A9E6C8500147676 = { 101 | CreatedOnToolsVersion = 6.1.1; 102 | }; 103 | }; 104 | }; 105 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Widgetkit" */; 106 | compatibilityVersion = "Xcode 3.2"; 107 | developmentRegion = English; 108 | hasScannedForEncodings = 0; 109 | knownRegions = ( 110 | English, 111 | en, 112 | ); 113 | mainGroup = 58B511D21A9E6C8500147676; 114 | productRefGroup = 58B511D21A9E6C8500147676; 115 | projectDirPath = ""; 116 | projectRoot = ""; 117 | targets = ( 118 | 58B511DA1A9E6C8500147676 /* Widgetkit */, 119 | ); 120 | }; 121 | /* End PBXProject section */ 122 | 123 | /* Begin PBXSourcesBuildPhase section */ 124 | 58B511D71A9E6C8500147676 /* Sources */ = { 125 | isa = PBXSourcesBuildPhase; 126 | buildActionMask = 2147483647; 127 | files = ( 128 | 129 | 130 | F4FF95D7245B92E800C19C63 /* Widgetkit.swift in Sources */, 131 | B3E7B58A1CC2AC0600A0062D /* Widgetkit.m in Sources */, 132 | 133 | ); 134 | runOnlyForDeploymentPostprocessing = 0; 135 | }; 136 | /* End PBXSourcesBuildPhase section */ 137 | 138 | /* Begin XCBuildConfiguration section */ 139 | 58B511ED1A9E6C8500147676 /* Debug */ = { 140 | isa = XCBuildConfiguration; 141 | buildSettings = { 142 | ALWAYS_SEARCH_USER_PATHS = NO; 143 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 144 | CLANG_CXX_LIBRARY = "libc++"; 145 | CLANG_ENABLE_MODULES = YES; 146 | CLANG_ENABLE_OBJC_ARC = YES; 147 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 148 | CLANG_WARN_BOOL_CONVERSION = YES; 149 | CLANG_WARN_COMMA = YES; 150 | CLANG_WARN_CONSTANT_CONVERSION = YES; 151 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 152 | CLANG_WARN_EMPTY_BODY = YES; 153 | CLANG_WARN_ENUM_CONVERSION = YES; 154 | CLANG_WARN_INFINITE_RECURSION = YES; 155 | CLANG_WARN_INT_CONVERSION = YES; 156 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 157 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 158 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 159 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 160 | CLANG_WARN_STRICT_PROTOTYPES = YES; 161 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 162 | CLANG_WARN_UNREACHABLE_CODE = YES; 163 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 164 | COPY_PHASE_STRIP = NO; 165 | ENABLE_STRICT_OBJC_MSGSEND = YES; 166 | ENABLE_TESTABILITY = YES; 167 | GCC_C_LANGUAGE_STANDARD = gnu99; 168 | GCC_DYNAMIC_NO_PIC = NO; 169 | GCC_NO_COMMON_BLOCKS = YES; 170 | GCC_OPTIMIZATION_LEVEL = 0; 171 | GCC_PREPROCESSOR_DEFINITIONS = ( 172 | "DEBUG=1", 173 | "$(inherited)", 174 | ); 175 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 176 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 177 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 178 | GCC_WARN_UNDECLARED_SELECTOR = YES; 179 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 180 | GCC_WARN_UNUSED_FUNCTION = YES; 181 | GCC_WARN_UNUSED_VARIABLE = YES; 182 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 183 | MTL_ENABLE_DEBUG_INFO = YES; 184 | ONLY_ACTIVE_ARCH = YES; 185 | SDKROOT = iphoneos; 186 | }; 187 | name = Debug; 188 | }; 189 | 58B511EE1A9E6C8500147676 /* Release */ = { 190 | isa = XCBuildConfiguration; 191 | buildSettings = { 192 | ALWAYS_SEARCH_USER_PATHS = NO; 193 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 194 | CLANG_CXX_LIBRARY = "libc++"; 195 | CLANG_ENABLE_MODULES = YES; 196 | CLANG_ENABLE_OBJC_ARC = YES; 197 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 198 | CLANG_WARN_BOOL_CONVERSION = YES; 199 | CLANG_WARN_COMMA = YES; 200 | CLANG_WARN_CONSTANT_CONVERSION = YES; 201 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 202 | CLANG_WARN_EMPTY_BODY = YES; 203 | CLANG_WARN_ENUM_CONVERSION = YES; 204 | CLANG_WARN_INFINITE_RECURSION = YES; 205 | CLANG_WARN_INT_CONVERSION = YES; 206 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 210 | CLANG_WARN_STRICT_PROTOTYPES = YES; 211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 212 | CLANG_WARN_UNREACHABLE_CODE = YES; 213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 214 | COPY_PHASE_STRIP = YES; 215 | ENABLE_NS_ASSERTIONS = NO; 216 | ENABLE_STRICT_OBJC_MSGSEND = YES; 217 | GCC_C_LANGUAGE_STANDARD = gnu99; 218 | GCC_NO_COMMON_BLOCKS = YES; 219 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 220 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 221 | GCC_WARN_UNDECLARED_SELECTOR = YES; 222 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 223 | GCC_WARN_UNUSED_FUNCTION = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 226 | MTL_ENABLE_DEBUG_INFO = NO; 227 | SDKROOT = iphoneos; 228 | VALIDATE_PRODUCT = YES; 229 | }; 230 | name = Release; 231 | }; 232 | 58B511F01A9E6C8500147676 /* Debug */ = { 233 | isa = XCBuildConfiguration; 234 | buildSettings = { 235 | HEADER_SEARCH_PATHS = ( 236 | "$(inherited)", 237 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 238 | "$(SRCROOT)/../../../React/**", 239 | "$(SRCROOT)/../../react-native/React/**", 240 | ); 241 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 242 | OTHER_LDFLAGS = "-ObjC"; 243 | PRODUCT_NAME = Widgetkit; 244 | SKIP_INSTALL = YES; 245 | 246 | SWIFT_OBJC_BRIDGING_HEADER = "Widgetkit-Bridging-Header.h"; 247 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 248 | SWIFT_VERSION = 5.0; 249 | 250 | }; 251 | name = Debug; 252 | }; 253 | 58B511F11A9E6C8500147676 /* Release */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | HEADER_SEARCH_PATHS = ( 257 | "$(inherited)", 258 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 259 | "$(SRCROOT)/../../../React/**", 260 | "$(SRCROOT)/../../react-native/React/**", 261 | ); 262 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 263 | OTHER_LDFLAGS = "-ObjC"; 264 | PRODUCT_NAME = Widgetkit; 265 | SKIP_INSTALL = YES; 266 | 267 | SWIFT_OBJC_BRIDGING_HEADER = "Widgetkit-Bridging-Header.h"; 268 | SWIFT_VERSION = 5.0; 269 | 270 | }; 271 | name = Release; 272 | }; 273 | /* End XCBuildConfiguration section */ 274 | 275 | /* Begin XCConfigurationList section */ 276 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Widgetkit" */ = { 277 | isa = XCConfigurationList; 278 | buildConfigurations = ( 279 | 58B511ED1A9E6C8500147676 /* Debug */, 280 | 58B511EE1A9E6C8500147676 /* Release */, 281 | ); 282 | defaultConfigurationIsVisible = 0; 283 | defaultConfigurationName = Release; 284 | }; 285 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Widgetkit" */ = { 286 | isa = XCConfigurationList; 287 | buildConfigurations = ( 288 | 58B511F01A9E6C8500147676 /* Debug */, 289 | 58B511F11A9E6C8500147676 /* Release */, 290 | ); 291 | defaultConfigurationIsVisible = 0; 292 | defaultConfigurationName = Release; 293 | }; 294 | /* End XCConfigurationList section */ 295 | }; 296 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 297 | } 298 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.4) 4 | - CocoaLibEvent (1.0.0) 5 | - DoubleConversion (1.1.6) 6 | - FBLazyVector (0.62.2) 7 | - FBReactNativeSpec (0.62.2): 8 | - Folly (= 2018.10.22.00) 9 | - RCTRequired (= 0.62.2) 10 | - RCTTypeSafety (= 0.62.2) 11 | - React-Core (= 0.62.2) 12 | - React-jsi (= 0.62.2) 13 | - ReactCommon/turbomodule/core (= 0.62.2) 14 | - Flipper (0.33.1): 15 | - Flipper-Folly (~> 2.1) 16 | - Flipper-RSocket (~> 1.0) 17 | - Flipper-DoubleConversion (1.1.7) 18 | - Flipper-Folly (2.2.0): 19 | - boost-for-react-native 20 | - CocoaLibEvent (~> 1.0) 21 | - Flipper-DoubleConversion 22 | - Flipper-Glog 23 | - OpenSSL-Universal (= 1.0.2.19) 24 | - Flipper-Glog (0.3.6) 25 | - Flipper-PeerTalk (0.0.4) 26 | - Flipper-RSocket (1.1.0): 27 | - Flipper-Folly (~> 2.2) 28 | - FlipperKit (0.33.1): 29 | - FlipperKit/Core (= 0.33.1) 30 | - FlipperKit/Core (0.33.1): 31 | - Flipper (~> 0.33.1) 32 | - FlipperKit/CppBridge 33 | - FlipperKit/FBCxxFollyDynamicConvert 34 | - FlipperKit/FBDefines 35 | - FlipperKit/FKPortForwarding 36 | - FlipperKit/CppBridge (0.33.1): 37 | - Flipper (~> 0.33.1) 38 | - FlipperKit/FBCxxFollyDynamicConvert (0.33.1): 39 | - Flipper-Folly (~> 2.1) 40 | - FlipperKit/FBDefines (0.33.1) 41 | - FlipperKit/FKPortForwarding (0.33.1): 42 | - CocoaAsyncSocket (~> 7.6) 43 | - Flipper-PeerTalk (~> 0.0.4) 44 | - FlipperKit/FlipperKitHighlightOverlay (0.33.1) 45 | - FlipperKit/FlipperKitLayoutPlugin (0.33.1): 46 | - FlipperKit/Core 47 | - FlipperKit/FlipperKitHighlightOverlay 48 | - FlipperKit/FlipperKitLayoutTextSearchable 49 | - YogaKit (~> 1.18) 50 | - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1) 51 | - FlipperKit/FlipperKitNetworkPlugin (0.33.1): 52 | - FlipperKit/Core 53 | - FlipperKit/FlipperKitReactPlugin (0.33.1): 54 | - FlipperKit/Core 55 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1): 56 | - FlipperKit/Core 57 | - FlipperKit/SKIOSNetworkPlugin (0.33.1): 58 | - FlipperKit/Core 59 | - FlipperKit/FlipperKitNetworkPlugin 60 | - Folly (2018.10.22.00): 61 | - boost-for-react-native 62 | - DoubleConversion 63 | - Folly/Default (= 2018.10.22.00) 64 | - glog 65 | - Folly/Default (2018.10.22.00): 66 | - boost-for-react-native 67 | - DoubleConversion 68 | - glog 69 | - glog (0.3.5) 70 | - OpenSSL-Universal (1.0.2.19): 71 | - OpenSSL-Universal/Static (= 1.0.2.19) 72 | - OpenSSL-Universal/Static (1.0.2.19) 73 | - RCTRequired (0.62.2) 74 | - RCTTypeSafety (0.62.2): 75 | - FBLazyVector (= 0.62.2) 76 | - Folly (= 2018.10.22.00) 77 | - RCTRequired (= 0.62.2) 78 | - React-Core (= 0.62.2) 79 | - React (0.62.2): 80 | - React-Core (= 0.62.2) 81 | - React-Core/DevSupport (= 0.62.2) 82 | - React-Core/RCTWebSocket (= 0.62.2) 83 | - React-RCTActionSheet (= 0.62.2) 84 | - React-RCTAnimation (= 0.62.2) 85 | - React-RCTBlob (= 0.62.2) 86 | - React-RCTImage (= 0.62.2) 87 | - React-RCTLinking (= 0.62.2) 88 | - React-RCTNetwork (= 0.62.2) 89 | - React-RCTSettings (= 0.62.2) 90 | - React-RCTText (= 0.62.2) 91 | - React-RCTVibration (= 0.62.2) 92 | - React-Core (0.62.2): 93 | - Folly (= 2018.10.22.00) 94 | - glog 95 | - React-Core/Default (= 0.62.2) 96 | - React-cxxreact (= 0.62.2) 97 | - React-jsi (= 0.62.2) 98 | - React-jsiexecutor (= 0.62.2) 99 | - Yoga 100 | - React-Core/CoreModulesHeaders (0.62.2): 101 | - Folly (= 2018.10.22.00) 102 | - glog 103 | - React-Core/Default 104 | - React-cxxreact (= 0.62.2) 105 | - React-jsi (= 0.62.2) 106 | - React-jsiexecutor (= 0.62.2) 107 | - Yoga 108 | - React-Core/Default (0.62.2): 109 | - Folly (= 2018.10.22.00) 110 | - glog 111 | - React-cxxreact (= 0.62.2) 112 | - React-jsi (= 0.62.2) 113 | - React-jsiexecutor (= 0.62.2) 114 | - Yoga 115 | - React-Core/DevSupport (0.62.2): 116 | - Folly (= 2018.10.22.00) 117 | - glog 118 | - React-Core/Default (= 0.62.2) 119 | - React-Core/RCTWebSocket (= 0.62.2) 120 | - React-cxxreact (= 0.62.2) 121 | - React-jsi (= 0.62.2) 122 | - React-jsiexecutor (= 0.62.2) 123 | - React-jsinspector (= 0.62.2) 124 | - Yoga 125 | - React-Core/RCTActionSheetHeaders (0.62.2): 126 | - Folly (= 2018.10.22.00) 127 | - glog 128 | - React-Core/Default 129 | - React-cxxreact (= 0.62.2) 130 | - React-jsi (= 0.62.2) 131 | - React-jsiexecutor (= 0.62.2) 132 | - Yoga 133 | - React-Core/RCTAnimationHeaders (0.62.2): 134 | - Folly (= 2018.10.22.00) 135 | - glog 136 | - React-Core/Default 137 | - React-cxxreact (= 0.62.2) 138 | - React-jsi (= 0.62.2) 139 | - React-jsiexecutor (= 0.62.2) 140 | - Yoga 141 | - React-Core/RCTBlobHeaders (0.62.2): 142 | - Folly (= 2018.10.22.00) 143 | - glog 144 | - React-Core/Default 145 | - React-cxxreact (= 0.62.2) 146 | - React-jsi (= 0.62.2) 147 | - React-jsiexecutor (= 0.62.2) 148 | - Yoga 149 | - React-Core/RCTImageHeaders (0.62.2): 150 | - Folly (= 2018.10.22.00) 151 | - glog 152 | - React-Core/Default 153 | - React-cxxreact (= 0.62.2) 154 | - React-jsi (= 0.62.2) 155 | - React-jsiexecutor (= 0.62.2) 156 | - Yoga 157 | - React-Core/RCTLinkingHeaders (0.62.2): 158 | - Folly (= 2018.10.22.00) 159 | - glog 160 | - React-Core/Default 161 | - React-cxxreact (= 0.62.2) 162 | - React-jsi (= 0.62.2) 163 | - React-jsiexecutor (= 0.62.2) 164 | - Yoga 165 | - React-Core/RCTNetworkHeaders (0.62.2): 166 | - Folly (= 2018.10.22.00) 167 | - glog 168 | - React-Core/Default 169 | - React-cxxreact (= 0.62.2) 170 | - React-jsi (= 0.62.2) 171 | - React-jsiexecutor (= 0.62.2) 172 | - Yoga 173 | - React-Core/RCTSettingsHeaders (0.62.2): 174 | - Folly (= 2018.10.22.00) 175 | - glog 176 | - React-Core/Default 177 | - React-cxxreact (= 0.62.2) 178 | - React-jsi (= 0.62.2) 179 | - React-jsiexecutor (= 0.62.2) 180 | - Yoga 181 | - React-Core/RCTTextHeaders (0.62.2): 182 | - Folly (= 2018.10.22.00) 183 | - glog 184 | - React-Core/Default 185 | - React-cxxreact (= 0.62.2) 186 | - React-jsi (= 0.62.2) 187 | - React-jsiexecutor (= 0.62.2) 188 | - Yoga 189 | - React-Core/RCTVibrationHeaders (0.62.2): 190 | - Folly (= 2018.10.22.00) 191 | - glog 192 | - React-Core/Default 193 | - React-cxxreact (= 0.62.2) 194 | - React-jsi (= 0.62.2) 195 | - React-jsiexecutor (= 0.62.2) 196 | - Yoga 197 | - React-Core/RCTWebSocket (0.62.2): 198 | - Folly (= 2018.10.22.00) 199 | - glog 200 | - React-Core/Default (= 0.62.2) 201 | - React-cxxreact (= 0.62.2) 202 | - React-jsi (= 0.62.2) 203 | - React-jsiexecutor (= 0.62.2) 204 | - Yoga 205 | - React-CoreModules (0.62.2): 206 | - FBReactNativeSpec (= 0.62.2) 207 | - Folly (= 2018.10.22.00) 208 | - RCTTypeSafety (= 0.62.2) 209 | - React-Core/CoreModulesHeaders (= 0.62.2) 210 | - React-RCTImage (= 0.62.2) 211 | - ReactCommon/turbomodule/core (= 0.62.2) 212 | - React-cxxreact (0.62.2): 213 | - boost-for-react-native (= 1.63.0) 214 | - DoubleConversion 215 | - Folly (= 2018.10.22.00) 216 | - glog 217 | - React-jsinspector (= 0.62.2) 218 | - React-jsi (0.62.2): 219 | - boost-for-react-native (= 1.63.0) 220 | - DoubleConversion 221 | - Folly (= 2018.10.22.00) 222 | - glog 223 | - React-jsi/Default (= 0.62.2) 224 | - React-jsi/Default (0.62.2): 225 | - boost-for-react-native (= 1.63.0) 226 | - DoubleConversion 227 | - Folly (= 2018.10.22.00) 228 | - glog 229 | - React-jsiexecutor (0.62.2): 230 | - DoubleConversion 231 | - Folly (= 2018.10.22.00) 232 | - glog 233 | - React-cxxreact (= 0.62.2) 234 | - React-jsi (= 0.62.2) 235 | - React-jsinspector (0.62.2) 236 | - react-native-widgetkit (1.0.0): 237 | - React 238 | - React-RCTActionSheet (0.62.2): 239 | - React-Core/RCTActionSheetHeaders (= 0.62.2) 240 | - React-RCTAnimation (0.62.2): 241 | - FBReactNativeSpec (= 0.62.2) 242 | - Folly (= 2018.10.22.00) 243 | - RCTTypeSafety (= 0.62.2) 244 | - React-Core/RCTAnimationHeaders (= 0.62.2) 245 | - ReactCommon/turbomodule/core (= 0.62.2) 246 | - React-RCTBlob (0.62.2): 247 | - FBReactNativeSpec (= 0.62.2) 248 | - Folly (= 2018.10.22.00) 249 | - React-Core/RCTBlobHeaders (= 0.62.2) 250 | - React-Core/RCTWebSocket (= 0.62.2) 251 | - React-jsi (= 0.62.2) 252 | - React-RCTNetwork (= 0.62.2) 253 | - ReactCommon/turbomodule/core (= 0.62.2) 254 | - React-RCTImage (0.62.2): 255 | - FBReactNativeSpec (= 0.62.2) 256 | - Folly (= 2018.10.22.00) 257 | - RCTTypeSafety (= 0.62.2) 258 | - React-Core/RCTImageHeaders (= 0.62.2) 259 | - React-RCTNetwork (= 0.62.2) 260 | - ReactCommon/turbomodule/core (= 0.62.2) 261 | - React-RCTLinking (0.62.2): 262 | - FBReactNativeSpec (= 0.62.2) 263 | - React-Core/RCTLinkingHeaders (= 0.62.2) 264 | - ReactCommon/turbomodule/core (= 0.62.2) 265 | - React-RCTNetwork (0.62.2): 266 | - FBReactNativeSpec (= 0.62.2) 267 | - Folly (= 2018.10.22.00) 268 | - RCTTypeSafety (= 0.62.2) 269 | - React-Core/RCTNetworkHeaders (= 0.62.2) 270 | - ReactCommon/turbomodule/core (= 0.62.2) 271 | - React-RCTSettings (0.62.2): 272 | - FBReactNativeSpec (= 0.62.2) 273 | - Folly (= 2018.10.22.00) 274 | - RCTTypeSafety (= 0.62.2) 275 | - React-Core/RCTSettingsHeaders (= 0.62.2) 276 | - ReactCommon/turbomodule/core (= 0.62.2) 277 | - React-RCTText (0.62.2): 278 | - React-Core/RCTTextHeaders (= 0.62.2) 279 | - React-RCTVibration (0.62.2): 280 | - FBReactNativeSpec (= 0.62.2) 281 | - Folly (= 2018.10.22.00) 282 | - React-Core/RCTVibrationHeaders (= 0.62.2) 283 | - ReactCommon/turbomodule/core (= 0.62.2) 284 | - ReactCommon/callinvoker (0.62.2): 285 | - DoubleConversion 286 | - Folly (= 2018.10.22.00) 287 | - glog 288 | - React-cxxreact (= 0.62.2) 289 | - ReactCommon/turbomodule/core (0.62.2): 290 | - DoubleConversion 291 | - Folly (= 2018.10.22.00) 292 | - glog 293 | - React-Core (= 0.62.2) 294 | - React-cxxreact (= 0.62.2) 295 | - React-jsi (= 0.62.2) 296 | - ReactCommon/callinvoker (= 0.62.2) 297 | - Yoga (1.14.0) 298 | - YogaKit (1.18.1): 299 | - Yoga (~> 1.14) 300 | 301 | DEPENDENCIES: 302 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 303 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 304 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 305 | - FlipperKit (~> 0.33.1) 306 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1) 307 | - FlipperKit/FlipperKitReactPlugin (~> 0.33.1) 308 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1) 309 | - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1) 310 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 311 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 312 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 313 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 314 | - React (from `../node_modules/react-native/`) 315 | - React-Core (from `../node_modules/react-native/`) 316 | - React-Core/DevSupport (from `../node_modules/react-native/`) 317 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 318 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 319 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 320 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 321 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 322 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 323 | - react-native-widgetkit (from `../..`) 324 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 325 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 326 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 327 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 328 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 329 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 330 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 331 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 332 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 333 | - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) 334 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 335 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 336 | 337 | SPEC REPOS: 338 | trunk: 339 | - boost-for-react-native 340 | - CocoaAsyncSocket 341 | - CocoaLibEvent 342 | - Flipper 343 | - Flipper-DoubleConversion 344 | - Flipper-Folly 345 | - Flipper-Glog 346 | - Flipper-PeerTalk 347 | - Flipper-RSocket 348 | - FlipperKit 349 | - OpenSSL-Universal 350 | - YogaKit 351 | 352 | EXTERNAL SOURCES: 353 | DoubleConversion: 354 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 355 | FBLazyVector: 356 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 357 | FBReactNativeSpec: 358 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 359 | Folly: 360 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 361 | glog: 362 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 363 | RCTRequired: 364 | :path: "../node_modules/react-native/Libraries/RCTRequired" 365 | RCTTypeSafety: 366 | :path: "../node_modules/react-native/Libraries/TypeSafety" 367 | React: 368 | :path: "../node_modules/react-native/" 369 | React-Core: 370 | :path: "../node_modules/react-native/" 371 | React-CoreModules: 372 | :path: "../node_modules/react-native/React/CoreModules" 373 | React-cxxreact: 374 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 375 | React-jsi: 376 | :path: "../node_modules/react-native/ReactCommon/jsi" 377 | React-jsiexecutor: 378 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 379 | React-jsinspector: 380 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 381 | react-native-widgetkit: 382 | :path: "../.." 383 | React-RCTActionSheet: 384 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 385 | React-RCTAnimation: 386 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 387 | React-RCTBlob: 388 | :path: "../node_modules/react-native/Libraries/Blob" 389 | React-RCTImage: 390 | :path: "../node_modules/react-native/Libraries/Image" 391 | React-RCTLinking: 392 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 393 | React-RCTNetwork: 394 | :path: "../node_modules/react-native/Libraries/Network" 395 | React-RCTSettings: 396 | :path: "../node_modules/react-native/Libraries/Settings" 397 | React-RCTText: 398 | :path: "../node_modules/react-native/Libraries/Text" 399 | React-RCTVibration: 400 | :path: "../node_modules/react-native/Libraries/Vibration" 401 | ReactCommon: 402 | :path: "../node_modules/react-native/ReactCommon" 403 | Yoga: 404 | :path: "../node_modules/react-native/ReactCommon/yoga" 405 | 406 | SPEC CHECKSUMS: 407 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 408 | CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 409 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f 410 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 411 | FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 412 | FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e 413 | Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 414 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 415 | Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 416 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 417 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 418 | Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 419 | FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e 420 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 421 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28 422 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 423 | RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 424 | RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce 425 | React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3 426 | React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05 427 | React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0 428 | React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103 429 | React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 430 | React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da 431 | React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 432 | react-native-widgetkit: dff01b36c7b9e37d76abe90b5b306259aea36787 433 | React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c 434 | React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0 435 | React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71 436 | React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3 437 | React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2 438 | React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44 439 | React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a 440 | React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d 441 | React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 442 | ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 443 | Yoga: 3ebccbdd559724312790e7742142d062476b698e 444 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 445 | 446 | PODFILE CHECKSUM: 31290a7089bc248dec463f2a7c2cc4ba16c05dab 447 | 448 | COCOAPODS: 1.9.3 449 | -------------------------------------------------------------------------------- /example/ios/WidgetkitExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0D1336C0461A88D01186E375 /* libPods-WidgetkitExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCEA90A70F4BEAD7E9FA28B2 /* libPods-WidgetkitExample.a */; }; 11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 20F357B024636CDF00C146DC /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F357AF24636CDF00C146DC /* File.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 20 | 13B07F961A680F5B00A75B9A /* WidgetkitExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WidgetkitExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = WidgetkitExample/AppDelegate.h; sourceTree = ""; }; 22 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = WidgetkitExample/AppDelegate.m; sourceTree = ""; }; 23 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 24 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = WidgetkitExample/Images.xcassets; sourceTree = ""; }; 25 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = WidgetkitExample/Info.plist; sourceTree = ""; }; 26 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = WidgetkitExample/main.m; sourceTree = ""; }; 27 | 20F357AD24636CDE00C146DC /* WidgetkitExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WidgetkitExample-Bridging-Header.h"; sourceTree = ""; }; 28 | 20F357AE24636CDF00C146DC /* WidgetkitExample-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WidgetkitExample-Bridging-Header.h"; sourceTree = ""; }; 29 | 20F357AF24636CDF00C146DC /* File.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; 30 | 4D7192F03A36A017E887435B /* Pods-WidgetkitExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WidgetkitExample.release.xcconfig"; path = "Target Support Files/Pods-WidgetkitExample/Pods-WidgetkitExample.release.xcconfig"; sourceTree = ""; }; 31 | 871719007ECC5EAD276C345C /* Pods-WidgetkitExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WidgetkitExample.debug.xcconfig"; path = "Target Support Files/Pods-WidgetkitExample/Pods-WidgetkitExample.debug.xcconfig"; sourceTree = ""; }; 32 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-WidgetkitExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WidgetkitExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 34 | F9965FB925505F790045584D /* WidgetkitExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = WidgetkitExample.entitlements; path = WidgetkitExample/WidgetkitExample.entitlements; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | 0D1336C0461A88D01186E375 /* libPods-WidgetkitExample.a in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 13B07FAE1A68108700A75B9A /* WidgetkitExample */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | F9965FB925505F790045584D /* WidgetkitExample.entitlements */, 53 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 54 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 55 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 56 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 57 | 13B07FB61A68108700A75B9A /* Info.plist */, 58 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 59 | 13B07FB71A68108700A75B9A /* main.m */, 60 | ); 61 | name = WidgetkitExample; 62 | sourceTree = ""; 63 | }; 64 | 1CFFDEF7170271C97B8B7E5A /* Pods */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 871719007ECC5EAD276C345C /* Pods-WidgetkitExample.debug.xcconfig */, 68 | 4D7192F03A36A017E887435B /* Pods-WidgetkitExample.release.xcconfig */, 69 | ); 70 | path = Pods; 71 | sourceTree = ""; 72 | }; 73 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 77 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-WidgetkitExample.a */, 78 | ); 79 | name = Frameworks; 80 | sourceTree = ""; 81 | }; 82 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | ); 86 | name = Libraries; 87 | sourceTree = ""; 88 | }; 89 | 83CBB9F61A601CBA00E9B192 = { 90 | isa = PBXGroup; 91 | children = ( 92 | 20F357AF24636CDF00C146DC /* File.swift */, 93 | 20F357AE24636CDF00C146DC /* WidgetkitExample-Bridging-Header.h */, 94 | 13B07FAE1A68108700A75B9A /* WidgetkitExample */, 95 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 96 | 83CBBA001A601CBA00E9B192 /* Products */, 97 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 98 | 1CFFDEF7170271C97B8B7E5A /* Pods */, 99 | 20F357AD24636CDE00C146DC /* WidgetkitExample-Bridging-Header.h */, 100 | ); 101 | indentWidth = 2; 102 | sourceTree = ""; 103 | tabWidth = 2; 104 | usesTabs = 0; 105 | }; 106 | 83CBBA001A601CBA00E9B192 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 13B07F961A680F5B00A75B9A /* WidgetkitExample.app */, 110 | ); 111 | name = Products; 112 | sourceTree = ""; 113 | }; 114 | /* End PBXGroup section */ 115 | 116 | /* Begin PBXNativeTarget section */ 117 | 13B07F861A680F5B00A75B9A /* WidgetkitExample */ = { 118 | isa = PBXNativeTarget; 119 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WidgetkitExample" */; 120 | buildPhases = ( 121 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */, 122 | FD10A7F022414F080027D42C /* Start Packager */, 123 | 13B07F871A680F5B00A75B9A /* Sources */, 124 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 125 | 13B07F8E1A680F5B00A75B9A /* Resources */, 126 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 127 | ); 128 | buildRules = ( 129 | ); 130 | dependencies = ( 131 | ); 132 | name = WidgetkitExample; 133 | productName = WidgetkitExample; 134 | productReference = 13B07F961A680F5B00A75B9A /* WidgetkitExample.app */; 135 | productType = "com.apple.product-type.application"; 136 | }; 137 | /* End PBXNativeTarget section */ 138 | 139 | /* Begin PBXProject section */ 140 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 141 | isa = PBXProject; 142 | attributes = { 143 | LastUpgradeCheck = 0940; 144 | ORGANIZATIONNAME = Facebook; 145 | TargetAttributes = { 146 | 13B07F861A680F5B00A75B9A = { 147 | DevelopmentTeam = 6Y598VS9AZ; 148 | LastSwiftMigration = 1110; 149 | }; 150 | }; 151 | }; 152 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WidgetkitExample" */; 153 | compatibilityVersion = "Xcode 3.2"; 154 | developmentRegion = English; 155 | hasScannedForEncodings = 0; 156 | knownRegions = ( 157 | English, 158 | en, 159 | Base, 160 | ); 161 | mainGroup = 83CBB9F61A601CBA00E9B192; 162 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 163 | projectDirPath = ""; 164 | projectRoot = ""; 165 | targets = ( 166 | 13B07F861A680F5B00A75B9A /* WidgetkitExample */, 167 | ); 168 | }; 169 | /* End PBXProject section */ 170 | 171 | /* Begin PBXResourcesBuildPhase section */ 172 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 173 | isa = PBXResourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 177 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | }; 181 | /* End PBXResourcesBuildPhase section */ 182 | 183 | /* Begin PBXShellScriptBuildPhase section */ 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputPaths = ( 190 | ); 191 | name = "Bundle React Native code and images"; 192 | outputPaths = ( 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | shellPath = /bin/sh; 196 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 197 | }; 198 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */ = { 199 | isa = PBXShellScriptBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | inputFileListPaths = ( 204 | ); 205 | inputPaths = ( 206 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 207 | "${PODS_ROOT}/Manifest.lock", 208 | ); 209 | name = "[CP] Check Pods Manifest.lock"; 210 | outputFileListPaths = ( 211 | ); 212 | outputPaths = ( 213 | "$(DERIVED_FILE_DIR)/Pods-WidgetkitExample-checkManifestLockResult.txt", 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | shellPath = /bin/sh; 217 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 218 | showEnvVarsInLog = 0; 219 | }; 220 | FD10A7F022414F080027D42C /* Start Packager */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputFileListPaths = ( 226 | ); 227 | inputPaths = ( 228 | ); 229 | name = "Start Packager"; 230 | outputFileListPaths = ( 231 | ); 232 | outputPaths = ( 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | shellPath = /bin/sh; 236 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 237 | showEnvVarsInLog = 0; 238 | }; 239 | /* End PBXShellScriptBuildPhase section */ 240 | 241 | /* Begin PBXSourcesBuildPhase section */ 242 | 13B07F871A680F5B00A75B9A /* Sources */ = { 243 | isa = PBXSourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 247 | 20F357B024636CDF00C146DC /* File.swift in Sources */, 248 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXSourcesBuildPhase section */ 253 | 254 | /* Begin PBXVariantGroup section */ 255 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 13B07FB21A68108700A75B9A /* Base */, 259 | ); 260 | name = LaunchScreen.xib; 261 | path = WidgetkitExample; 262 | sourceTree = ""; 263 | }; 264 | /* End PBXVariantGroup section */ 265 | 266 | /* Begin XCBuildConfiguration section */ 267 | 13B07F941A680F5B00A75B9A /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | baseConfigurationReference = 871719007ECC5EAD276C345C /* Pods-WidgetkitExample.debug.xcconfig */; 270 | buildSettings = { 271 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 272 | CLANG_ENABLE_MODULES = YES; 273 | CODE_SIGN_ENTITLEMENTS = WidgetkitExample/WidgetkitExample.entitlements; 274 | CURRENT_PROJECT_VERSION = 1; 275 | DEAD_CODE_STRIPPING = NO; 276 | DEVELOPMENT_TEAM = 6Y598VS9AZ; 277 | INFOPLIST_FILE = WidgetkitExample/Info.plist; 278 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 279 | OTHER_CFLAGS = ( 280 | "$(inherited)", 281 | "-DFB_SONARKIT_ENABLED=1", 282 | ); 283 | OTHER_LDFLAGS = ( 284 | "$(inherited)", 285 | "-ObjC", 286 | "-lc++", 287 | ); 288 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.WidgetkitExample.$(PRODUCT_NAME:rfc1034identifier)"; 289 | PRODUCT_NAME = WidgetkitExample; 290 | SWIFT_OBJC_BRIDGING_HEADER = "WidgetkitExample-Bridging-Header.h"; 291 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 292 | SWIFT_VERSION = 5.0; 293 | VERSIONING_SYSTEM = "apple-generic"; 294 | }; 295 | name = Debug; 296 | }; 297 | 13B07F951A680F5B00A75B9A /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | baseConfigurationReference = 4D7192F03A36A017E887435B /* Pods-WidgetkitExample.release.xcconfig */; 300 | buildSettings = { 301 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 302 | CLANG_ENABLE_MODULES = YES; 303 | CODE_SIGN_ENTITLEMENTS = WidgetkitExample/WidgetkitExample.entitlements; 304 | CURRENT_PROJECT_VERSION = 1; 305 | INFOPLIST_FILE = WidgetkitExample/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | OTHER_CFLAGS = ( 308 | "$(inherited)", 309 | "-DFB_SONARKIT_ENABLED=1", 310 | ); 311 | OTHER_LDFLAGS = ( 312 | "$(inherited)", 313 | "-ObjC", 314 | "-lc++", 315 | ); 316 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.WidgetkitExample.$(PRODUCT_NAME:rfc1034identifier)"; 317 | PRODUCT_NAME = WidgetkitExample; 318 | SWIFT_OBJC_BRIDGING_HEADER = "WidgetkitExample-Bridging-Header.h"; 319 | SWIFT_VERSION = 5.0; 320 | VERSIONING_SYSTEM = "apple-generic"; 321 | }; 322 | name = Release; 323 | }; 324 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | buildSettings = { 327 | ALWAYS_SEARCH_USER_PATHS = NO; 328 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 329 | CLANG_CXX_LIBRARY = "libc++"; 330 | CLANG_ENABLE_MODULES = YES; 331 | CLANG_ENABLE_OBJC_ARC = YES; 332 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_COMMA = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 344 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 346 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 347 | CLANG_WARN_STRICT_PROTOTYPES = YES; 348 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 352 | COPY_PHASE_STRIP = NO; 353 | ENABLE_STRICT_OBJC_MSGSEND = YES; 354 | ENABLE_TESTABILITY = YES; 355 | GCC_C_LANGUAGE_STANDARD = gnu99; 356 | GCC_DYNAMIC_NO_PIC = NO; 357 | GCC_NO_COMMON_BLOCKS = YES; 358 | GCC_OPTIMIZATION_LEVEL = 0; 359 | GCC_PREPROCESSOR_DEFINITIONS = ( 360 | "DEBUG=1", 361 | "$(inherited)", 362 | ); 363 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 364 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 365 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 366 | GCC_WARN_UNDECLARED_SELECTOR = YES; 367 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 368 | GCC_WARN_UNUSED_FUNCTION = YES; 369 | GCC_WARN_UNUSED_VARIABLE = YES; 370 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 371 | MTL_ENABLE_DEBUG_INFO = YES; 372 | ONLY_ACTIVE_ARCH = YES; 373 | SDKROOT = iphoneos; 374 | }; 375 | name = Debug; 376 | }; 377 | 83CBBA211A601CBA00E9B192 /* Release */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = YES; 406 | ENABLE_NS_ASSERTIONS = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu99; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 417 | MTL_ENABLE_DEBUG_INFO = NO; 418 | SDKROOT = iphoneos; 419 | VALIDATE_PRODUCT = YES; 420 | }; 421 | name = Release; 422 | }; 423 | /* End XCBuildConfiguration section */ 424 | 425 | /* Begin XCConfigurationList section */ 426 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WidgetkitExample" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | 13B07F941A680F5B00A75B9A /* Debug */, 430 | 13B07F951A680F5B00A75B9A /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WidgetkitExample" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | 83CBBA201A601CBA00E9B192 /* Debug */, 439 | 83CBBA211A601CBA00E9B192 /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | /* End XCConfigurationList section */ 445 | }; 446 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 447 | } 448 | --------------------------------------------------------------------------------