Browse Source

FEATURE | Onesignal

merge-requests/243/merge
Vitalik 3 years ago
parent
commit
55cba90c08
  1. 10
      android/app/build.gradle
  2. 13
      ios/OneSignalNotificationServiceExtension/Info.plist
  3. 43
      ios/OneSignalNotificationServiceExtension/NotificationService.swift
  4. 10
      ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements
  5. 4
      ios/Podfile
  6. 23
      ios/Podfile.lock
  7. 226
      ios/taskme.xcodeproj/project.pbxproj
  8. 4
      ios/taskme/Info.plist
  9. 12
      ios/taskme/taskme.entitlements
  10. 2
      src/config/index.ts

10
android/app/build.gradle

@ -1,3 +1,13 @@ @@ -1,3 +1,13 @@
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"
import com.android.build.OutputFile

13
ios/OneSignalNotificationServiceExtension/Info.plist

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.usernotifications.service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
</dict>
</plist>

43
ios/OneSignalNotificationServiceExtension/NotificationService.swift

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
import UserNotifications
import OneSignal
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)?
var receivedRequest: UNNotificationRequest!
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.receivedRequest = request
self.contentHandler = contentHandler
self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
if let bestAttemptContent = bestAttemptContent {
//If your SDK version is < 3.5.0 uncomment and use this code:
/*
OneSignal.didReceiveNotificationExtensionRequest(self.receivedRequest, with: self.bestAttemptContent)
contentHandler(bestAttemptContent)
*/
/* DEBUGGING: Uncomment the 2 lines below to check this extension is excuting
Note, this extension only runs when mutable-content is set
Setting an attachment or action buttons automatically adds this */
//OneSignal.setLogLevel(.LL_VERBOSE, visualLevel: .LL_NONE)
//bestAttemptContent.body = "[Modified] " + bestAttemptContent.body
OneSignal.didReceiveNotificationExtensionRequest(self.receivedRequest, with: bestAttemptContent, withContentHandler: self.contentHandler)
}
}
override func serviceExtensionTimeWillExpire() {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
OneSignal.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent)
contentHandler(bestAttemptContent)
}
}
}

10
ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.app.taskme.onesignal</string>
</array>
</dict>
</plist>

4
ios/Podfile

@ -32,4 +32,8 @@ target 'taskme' do @@ -32,4 +32,8 @@ target 'taskme' do
post_install do |installer|
react_native_post_install(installer)
end
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end

23
ios/Podfile.lock

@ -395,6 +395,7 @@ DEPENDENCIES: @@ -395,6 +395,7 @@ DEPENDENCIES:
- FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.75.1)
- FlipperKit/SKIOSNetworkPlugin (~> 0.75.1)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- OneSignalXCFramework (< 4.0, >= 3.0)
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
- Permission-PhotoLibrary (from `../node_modules/react-native-permissions/ios/PhotoLibrary`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
@ -574,8 +575,8 @@ SPEC CHECKSUMS: @@ -574,8 +575,8 @@ SPEC CHECKSUMS:
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OneSignalXCFramework: 10648e60ff3d335fbffa62d9b44b700b56d49b51
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
Permission-Camera: 53efcbb755b0e8bdf253dbb27cc7559ccfce8480
Permission-PhotoLibrary: 7bec836dcdd04a0bfb200c314f1aae06d4476357
Permission-Camera: 9eb618fd601ae4a674b072c3b0d37f109d7b91e5
Permission-PhotoLibrary: 900e7e33012bd5e02e5859cb65d5bb2134259c64
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
RCTRequired: d34bf57e17cb6e3b2681f4809b13843c021feb6c
RCTTypeSafety: 8dab4933124ed39bb0c1d88d74d61b1eb950f28f
@ -589,12 +590,12 @@ SPEC CHECKSUMS: @@ -589,12 +590,12 @@ SPEC CHECKSUMS:
React-jsinspector: 34e23860273a23695342f58eed3ffd3ba10c31e0
react-native-clear-cache: 28bce59b33cd809e0afe903786787b4409d1c1fb
react-native-date-picker: 201b481c94dcb7678f4712477ad026dd7793305b
react-native-image-picker: 5fe0a96bef4935bbdfb02f59b910bf40d5526109
react-native-netinfo: 3d3769f0d65de15c83a9bf1346f8be71de5a24bf
react-native-onesignal: 6ce91b6cb91e6e2b9caf051da82a27573bf9950c
react-native-image-picker: 27c3726557dac6e224a17c564c16cdc7fb952f79
react-native-netinfo: 877946c7b4eb85a639cf1ea31333dadc2be999a1
react-native-onesignal: 9afcdc24aa4557ed58a92803695382b0fe8ea6e7
react-native-orientation-locker: 998c0744e26624407dac068c04c605b4af7304a2
react-native-pager-view: 5ab4d0b4b44d89f77310cb3eb8129745f274ce55
react-native-safe-area-context: 61c8c484a3a9e7d1fda19f7b1794b35bbfd2262a
react-native-pager-view: f21658a2e12eced35ef998250375e4e4dc9b8487
react-native-safe-area-context: 8465df05de8106c584b117f0e027e17174d6e02e
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
React-perflogger: cc76a4254d19640f1d8ad1c66fdee800414b805c
React-RCTActionSheet: 7448f049318d8d7e8a9a1ebb742ada721757eea8
@ -608,12 +609,12 @@ SPEC CHECKSUMS: @@ -608,12 +609,12 @@ SPEC CHECKSUMS:
React-RCTVibration: c7f845861e79eae13dc1e8217a3cf47a3945b504
React-runtimeexecutor: 493d9abb8b23c3f84e19ae221eeba92cadcb70dc
ReactCommon: 8fea6422328e2fc093e25c9fac67adbcf0f04fb4
RNCAsyncStorage: e8b8d6320a0dd90eb610fb0d0b1ef90596697c69
RNCAsyncStorage: 0f655864a81214d1c5a9bf0faf79d86dc25c383e
RNCPicker: c3a3d481bec16624ed84a3c2a64c92fdc5515960
RNDeviceInfo: cc7de0772378f85d8f36ae439df20f05c590a651
RNDeviceInfo: 0d6865ab0a57d9192bdd4e4f5894340b846c3e53
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNImageCropPicker: 448d3c6e923fde3466b49caf3c2457c2a0ba02dd
RNPermissions: f7ebe52db07c00901127966ca080b4ec6a6ceb0a
RNPermissions: bf844d392fe0ecbfbd2e4ae2b88cc32f2f09b369
RNScreens: eb0dfb2d6b21d2d7f980ad46b14eb306d2f1062e
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
RNVectorIcons: f67a1abce2ec73e62fe4606e8110e95a832bc859
@ -621,6 +622,6 @@ SPEC CHECKSUMS: @@ -621,6 +622,6 @@ SPEC CHECKSUMS:
Yoga: e6ecf3fa25af9d4c87e94ad7d5d292eedef49749
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: 7c42e987d85f19fed87d9ce656708219fc97fe5b
PODFILE CHECKSUM: d92287ff4df6fff12c9f32920743c98adf1a8cc4
COCOAPODS: 1.11.2

226
ios/taskme.xcodeproj/project.pbxproj

@ -8,10 +8,13 @@ @@ -8,10 +8,13 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* taskmeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* taskmeTests.m */; };
0480F72527CBC3D10039631F /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480F72427CBC3D10039631F /* NotificationService.swift */; };
0480F72927CBC3D10039631F /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0480F72227CBC3D10039631F /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1CEA5DFB26FCA6F700BCC3E1 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CEA5DFA26FCA6F700BCC3E1 /* File.swift */; };
25321B5332534E8693CE2AF8 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D5E5089D6CF4EA5DAFD08BCB /* libPods-OneSignalNotificationServiceExtension.a */; };
2987B7362760E7DD00D6426B /* Gilroy-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7322760E7DD00D6426B /* Gilroy-Bold.ttf */; };
2987B7372760E7DD00D6426B /* Gilroy-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7332760E7DD00D6426B /* Gilroy-Regular.ttf */; };
2987B7382760E7DD00D6426B /* Gilroy-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2987B7342760E7DD00D6426B /* Gilroy-Medium.ttf */; };
@ -30,13 +33,39 @@ @@ -30,13 +33,39 @@
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
remoteInfo = taskme;
};
0480F72727CBC3D10039631F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 0480F72127CBC3D10039631F;
remoteInfo = OneSignalNotificationServiceExtension;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
0480F72D27CBC3D10039631F /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
0480F72927CBC3D10039631F /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
00E356EE1AD99517003FC87E /* taskmeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = taskmeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* taskmeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = taskmeTests.m; sourceTree = "<group>"; };
04340E26B5C146E0AAF5497A /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = "<group>"; };
0480F71D27CBC33D0039631F /* taskme.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = taskme.entitlements; path = taskme/taskme.entitlements; sourceTree = "<group>"; };
0480F72227CBC3D10039631F /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
0480F72427CBC3D10039631F /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
0480F72627CBC3D10039631F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0480F72E27CBC7F40039631F /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = "<group>"; };
09BC907B22E441F782060EE9 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; };
0B6C30F16A8285D307DEBF8A /* libPods-taskme.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-taskme.a"; sourceTree = BUILT_PRODUCTS_DIR; };
12097C29CBAD4DEF9D3817A9 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; };
@ -55,11 +84,13 @@ @@ -55,11 +84,13 @@
2987B7342760E7DD00D6426B /* Gilroy-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Medium.ttf"; path = "../src/assets/fonts/Gilroy-Medium.ttf"; sourceTree = "<group>"; };
2987B7352760E7DD00D6426B /* Gilroy-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Gilroy-Semibold.ttf"; path = "../src/assets/fonts/Gilroy-Semibold.ttf"; sourceTree = "<group>"; };
3E0132E085B040ECBA70742C /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
4070472CED15651D5ED4210B /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.release.xcconfig"; sourceTree = "<group>"; };
5244945C26B7EA27006A5FAB /* fontello.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = fontello.ttf; path = ../src/assets/fonts/fontello.ttf; sourceTree = "<group>"; };
5F7AB8195E5548089203A788 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = "<group>"; };
60559287623ADE493014FD74 /* libPods-taskme-taskmeTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-taskme-taskmeTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
60AB903BA8B3443CB0797A7E /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
6268C41675EF4A2BB24E4DDE /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
691ECB8AB86EEC4FC6C34A28 /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = taskme/LaunchScreen.storyboard; sourceTree = "<group>"; };
918F5914B4544E6F9A0FB6C4 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
92EBD92F95DB8FB77D652210 /* Pods-taskme.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-taskme.release.xcconfig"; path = "Target Support Files/Pods-taskme/Pods-taskme.release.xcconfig"; sourceTree = "<group>"; };
@ -69,6 +100,7 @@ @@ -69,6 +100,7 @@
B7C72778F15CB549ACBD7D0D /* Pods-taskme-taskmeTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-taskme-taskmeTests.debug.xcconfig"; path = "Target Support Files/Pods-taskme-taskmeTests/Pods-taskme-taskmeTests.debug.xcconfig"; sourceTree = "<group>"; };
CA195349B72A48B4A46E3330 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; };
CDDE2FAA031C2C2D42B6673D /* Pods-taskme-taskmeTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-taskme-taskmeTests.release.xcconfig"; path = "Target Support Files/Pods-taskme-taskmeTests/Pods-taskme-taskmeTests.release.xcconfig"; sourceTree = "<group>"; };
D5E5089D6CF4EA5DAFD08BCB /* libPods-OneSignalNotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OneSignalNotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DE06A1D2EC694C6CAB3459FA /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = "<group>"; };
E3A1F8EB6AEC40E899F663AD /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@ -84,6 +116,14 @@ @@ -84,6 +116,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0480F71F27CBC3D10039631F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
25321B5332534E8693CE2AF8 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -112,9 +152,20 @@ @@ -112,9 +152,20 @@
name = "Supporting Files";
sourceTree = "<group>";
};
0480F72327CBC3D10039631F /* OneSignalNotificationServiceExtension */ = {
isa = PBXGroup;
children = (
0480F72E27CBC7F40039631F /* OneSignalNotificationServiceExtension.entitlements */,
0480F72427CBC3D10039631F /* NotificationService.swift */,
0480F72627CBC3D10039631F /* Info.plist */,
);
path = OneSignalNotificationServiceExtension;
sourceTree = "<group>";
};
13B07FAE1A68108700A75B9A /* taskme */ = {
isa = PBXGroup;
children = (
0480F71D27CBC33D0039631F /* taskme.entitlements */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
@ -133,6 +184,7 @@ @@ -133,6 +184,7 @@
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
0B6C30F16A8285D307DEBF8A /* libPods-taskme.a */,
60559287623ADE493014FD74 /* libPods-taskme-taskmeTests.a */,
D5E5089D6CF4EA5DAFD08BCB /* libPods-OneSignalNotificationServiceExtension.a */,
);
name = Frameworks;
sourceTree = "<group>";
@ -155,6 +207,7 @@ @@ -155,6 +207,7 @@
13B07FAE1A68108700A75B9A /* taskme */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* taskmeTests */,
0480F72327CBC3D10039631F /* OneSignalNotificationServiceExtension */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
B362F9321C4BC54C6EBF6F61 /* Pods */,
@ -170,6 +223,7 @@ @@ -170,6 +223,7 @@
children = (
13B07F961A680F5B00A75B9A /* taskme.app */,
00E356EE1AD99517003FC87E /* taskmeTests.xctest */,
0480F72227CBC3D10039631F /* OneSignalNotificationServiceExtension.appex */,
);
name = Products;
sourceTree = "<group>";
@ -204,6 +258,8 @@ @@ -204,6 +258,8 @@
92EBD92F95DB8FB77D652210 /* Pods-taskme.release.xcconfig */,
B7C72778F15CB549ACBD7D0D /* Pods-taskme-taskmeTests.debug.xcconfig */,
CDDE2FAA031C2C2D42B6673D /* Pods-taskme-taskmeTests.release.xcconfig */,
691ECB8AB86EEC4FC6C34A28 /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */,
4070472CED15651D5ED4210B /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@ -232,6 +288,24 @@ @@ -232,6 +288,24 @@
productReference = 00E356EE1AD99517003FC87E /* taskmeTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
0480F72127CBC3D10039631F /* OneSignalNotificationServiceExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0480F72A27CBC3D10039631F /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */;
buildPhases = (
A9D617ECA925411D4EDCF768 /* [CP] Check Pods Manifest.lock */,
0480F71E27CBC3D10039631F /* Sources */,
0480F71F27CBC3D10039631F /* Frameworks */,
0480F72027CBC3D10039631F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = OneSignalNotificationServiceExtension;
productName = OneSignalNotificationServiceExtension;
productReference = 0480F72227CBC3D10039631F /* OneSignalNotificationServiceExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
13B07F861A680F5B00A75B9A /* taskme */ = {
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "taskme" */;
@ -244,10 +318,12 @@ @@ -244,10 +318,12 @@
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
05B6B7099CE8F919BEB18E0C /* [CP] Copy Pods Resources */,
41D2B570847BDD4DB7D87AE0 /* [CP] Embed Pods Frameworks */,
0480F72D27CBC3D10039631F /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
0480F72827CBC3D10039631F /* PBXTargetDependency */,
);
name = taskme;
productName = taskme;
@ -263,12 +339,16 @@ @@ -263,12 +339,16 @@
KnownAssetTags = (
New,
);
LastSwiftUpdateCheck = 1320;
LastUpgradeCheck = 1210;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
0480F72127CBC3D10039631F = {
CreatedOnToolsVersion = 13.2.1;
};
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1300;
};
@ -289,6 +369,7 @@ @@ -289,6 +369,7 @@
targets = (
13B07F861A680F5B00A75B9A /* taskme */,
00E356ED1AD99517003FC87E /* taskmeTests */,
0480F72127CBC3D10039631F /* OneSignalNotificationServiceExtension */,
);
};
/* End PBXProject section */
@ -301,6 +382,13 @@ @@ -301,6 +382,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0480F72027CBC3D10039631F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F8E1A680F5B00A75B9A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -383,6 +471,28 @@ @@ -383,6 +471,28 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-taskme-taskmeTests/Pods-taskme-taskmeTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A9D617ECA925411D4EDCF768 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-OneSignalNotificationServiceExtension-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
showEnvVarsInLog = 0;
};
BB0C9D47B84365A5F6D3E24E /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -474,6 +584,14 @@ @@ -474,6 +584,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0480F71E27CBC3D10039631F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0480F72527CBC3D10039631F /* NotificationService.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
13B07F871A680F5B00A75B9A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -492,6 +610,11 @@ @@ -492,6 +610,11 @@
target = 13B07F861A680F5B00A75B9A /* taskme */;
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
};
0480F72827CBC3D10039631F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 0480F72127CBC3D10039631F /* OneSignalNotificationServiceExtension */;
targetProxy = 0480F72727CBC3D10039631F /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@ -548,15 +671,99 @@ @@ -548,15 +671,99 @@
};
name = Release;
};
0480F72B27CBC3D10039631F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 691ECB8AB86EEC4FC6C34A28 /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = HQ3J3TDPR2;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.app.taskme.OneSignalNotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
0480F72C27CBC3D10039631F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4070472CED15651D5ED4210B /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = HQ3J3TDPR2;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.app.taskme.OneSignalNotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B002D5091A4F6A4B981CD628 /* Pods-taskme.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = taskme/taskme.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = HQ3J3TDPR2;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
@ -588,11 +795,13 @@ @@ -588,11 +795,13 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 92EBD92F95DB8FB77D652210 /* Pods-taskme.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = taskme/taskme.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 47;
DEVELOPMENT_TEAM = HQ3J3TDPR2;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
@ -653,7 +862,7 @@ @@ -653,7 +862,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -718,7 +927,7 @@ @@ -718,7 +927,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -755,6 +964,15 @@ @@ -755,6 +964,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0480F72A27CBC3D10039631F /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0480F72B27CBC3D10039631F /* Debug */,
0480F72C27CBC3D10039631F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "taskme" */ = {
isa = XCConfigurationList;
buildConfigurations = (

4
ios/taskme/Info.plist

@ -67,6 +67,10 @@ @@ -67,6 +67,10 @@
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>

12
ios/taskme/taskme.entitlements

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.app.taskme.onesignal</string>
</array>
</dict>
</plist>

2
src/config/index.ts

@ -7,7 +7,7 @@ export const dynamicConfig = { @@ -7,7 +7,7 @@ export const dynamicConfig = {
// socketUrl: 'http://localhost:3000',
baseUrl: 'http://185.69.154.136:5000/app/',
socketUrl: 'http://185.69.154.136:5000',
oneSignalKey: 'ae1524a2-a4b5-4640-9f35-efa8f2cc2c78'
oneSignalKey: '8b9066f5-8c3f-49f7-bef4-c5ab621f9d27',
}
// /**

Loading…
Cancel
Save