Skip to content

Commit 5cbeab1

Browse files
committed
chore(example): adding notifications access
1 parent 42c3acc commit 5cbeab1

File tree

10 files changed

+4863
-21
lines changed

10 files changed

+4863
-21
lines changed

example/ios/NotificationsUtilsExample.xcodeproj/project.pbxproj

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
5709B34CF0A7D63546082F79 /* Pods-NotificationsUtilsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsUtilsExample.release.xcconfig"; path = "Target Support Files/Pods-NotificationsUtilsExample/Pods-NotificationsUtilsExample.release.xcconfig"; sourceTree = "<group>"; };
4242
5B7EB9410499542E8C5724F5 /* Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests/Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
4343
5DCACB8F33CDC322A6C60F78 /* libPods-NotificationsUtilsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsUtilsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
44+
635F61D62912669000481753 /* NotificationsUtilsExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NotificationsUtilsExample.entitlements; path = NotificationsUtilsExample/NotificationsUtilsExample.entitlements; sourceTree = "<group>"; };
4445
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = NotificationsUtilsExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
4546
89C6BE57DB24E9ADA2F236DE /* Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.release.xcconfig"; path = "Target Support Files/Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests/Pods-NotificationsUtilsExample-NotificationsUtilsExampleTests.release.xcconfig"; sourceTree = "<group>"; };
4647
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@@ -86,6 +87,7 @@
8687
13B07FAE1A68108700A75B9A /* NotificationsUtilsExample */ = {
8788
isa = PBXGroup;
8889
children = (
90+
635F61D62912669000481753 /* NotificationsUtilsExample.entitlements */,
8991
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
9092
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
9193
13B07FB51A68108700A75B9A /* Images.xcassets */,
@@ -485,7 +487,9 @@
485487
buildSettings = {
486488
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
487489
CLANG_ENABLE_MODULES = YES;
490+
CODE_SIGN_ENTITLEMENTS = NotificationsUtilsExample/NotificationsUtilsExample.entitlements;
488491
CURRENT_PROJECT_VERSION = 1;
492+
DEVELOPMENT_TEAM = V3HN8HXZYK;
489493
ENABLE_BITCODE = NO;
490494
INFOPLIST_FILE = NotificationsUtilsExample/Info.plist;
491495
LD_RUNPATH_SEARCH_PATHS = (
@@ -497,7 +501,7 @@
497501
"-ObjC",
498502
"-lc++",
499503
);
500-
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
504+
PRODUCT_BUNDLE_IDENTIFIER = com.stringsaeed.notifications;
501505
PRODUCT_NAME = NotificationsUtilsExample;
502506
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
503507
SWIFT_VERSION = 5.0;
@@ -511,7 +515,9 @@
511515
buildSettings = {
512516
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
513517
CLANG_ENABLE_MODULES = YES;
518+
CODE_SIGN_ENTITLEMENTS = NotificationsUtilsExample/NotificationsUtilsExample.entitlements;
514519
CURRENT_PROJECT_VERSION = 1;
520+
DEVELOPMENT_TEAM = V3HN8HXZYK;
515521
INFOPLIST_FILE = NotificationsUtilsExample/Info.plist;
516522
LD_RUNPATH_SEARCH_PATHS = (
517523
"$(inherited)",
@@ -522,7 +528,7 @@
522528
"-ObjC",
523529
"-lc++",
524530
);
525-
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
531+
PRODUCT_BUNDLE_IDENTIFIER = com.stringsaeed.notifications;
526532
PRODUCT_NAME = NotificationsUtilsExample;
527533
SWIFT_VERSION = 5.0;
528534
VERSIONING_SYSTEM = "apple-generic";
@@ -562,7 +568,7 @@
562568
COPY_PHASE_STRIP = NO;
563569
ENABLE_STRICT_OBJC_MSGSEND = YES;
564570
ENABLE_TESTABILITY = YES;
565-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
571+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
566572
GCC_C_LANGUAGE_STANDARD = gnu99;
567573
GCC_DYNAMIC_NO_PIC = NO;
568574
GCC_NO_COMMON_BLOCKS = YES;
@@ -596,6 +602,7 @@
596602
"-DFOLLY_MOBILE=1",
597603
"-DFOLLY_USE_LIBCPP=1",
598604
);
605+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
599606
SDKROOT = iphoneos;
600607
};
601608
name = Debug;
@@ -633,7 +640,7 @@
633640
COPY_PHASE_STRIP = YES;
634641
ENABLE_NS_ASSERTIONS = NO;
635642
ENABLE_STRICT_OBJC_MSGSEND = YES;
636-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
643+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
637644
GCC_C_LANGUAGE_STANDARD = gnu99;
638645
GCC_NO_COMMON_BLOCKS = YES;
639646
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -659,6 +666,7 @@
659666
"-DFOLLY_MOBILE=1",
660667
"-DFOLLY_USE_LIBCPP=1",
661668
);
669+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
662670
SDKROOT = iphoneos;
663671
VALIDATE_PRODUCT = YES;
664672
};

example/ios/NotificationsUtilsExample.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

example/ios/NotificationsUtilsExample/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
</dict>
3838
<key>NSLocationWhenInUseUsageDescription</key>
3939
<string></string>
40+
<key>NSUserNotificationsUsageDescription</key>
41+
<string></string>
4042
<key>UILaunchStoryboardName</key>
4143
<string>LaunchScreen</string>
4244
<key>UIRequiredDeviceCapabilities</key>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>development</string>
7+
</dict>
8+
</plist>

example/ios/Podfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ target 'NotificationsUtilsExample' do
99

1010
# Flags change depending on the env values.
1111
flags = get_default_flags()
12+
13+
permissions_path = '../node_modules/react-native-permissions/ios'
14+
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
15+
1216

1317
use_react_native!(
1418
:path => config[:reactNativePath],

0 commit comments

Comments
 (0)