Closed Bug 1147262 Opened 9 years ago Closed 9 years ago

Startup failure on simulator in Profile.swift

Categories

(Firefox for iOS :: Data Storage, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: nalexander)

References

Details

Attachments

(1 file)

Pulled latest code and built fine. Tried to launch in iPhone 5 simulator and I get a failure:

"fatal error: unexpectedly found nil while unwrapping an Optional value"

Line 13 of Profile.swift

 let url = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(ExtensionUtils.sharedContainerIdentifier())!
Summary: Startup failure on simulator → Startup failure on simulator in Profile.swift
Sounds like fallout from st3fan's fix for our extensions?
Component: General → Data Storage
Flags: needinfo?(sarentz)
OS: Mac OS X → iOS 8
Hardware: x86 → All
I can't reproduce this issue. Tried with several simulator types and on two devices. Is anyone else seeing this?
Flags: needinfo?(sarentz)
I am pretty sure now that this is happening because Mark has not setup his Mac to do device builds. That means that the provisioning profiles for org.mozilla.ios.Fennec are not present. And those profiles contain the reference to the application group.

As a fallback we can use ~/Documents if containerURLForSecurityApplicationGroupIdentifier() fails, but that has the side effect that the share extension does not work. This may be ok because that is only a situation that can happen when the app is run in the simulator. On a device, containerURLForSecurityApplicationGroupIdentifier, cannot fail. (Famous last words, but it would only fail if the app were packaged incorrectly with wrong or missing entitlements)
stefan: I think we'll land a work-around to get the simulator back for contributors, but please follow-up with a longer term bug if there's more needed.
Flags: needinfo?(sarentz)
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Comment on attachment 8585195 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/288

Works on device.
Attachment #8585195 - Flags: review?(rnewman) → review+
https://github.com/mozilla/firefox-ios/commit/e674e80b32c0817caded489213e5948a192f3c55
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Flags: needinfo?(sarentz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: