skywinder / ActionSheetPicker-3.0

Quickly reproduce the dropdown UIPickerView / ActionSheet functionality on iOS.
http://skywinder.github.io/ActionSheetPicker-3.0
BSD 3-Clause "New" or "Revised" License
3.4k stars 740 forks source link

Works on simulator - never starts on device. #118

Closed mworsnop closed 9 years ago

mworsnop commented 9 years ago

Below is the error log from the iPhone device. I am not sure what its trying to reference? The app works great on the simulator.

Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe Triggered by Thread: 0

Dyld Error Message: Library not loaded: @rpath/CoreActionSheetPicker.framework/CoreActionSheetPicker Referenced from: /private/var/mobile/Containers/Bundle/Application/6C4ABDB3-9FC6-41C4-A53C-79F083A1740E/NutriLife.app/NutriLife Reason: image not found Dyld Version: 353.6

Binary Images: 0x1fe20000 - 0x1fe43fff dyld armv7s <8ffd813a380c333bbd4a25e1dbe05715> /usr/lib/dyld

skywinder commented 9 years ago

It ssems, that problem in frameworks installation. What the iOS version of the device? There is 3 different project in workspace: Project ActionSheetPicker and Swift-Example use frameworks, that supported since iOS 8.0 To run example on iOS 6 and 7 - please, choose and run another project ActionSheetPicker-iOS-6-7

skywinder commented 9 years ago

If you are using iOS 8 and later - try to delete derived data in Xcode, remove application from device and try to install it again.

mworsnop commented 9 years ago

it looks like if you are debugging the code using the device thats when it fails. to my surprise when I unplugged the device, the app had installed and works properly. Maybe I will just finish debugging using the simulator, which does work in the debug mode properly.

To start this project I copied the headers and the picker directory into my project manually as I was not able to get the pod app to work properly.

mworsnop commented 9 years ago

What is the the ³derived data in Xcode² ?

Not sure what you wanted me to delete?

From: Petr Korolev notifications@github.com Reply-To: "skywinder/ActionSheetPicker-3.0" <reply+009c093caafb2befa0fde8d145b3fb258cc68c72fca05fce92cf0000000110afa7349 2a169ce032257c6@reply.github.com> Date: Monday, December 22, 2014 at 1:32 AM To: "skywinder/ActionSheetPicker-3.0" ActionSheetPicker-3.0@noreply.github.com Cc: Mark Worsnop mark@worsnop.com Subject: Re: [ActionSheetPicker-3.0] Works on simulator - never starts on device. (#118)

If you are using iOS 8 and later - try to delete derived data in Xcode, remove application from device and try to install it again.

‹ Reply to this email directly or view it on GitHub https://github.com/skywinder/ActionSheetPicker-3.0/issues/118#issuecomment- 67817634 .

skywinder commented 9 years ago

@mworsnop about derived data - it's some compilation data that xcode useing for personal need. Sometimes it cause errors. How to delete: http://stackoverflow.com/questions/18933321/deleting-contents-from-xcode-derived-data-folder

mworsnop commented 9 years ago

Clearing the data didn¹t help. Its not an issue right this minute as can do all the testing in the simulator and then send it to the phone for a final test without the debugger and Xcode controlling it. At least it does work on the phone!

It would be nice to know why it does this, but who knows.

From: Petr Korolev notifications@github.com Reply-To: "skywinder/ActionSheetPicker-3.0" <reply+009c093c4ba75da0d3ea88a14398eb76d36de5a76604748992cf0000000110aff83a9 2a169ce032257c6@reply.github.com> Date: Monday, December 22, 2014 at 7:18 AM To: "skywinder/ActionSheetPicker-3.0" ActionSheetPicker-3.0@noreply.github.com Cc: Mark Worsnop mark@worsnop.com Subject: Re: [ActionSheetPicker-3.0] Works on simulator - never starts on device. (#118)

@mworsnop https://github.com/mworsnop about derived data: http://stackoverflow.com/questions/18933321/deleting-contents-from-xcode-der ived-data-folder

‹ Reply to this email directly or view it on GitHub https://github.com/skywinder/ActionSheetPicker-3.0/issues/118#issuecomment- 67848090 .

skywinder commented 9 years ago

Ok, I will try to reproduce it and fix. I remember, that I have the same problem before. But now it's gone.

mworsnop commented 9 years ago

I am trying to have the user enter a popup prompt. My old code is below. Is there a way to do this with Action Sheet?

if (RecipeDesc == Nil) [RecipeDesc release];

Alertprompt = [[UIAlertView alloc] initWithTitle:@"Recipe Name?"

                                                 message:@"\n\n\n" //

IMPORTANT

                                                delegate:self

                                       cancelButtonTitle:@""

                                       otherButtonTitles:@"Enter", nil];

RecipeDesc = [[UITextField alloc] initWithFrame:CGRectMake( 12.0, 50.0,

260.0, 25.0)];

[RecipeDesc setBackgroundColor:[UIColor whiteColor]];

if (RDescription != Nil )

        RecipeDesc.text = RDescription;

[Alertprompt addSubview:RecipeDesc];

[Alertprompt show];

[Alertprompt release];

// set cursor and show keyboard

[RecipeDesc becomeFirstResponder];
skywinder commented 9 years ago

@mworsnop It's very hard to read code like this.

  1. Please, wrap your code in ``` to increase readability. https://help.github.com/articles/markdown-basics/#code-formatting
  2. you don't have to use release method in modern apps, that use ARC. more info here: https://developer.apple.com/library/mac/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html
  3. Don't compare something with Nil. you should use nil! More info here: http://nshipster.com/nil/
mworsnop commented 9 years ago

I need to have a popup that has the user enter a string. Maybe I didnt need to include the sample code. Is there a way to do this with ActionSheetPicker, or do you have an example?

I do use nil, that was the autocorrect changing it

skywinder commented 9 years ago

ActionSheetPicker don't allow to enter strings, only choose something from a list.

skywinder commented 9 years ago

I'm tentatively closing this one then, since it seems to be either a configuration issue or an issue with Xcode. Feel free to reopen this if you have any new insights :v:

kompw commented 9 years ago

have this same problem! I don't know how to solve it, but can copy the source code and change CoreActionSheetPicker.h (import how #import "AbstractActionSheetPicker.h" .....)

work for me

skywinder commented 9 years ago

@mworsnop @kompw Please, check the last version. It seems, that I fix it.

The problem was in missing Embedded library. http://stackoverflow.com/questions/26104975/dyld-library-not-loaded-rpath-libswiftcore-dylib-image-not-found

paramadharmika commented 8 years ago

Here what is work for me, using Objective C project

And that's it, it will run on your device