Cannot run Frank tests on device, although Frankified app is on device
Asked Answered
V

1

9

I have gone through the instructions provided by Ted on this group. When I put in the following, with my path to the .app:

./fruitstrap -d -b <full_path_to_your_xcode_project_directory>/Frank/frankified_build/<app_name>.app

It looks like everything works, it displays that it's copying files to the device, and it gets to 49%, but then I get this:

 [ 52%] CreatingStagingDirectory
 [ 57%] ExtractingPackage
 [ 60%] InspectingPackage
 AMDeviceInstallApplication failed: -402653103

I searched online, and I found this forum and it's saying that the certificates or provisioning profiles are wrong. I have a provisioning profile and I can run the app on the device not through fruitstrap, so I don't believe that something is up with my provisioning profiles.

Thanks

--------- Update ---------

Okay, I've made a little progress. I am still stuck, but this is my problem now.

If I run a build that is stored here:

~/Library/Developer/Xcode/DerivedData/NameOfApp-blahblahblahblahblah/Build/Products/Debug-iphoneos/NameOfApp.app

I get the "Segmentation fault: 11" under "------- Debug Phase -------". That isn't exactly my problem (not yet at least), because this will run on my device. But I cannot run my Frankified.app build which is stored here:

~/NameOfRepo/Frank/frankified_build/Frankified.app

This is what I get when I try to run that (./fruitstrap -d -b ...):

 [ 70%] VerifyingApplication
 AMDeviceInstallApplication failed: -402620388

After some Googling I found that that number means this: Could not copy validate signature

I would appreciate any suggestions on what I might be able to try. Thank you!

-----------Update-----------------

I checked the codesigning on my Frankified.app like this:

 codesign -dvvv ./Frankified.app/

And saw that it was not signed. So I code signed the Frankified.app build like this:

 codesign -v --sign "iPhone Distribution: Joe Developer" /path/to/app

But I still get this:

 AMDeviceInstallApplication failed: -402620391 # This is a different error code than the others

-----------Update-----------------

I changed the specified architecture from arm7 to armv7 and it works. This is how I build the app:

xcodebuild -xcconfig Frank/frankify.xcconfig clean build -arch armv7 -configuration Debug -sdk iphoneos DEPLOYMENT_LOCATION=YES DSTROOT="~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/" FRANK_LIBRARY_SEARCH_PATHS="~/Documents/Workspace/Frank-Fruitstrap/Frank\""

I can now launch the app onto the device, but when I try to run the tests they all fail when they pass if I run the same tests on the simulator.

I got my ip address from my ipad, and I put http://:37265/screenshot in my browser and it displays a valid screenshot from the app. When I do http://:37265/dump it dumps out all the correct data about the current view.

Vivianne answered 13/5, 2013 at 15:34 Comment(0)
J
1

This is a bit of a tricky one to answer without seeing your whole steps to get where you are now eg. frank build steps you have ran.

The reason you will be getting the tests to run on the device is that armv7 is the architecture that allows you to run apps on a device (excuse the badly worded explanation). But to run it on the simulator it needs i386, also for the -sdk try running the command:

xcodebuild -showsdks

This should show you any ios sdks you have installed on you machine for instance when i run this i get:

iOS Simulator SDKs:
    Simulator - iOS 7.0             -sdk iphonesimulator7.0

As one of the results, if you try using the simulator one similar to the one i have inplace of iphoneos this could also help. So you new command would be something like:

xcodebuild -xcconfig Frank/frankify.xcconfig clean build -arch i386 -configuration Debug -sdk iphonesimulator7.0 DEPLOYMENT_LOCATION=YES DSTROOT="~/Documents/Workspace/Frank-Fruitstrap/Frank/frankified_build/" FRANK_LIBRARY_SEARCH_PATHS="~/Documents/Workspace/Frank-Fruitstrap/Frank\""

Give this a try but remember to change the sdk to -sdks {YOUR_SIMULATOR_SDK} as you probably dont have 7 yet. Also If this doesnt work try only changing one of the suggested parameters then maybe the other. xcodebuild is a huge pain!!

check this out for xcodebuild help: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html

good luck!!

Jon answered 6/8, 2013 at 21:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.