diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist index 97818e13d..4854f5059 100644 --- a/ios/App/App/Info.plist +++ b/ios/App/App/Info.plist @@ -1,6 +1,95 @@ + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Gabinete Digital + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + com.gpr.gabinetedigital.teste + CFBundleURLSchemes + + gabinetedigital + + + + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSApplicationCategoryType + + LSRequiresIPhoneOS + + NSCameraUsageDescription + This app requires access to the camera. + NSMicrophoneUsageDescription + This app does not require access to the microphone. + NSPhotoLibraryAddUsageDescription + This app requires access to the photo library. + NSPhotoLibraryUsageDescription + This app requires access to the photo library. + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + + FirebaseAppDelegateProxyEnabled + + UNUserNotificationCenterDelegate + YourApp.NotificationDelegate + UIBackgroundModes + + remote-notification + + + + + + \ No newline at end of file diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index bdb56be30..0ce3fde6c 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -65,6 +65,7 @@ export class NotificationsService { } requestPermissions() { + console.log('init notificaton permission') if (this.platform.is('mobile')) { if (!this.isPushNotificationsAvailable) { @@ -72,17 +73,22 @@ export class NotificationsService { } PushNotifications.requestPermissions().then(async (result) => { if (result.receive === 'granted') { + console.log('permission granted') // Register with Apple / Google to receive push via APNS/FCM try { - PushNotifications.register().catch((error) => { - console.log("Register device", error) + PushNotifications.register().then((value) => { + console.log("Register device", value) + this.getAndpostToken("") + }) .catch((error) => { + console.log("Register device error", error) }) - this.getAndpostToken("") + } catch (error) { console.log("Granted permission error", error) } } else { // Show some error + console.log('permission notification erro') } }); } else { diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.scss b/src/app/shared/popover/despachos-options/despachos-options.page.scss index 46754f488..b18219baf 100644 --- a/src/app/shared/popover/despachos-options/despachos-options.page.scss +++ b/src/app/shared/popover/despachos-options/despachos-options.page.scss @@ -60,5 +60,5 @@ .desk{ text-align: left; - background-color: white; + background-color: transparent; } diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss index 89b518e17..13ee31a1a 100644 --- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss +++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.scss @@ -59,5 +59,5 @@ .desk{ text-align: left; - background-color: white; + background-color: transparent; } diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index 3c491b932..9e36fc5c4 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -293,12 +293,13 @@ export class NewPublicationPage implements OnInit { console.log('load video tablet base64', content) this.filecontent = true; let fileObject = new PublicationAttachmentEntity({ - base64: content.data, + base64: 'data:video/mp4;base64,'+content.data, extension: this.removeTextBeforeSlash(element.mimeType, '/'), OriginalFileName: 'video', FileType: this.checkFileType.checkFileType( this.removeTextBeforeSlash(element.mimeType, '/')) as any }) + /* fileObject.needUpload() */ this.publicationFormMV.form.Files.push(fileObject) }) .catch((err) => console.error(err)); @@ -731,11 +732,12 @@ export class NewPublicationPage implements OnInit { data.forEach(async element => { this.filesSizeSum = this.filesSizeSum + element.size if (this.fileSizeToMB(this.filesSizeSum) <= 20) { - if(this.platform.is('ios')) - this.recordevideoIos(element.fullPath) + if(this.platform.is('ios')) { + this.recordevideoIos(element.fullPath) + } else { + this.recordVideoPc(element.fullPath) + } } else { - this.recordVideoPc(element.fullPath) - if (this.publicationFormMV.form.Files.length === 0) this.filesSizeSum = 0 @@ -776,14 +778,14 @@ console.log(stringGerada); this.filecontent = true; console.log('', content) let fileObject = new PublicationAttachmentEntity({ - base64: content.data, + base64: 'data:video/mp4;base64,'+content.data, extension: 'mp4', OriginalFileName: 'record', FileType: 'video' } ) - // fileObject.needUpload() + /* fileObject.needUpload() */ this.publicationFormMV.form.Files.push(fileObject) }) .catch((erro) => console.error('read converted video erro ', erro)); @@ -805,15 +807,27 @@ console.log(stringGerada); .then(async (content) => { this.filecontent = true; console.log('', content) - let fileObject = new PublicationAttachmentEntity({ - base64: content.data, - extension: 'mp4', - OriginalFileName: 'record', - FileType: 'video' - + let fileObject; + if(this.platform.is('desktop')) { + + fileObject = new PublicationAttachmentEntity({ + base64: content.data, + extension: 'mp4', + OriginalFileName: 'record', + FileType: 'video' + + }) + } else { + fileObject = new PublicationAttachmentEntity({ + base64: 'data:video/mp4;base64,'+content.data, + extension: 'mp4', + OriginalFileName: 'record', + FileType: 'video' + + }) } - ) - // fileObject.needUpload() + + /* fileObject.needUpload() */ this.publicationFormMV.form.Files.push(fileObject) }) .catch((err) => console.error(err)); diff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts index 9b489d57a..78d13e41f 100644 --- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts @@ -1,7 +1,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { Publication } from 'src/app/models/publication'; -import { NewPublicationPage } from 'src/app/pages/publications/new-publication/new-publication.page'; +import { NewPublicationPage } from 'src/app/shared/publication/new-publication/new-publication.page'; import { PublicationsService } from 'src/app/services/publications.service'; import { ToastService } from 'src/app/services/toast.service'; import { ThemeService } from 'src/app/services/theme.service'