Danwakeem / enigma

iPhone keyboard that turns your texts into a encrypted message.
1 stars 0 forks source link

Crash on startup. Unwrapping optional value #47

Closed SlayterDev closed 9 years ago

SlayterDev commented 9 years ago

Dan something seems to be messing up in the core data setup. Specifically here:

lazy var applicationDocumentsDirectory: NSURL = {
        // The directory the application uses to store the Core Data store file. This code uses a directory      named "com.Danwakeem.Brace_Editor" in the application's documents Application Support directory.
        //let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains:     .UserDomainMask)
        //return urls[urls.count-1] as NSURL

    let urls = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.com.enigma")
    return urls! // <- the offending line

    }()

Not sure what the deal is

@Danwakeem

SlayterDev commented 9 years ago

Thought maybe reinstalling the app would help but it still crashes

jakesinger commented 9 years ago

I think the line 'let urls' needs to be 'let urls?', so that when the '!' symbol is used, it can evaluate to nil in the event of failure

Danwakeem commented 9 years ago

No you have to add the app group to your project. It is failing as nil because it isn't set up on your xcode project.

Danwakeem commented 9 years ago

Okay here is how to enable the app group. Make sure you add the app group to both targets. (the containing app and the keyboard)

SlayterDev commented 9 years ago

Did you make an App ID through apple? Because I can't make one now with that bundle ID.

Danwakeem commented 9 years ago

Ahh man yeah I bet I did. Hang on I must have to add you guys to a development team or something.

Danwakeem commented 9 years ago

Can you add it if you go to the certificates section at developer.apple.com under the app group subsection?

SlayterDev commented 9 years ago

Nope. You wanna just redo it through my account and Ill add yall on as team members?

Danwakeem commented 9 years ago

Yeah sure that would be fine with me.

SlayterDev commented 9 years ago

Ok i think you need to delete the app ids and app group from your account. Also comment with your Apple ID

Danwakeem commented 9 years ago

Okay I will delete it real quick. My Apple ID is Danwakeem@gmail.com

Danwakeem commented 9 years ago

The app IDs are under com.SlayterDev should I still delete it?

SlayterDev commented 9 years ago

Yeah because otherwise I can't create them. Apparently App IDs are global and not account specific.

SlayterDev commented 9 years ago

Also I may need an email thats not an Apple ID

Danwakeem commented 9 years ago

Huh that is strange. Oh well I deleted everything. Okay if you do here is my yahoo: Danwakeem@yahoo.com

SlayterDev commented 9 years ago

Ok so that works. Super inconvenient. What you have to do is verify the account in your email. Then in preferences in Xcode I think you can add that account as a developer and it shouldn't(from what I can tell) mess with your real developer account. And hopefully you can get the proper credentials for running Enigma without much issue.

Danwakeem commented 9 years ago

Okay cool I will try it out when I get home and close this if it works. Thanks man!

Danwakeem commented 9 years ago

Well I know it will work but I'll just keep it open until I get it working on my machine.. You know what I mean😎

SlayterDev commented 9 years ago

Haha yeah I know what you mean :+1: I still need an email address from @jakesinger though

SlayterDev commented 9 years ago

If the dev profile I sent is working for everybody let me know so we can close this issue.

Danwakeem commented 9 years ago

Appears to be working for me

— Dan

On Wed, Mar 4, 2015 at 4:52 PM, Brad Slayter notifications@github.com wrote:

If the dev profile I sent is working for everybody let me know so we can close this issue.

Reply to this email directly or view it on GitHub: https://github.com/Danwakeem/enigma/issues/47#issuecomment-77268209

jakesinger commented 9 years ago

Works for me!

SlayterDev commented 9 years ago

Closed it is then!

Danwakeem commented 9 years ago

Actually sorry I just tried to run the app on my phone and it says application could not be verified. That is probably because you would have to add our phones to your list of devices in the member center right?

jakesinger commented 9 years ago

This means that you need to delete the app off of your phone and re-build it. The problem arises due to the build on your phone having a different account attached to it than the one you are building.

Danwakeem commented 9 years ago

Oh jeez duh! Sorry my bad. Thanks Jake!