Skip to content

Commit

Permalink
Merge pull request #19 from liplylie/v2.0.0
Browse files Browse the repository at this point in the history
Release V2.0.0
  • Loading branch information
liplylie authored Jan 22, 2022
2 parents 15667f0 + aa2e71a commit 7ab575f
Show file tree
Hide file tree
Showing 48 changed files with 6,510 additions and 1,615 deletions.
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ local.properties
buck-out/
\.buckd/
*.keystore

dist
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ Alarm clock functionality for react native ios and android built using [react-na

## Installing (React Native >= 0.60.0)

`npm install --save react-native-simple-alarm`
Under the hood this library is using react-native-push-notification, @react-native-community/async-storage, and @react-native-community/push-notification-ios. These libraries will need to be installed as well.

`npm install --save react-native-simple-alarm @react-native-community/async-storage @react-native-community/push-notification-ios react-native-push-notification moment prop-types`

or

`yarn add react-native-simple-alarm`
`yarn add react-native-simple-alarm @react-native-community/async-storage @react-native-community/push-notification-ios react-native-push-notification moment prop-types`

For `iOS` using `cocoapods`, run:

Expand All @@ -19,11 +21,11 @@ $ cd ios/ && pod install

## Installing (React Native <= 0.59.x)

`npm install --save react-native-simple-alarm`
`npm install --save react-native-simple-alarm @react-native-community/async-storage @react-native-community/push-notification-ios react-native-push-notification moment prop-types`

or

`yarn add react-native-simple-alarm`
`yarn add react-native-simple-alarm @react-native-community/async-storage @react-native-community/push-notification-ios react-native-push-notification moment prop-types`

Use `react-native link` to add the library to your project:

Expand Down
14 changes: 0 additions & 14 deletions android/README.md

This file was deleted.

149 changes: 0 additions & 149 deletions android/build.gradle

This file was deleted.

4 changes: 0 additions & 4 deletions android/src/main/AndroidManifest.xml

This file was deleted.

26 changes: 0 additions & 26 deletions android/src/main/java/com/reactlibrary/SimpleAlarmManager.java

This file was deleted.

23 changes: 0 additions & 23 deletions android/src/main/java/com/reactlibrary/SimpleAlarmPackage.java

This file was deleted.

8 changes: 8 additions & 0 deletions example/ios/File.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// File.swift
// example
//
// Created by Jordan Daniels on 1/21/22.
//

import Foundation
44 changes: 25 additions & 19 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '9.0'
platform :ios, '11.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

def add_flipper_pods!(versions = {})
Expand Down Expand Up @@ -33,17 +33,6 @@ def add_flipper_pods!(versions = {})
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end

# Post Install processing for Flipper
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end

target 'example' do
# Pods for example
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
Expand All @@ -69,7 +58,7 @@ target 'example' do
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

Expand All @@ -88,13 +77,30 @@ target 'example' do
use_native_modules!

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
add_flipper_pods!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })

# Post Install processing for Flipper
post_install do |installer|
## Fix for XCode 12.5
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(strongModule))", "RCTBridgeModuleNameForClass(Class(strongModule)))")
end

def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end

end

target 'example-tvOS' do
Expand Down
Loading

0 comments on commit 7ab575f

Please sign in to comment.