fastlane: Notification extension is failing to access app group shared folder
Issue Description
I have the following code in my Notification Extension which is working fine when I launch my app from Xcode:
NSLog("Trying to get group file url for \(name)")
var fileUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.mygroup")!
fileUrl.appendPathComponent(name)
NSLog("Got fileUrl for \(name) : \(fileUrl)")
However, when I pack the app with fastlane, upload it to Fabric/TestFlight and launch it from there, the second NSLog never gets executed! I can’t even do try/catch since there’s no Error thrown in this block. However, it just fails!
What I get in the device console log is the following:
default 14:28:15.477973 +0300 NotificationLocalizer DEV Trying to get group file url for badge.json
default 14:28:15.478107 +0300 SpringBoard [in.och.onecheckin-dev.NotificationLocalizer] Disallowed notification center access to service extension
default 14:28:15.556978 +0300 SpringBoard connection to plug-in <private>(AA01DEBA-9C9B-4CEC-A765-74523CD55148) lost
error 14:28:15.557089 +0300 SpringBoard [in.och.onecheckin-dev.NotificationLocalizer] Service extension connection encountered an error: sessionUUID=03F7CB82-C1AC-473D-B259-D26D49EFE5C9, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 1293" UserInfo={NSDebugDescription=connection from pid 1293}
default 14:28:15.557524 +0300 assertiond Client relinquished <BKProcessAssertion: 0x102f34cf0; "com.apple.extension.session" (extension:inf); id:…A9C1560F4187>
default 14:28:15.557561 +0300 SpringBoard connection to plug-in <private>(<private>) lost
default 14:28:15.557585 +0300 SpringBoard [in.och.onecheckin-dev] Did not mutate content for notification request, will deliver original content; notificationRequest=DE99-885B, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 1293" UserInfo={NSDebugDescription=connection from pid 1293}
Also, the notification extension itself is operational: if I comment the code accessing app group folder, everything else (changing notification content) works perfectly well!
Corresponding Fastfile content:
match(type: "development", app_identifier: ["main.id", "main.id.notification.extension"], force_for_new_devices: true)
gym(export_method: "development", scheme: "My Scheme")
Environment
✅ fastlane environment ✅
Stack
Key | Value |
---|---|
OS | 10.14.4 |
Ruby | 2.3.7 |
Bundler? | false |
Git | git version 2.20.1 (Apple Git-117) |
Installation Source | /usr/local/bin/fastlane |
Host | Mac OS X 10.14.4 (18E226) |
Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib |
OpenSSL Version | LibreSSL 2.6.5 |
Is contained | false |
Is homebrew | false |
Is installed via Fabric.app | false |
Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
Xcode Version | 10.2 |
System Locale
Variable | Value | |
---|---|---|
LANG | en_US.UTF-8 | ✅ |
LC_ALL | en_US.UTF-8 | ✅ |
LANGUAGE |
fastlane files:
`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# Uncomment the line if you want fastlane to automatically update itself
update_fastlane
default_platform(:ios)
platform :ios do
lane :beta_dev do
sh "./update_www.sh"
notes = prompt(text: "Notes: ")
match(type: "development", app_identifier: ["in.och.onecheckin-dev", "in.och.onecheckin-dev.NotificationLocalizer"], force_for_new_devices: true)
gym(export_method: "development", scheme: "OneCheckIn DEV")
crashlytics(notes: notes, emails: "dmitriikozlou@gmail.com,evger@adhoc.im,ivanov@adhoc.im,monteleone@adhoc.im,rodionov@adhoc.im", api_token: "f02fcace55628880c0d39da55e2b86e6cbd393c8", build_secret: "2b7c78b157c16f5f2e3d11d96cbc6ce8de617f5875906a4d0cd017edca40fb6e")
end
lane :beta_prod do
sh "./update_www.sh --prod"
match(type: "appstore", app_identifier: ["in.och.onecheckin", "in.och.onecheckin.NotificationLocalizer"])
gym(scheme: "OneCheckIn PROD")
upload_to_testflight(username: "monteleone@adhoc.im", skip_waiting_for_build_processing: true)
end
end
`./fastlane/Appfile`
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
fastlane gems
Gem | Version | Update-Status |
---|---|---|
fastlane | 2.119.0 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem | Version |
---|---|
did_you_mean | 1.0.0 |
slack-notifier | 2.3.2 |
rouge | 2.0.7 |
xcpretty | 0.3.0 |
terminal-notifier | 2.0.0 |
terminal-table | 1.8.0 |
multipart-post | 2.0.0 |
word_wrap | 1.0.0 |
public_suffix | 2.0.5 |
babosa | 1.0.2 |
colored | 1.2 |
highline | 1.7.10 |
commander-fastlane | 4.4.6 |
http-cookie | 1.0.3 |
faraday-cookie_jar | 0.0.6 |
mini_magick | 4.5.1 |
multi_json | 1.13.1 |
multi_xml | 0.6.0 |
rubyzip | 1.2.2 |
security | 0.1.3 |
xcpretty-travis-formatter | 1.0.0 |
bundler | 1.16.1 |
tty-spinner | 0.9.0 |
tty-cursor | 0.6.1 |
tty-screen | 0.6.5 |
faraday | 0.15.4 |
json | 2.2.0 |
io-console | 0.4.5 |
excon | 0.62.0 |
CFPropertyList | 3.0.0 |
libxml-ruby | 2.9.0 |
plist | 3.5.0 |
atomos | 0.1.3 |
claide | 1.0.2 |
colored2 | 3.1.2 |
nanaimo | 0.2.6 |
xcodeproj | 1.8.2 |
google-cloud-env | 1.0.5 |
google-cloud-core | 1.3.0 |
digest-crc | 0.4.1 |
google-cloud-storage | 1.16.0 |
jwt | 2.1.0 |
memoist | 0.16.0 |
googleauth | 0.6.7 |
unf_ext | 0.0.7.5 |
unf | 0.1.4 |
domain_name | 0.5.20180417 |
faraday_middleware | 0.13.1 |
signet | 0.11.0 |
uber | 0.1.0 |
declarative | 0.0.10 |
declarative-option | 0.1.0 |
representable | 3.0.4 |
httpclient | 2.8.3 |
google-api-client | 0.23.9 |
fastimage | 2.1.5 |
unicode-display_width | 1.5.0 |
addressable | 2.6.0 |
retriable | 3.1.2 |
mime-types | 3.2.2 |
mime-types-data | 3.2019.0331 |
os | 1.0.0 |
psych | 2.1.0.1 |
generated on: 2019-04-05
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (4 by maintainers)
@janpio ok, I updated Fastlane and verified that the issue is still there. And here’s the output:
Fastlane
Xcode: https://justpaste.it/3461v